SRB2/.gitlab/ci/jobs/windows-x64.yml

99 lines
3 KiB
YAML
Raw Normal View History

Windows x64:
extends: .srb2ci
2025-02-27 02:55:14 +00:00
stage: win32
when: manual
allow_failure: true
2025-02-16 13:59:38 +00:00
cache:
- key: ccache-$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG
fallback_keys:
- ccache-$CI_JOB_NAME_SLUG-$CI_DEFAULT_BRANCH
- ccache-$CI_JOB_NAME_SLUG-master
paths:
- build/ccache
- build/ccache_statslog
- key: apt-$CI_JOB_IMAGE
paths:
- build/apt-cache
unprotect: true
- key: vcpkg-binary-cache-x64-mingw-static
paths:
- build/vcpkg-binary-cache
unprotect: true
artifacts:
paths:
2025-01-21 22:13:26 +00:00
- "build.cmake/bin/"
- "build.cmake/src/config.h"
expose_as: "Win64"
name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64"
variables:
PREFIX: x86_64-w64-mingw32
script:
2025-02-16 13:59:38 +00:00
- |
# vcpkg
echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KSetting vcpkg cache"
2025-02-16 13:59:38 +00:00
export VCPKG_DEFAULT_BINARY_CACHE="$(pwd)/build/vcpkg-binary-cache"
2025-02-16 13:59:38 +00:00
mkdir -p "build/vcpkg-binary-cache"
echo -e "\e[0Ksection_end:`date +%s`:vcpkg-root\r\e[0K"
- - |
# apt_toolchain
echo -e "\e[0Ksection_start:`date +%s`:apt_toolchain[collapsed=true]\r\e[0KInstalling toolchain packages"
- apt-get install g++-mingw-w64-x86-64-win32
- |
# apt_toolchain
echo -e "\e[0Ksection_end:`date +%s`:apt_toolchain\r\e[0K"
2025-01-21 22:13:26 +00:00
- - |
# apt_development
echo -e "\e[0Ksection_start:`date +%s`:apt_development[collapsed=true]\r\e[0KInstalling development packages"
- apt-get install ninja-build
- |
# apt_development
echo -e "\e[0Ksection_end:`date +%s`:apt_development\r\e[0K"
- - |
# cmake
echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles"
2025-02-16 13:59:38 +00:00
- cmake -B build.cmake -DSRB2_USE_CCACHE=NO -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles"
2025-01-21 22:13:26 +00:00
- |
# cmake
echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K"
- - |
# make
echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2"
- cmake --build build.cmake --parallel 1 --verbose
- |
# make
echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K"
2025-02-16 13:59:38 +00:00
after_script:
- - |
# apt_clean
echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages"
- apt-get autoclean
- |
# apt_clean
echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K"
- - |
# ccache_stats
echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:"
- ccache --show-stats
- ccache --show-log-stats || true
- |
# ccahe_stats
echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K"