stages: - build Debian: tags: - docker - linux image: debian:bullseye cache: key: cache.002 paths: - apt-cache/ - ccache/ before_script: - export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR - apt-get update -yq - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y cmake build-essential libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-iostreams-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev libsdl2-dev libqt5opengl5-dev libopenal-dev libopenscenegraph-dev libunshield-dev libtinyxml-dev libmygui-dev libbullet-dev ccache stage: build script: - export CCACHE_BASEDIR="`pwd`" - export CCACHE_DIR="`pwd`/ccache" && mkdir -pv "$CCACHE_DIR" - ccache -z -M 250M - cores_to_use=$((`nproc`-2)); if (( $cores_to_use < 1 )); then cores_to_use=1; fi - mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=MinSizeRel ../ -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - make -j$cores_to_use - DESTDIR=artifacts make install - ccache -s artifacts: paths: - build/artifacts/ MacOS: tags: - macos - xcode except: - branches # because our CI VMs are not public, MRs can't use them and timeout stage: build allow_failure: true script: - rm -fr build/* # remove anything in the build directory - CI/before_install.osx.sh - CI/before_script.osx.sh - cd build; make -j2 package artifacts: paths: - build/OpenMW-*.dmg .Windows_Ninja_Base: tags: - windows before_script: - Get-Date -Format "HH:mm:ss" - Measure-Command -Expression { Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" | Out-Default } - Measure-Command -Expression { choco install git --force --params "/GitAndUnixToolsOnPath" -y | Out-Default } - Measure-Command -Expression { choco install 7zip -y | Out-Default } - Measure-Command -Expression { choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y | Out-Default } - Measure-Command -Expression { choco install vswhere -y | Out-Default } - Measure-Command -Expression { choco install ninja -y | Out-Default } - Measure-Command -Expression { choco install python -y | Out-Default } - Measure-Command -Expression { refreshenv | Out-Default } - Get-Date -Format "HH:mm:ss" stage: build script: - Get-Date -Format "HH:mm:ss" - Measure-Command -Expression { $time = (Get-Date -Format "HH:mm:ss") | Out-Default } - Measure-Command -Expression { echo ${time} | Out-Default } - Measure-Command -Expression { echo "started by ${GITLAB_USER_NAME}" | Out-Default } - Measure-Command -Expression { sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V -N | Out-Default } - Measure-Command -Expression { cd MSVC2019_64_Ninja | Out-Default } - Measure-Command -Expression { .\ActivateMSVC.ps1 | Out-Default } - Measure-Command -Expression { cmake --build . --config $config | Out-Default } - Measure-Command -Expression { cd $config | Out-Default } - | if (Get-ChildItem -Recurse *.pdb) { Measure-Command -Expression { 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip '*.pdb' | Out-Default } Measure-Command -Expression { Get-ChildItem -Recurse *.pdb | Remove-Item | Out-Default } } - Measure-Command -Expression { 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*' | Out-Default } - Get-Date -Format "HH:mm:ss" cache: key: ninja-v2 paths: - deps - MSVC2019_64_Ninja/deps/Qt artifacts: when: always paths: - "*.zip" - "*.log" - MSVC2019_64_Ninja/*.log - MSVC2019_64_Ninja/*/*.log - MSVC2019_64_Ninja/*/*/*.log - MSVC2019_64_Ninja/*/*/*/*.log - MSVC2019_64_Ninja/*/*/*/*/*.log - MSVC2019_64_Ninja/*/*/*/*/*/*.log - MSVC2019_64_Ninja/*/*/*/*/*/*/*.log - MSVC2019_64_Ninja/*/*/*/*/*/*/*/*.log Windows_Ninja_Release: extends: - .Windows_Ninja_Base variables: config: "Release" Windows_Ninja_Debug: extends: - .Windows_Ninja_Base variables: config: "Debug" Windows_Ninja_RelWithDebInfo: extends: - .Windows_Ninja_Base variables: config: "RelWithDebInfo" .Windows_MSBuild_Base: tags: - windows before_script: - Get-Date -Format "HH:mm:ss" - Measure-Command -Expression { Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" | Out-Default } - Measure-Command -Expression { choco install git --force --params "/GitAndUnixToolsOnPath" -y | Out-Default } - Measure-Command -Expression { choco install 7zip -y | Out-Default } - Measure-Command -Expression { choco install cmake.install --installargs 'ADD_CMAKE_TO_PATH=System' -y | Out-Default } - Measure-Command -Expression { choco install vswhere -y | Out-Default } - Measure-Command -Expression { choco install python -y | Out-Default } - Measure-Command -Expression { refreshenv | Out-Default } - Get-Date -Format "HH:mm:ss" stage: build script: - Get-Date -Format "HH:mm:ss" - Measure-Command -Expression { $time = (Get-Date -Format "HH:mm:ss") | Out-Default } - Measure-Command -Expression { echo ${time} | Out-Default } - Measure-Command -Expression { echo "started by ${GITLAB_USER_NAME}" | Out-Default } - Measure-Command -Expression { sh CI/before_script.msvc.sh -c $config -p Win64 -v 2019 -k -V | Out-Default } - Measure-Command -Expression { cd MSVC2019_64 | Out-Default } - Measure-Command -Expression { cmake --build . --config $config | Out-Default } - Measure-Command -Expression { cd $config | Out-Default } - | if (Get-ChildItem -Recurse *.pdb) { Measure-Command -Expression { 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}_symbols.zip '*.pdb' | Out-Default } Measure-Command -Expression { Get-ChildItem -Recurse *.pdb | Remove-Item | Out-Default } } - Measure-Command -Expression { 7z a -tzip ..\..\OpenMW_MSVC2019_64_${config}_${CI_COMMIT_REF_NAME}_${CI_JOB_ID}.zip '*' | Out-Default } - Get-Date -Format "HH:mm:ss" cache: key: msbuild-v2 paths: - deps - MSVC2019_64/deps/Qt artifacts: when: always paths: - "*.zip" - "*.log" - MSVC2019_64/*.log - MSVC2019_64/*/*.log - MSVC2019_64/*/*/*.log - MSVC2019_64/*/*/*/*.log - MSVC2019_64/*/*/*/*/*.log - MSVC2019_64/*/*/*/*/*/*.log - MSVC2019_64/*/*/*/*/*/*/*.log - MSVC2019_64/*/*/*/*/*/*/*/*.log Windows_MSBuild_Release: extends: - .Windows_MSBuild_Base variables: config: "Release" Windows_MSBuild_Debug: extends: - .Windows_MSBuild_Base variables: config: "Debug" Windows_MSBuild_RelWithDebInfo: extends: - .Windows_MSBuild_Base variables: config: "RelWithDebInfo"