CI test #25382
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches: [ thewarwithin ] | |
push: | |
branches: [ thewarwithin ] | |
paths-ignore: | |
- 'ActionPriorityLists/**' | |
- 'SpellDataDump/*.txt' | |
- 'dbc_extract3/**' | |
- 'casc_extract/**' | |
env: | |
SIMC_PROFILE: profiles/CI.simc | |
CCACHE_COMPRESS: true # always enable ccache compression | |
ccache-generation: 0 # bump if you need to "clean" ccache | |
# For PR, github.sha is the merge commit, workaround for cache hits on spec test workflows | |
BINARY_CACHE_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | |
jobs: | |
ubuntu-gcc-build: | |
name: ubuntu-${{ matrix.compiler }}-cpp${{ matrix.cppVersion }}-build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
compiler: [gcc-12, gcc-14] | |
cppVersion: [17, 20] | |
include: | |
- compiler: gcc-12 | |
cxx: g++-12 | |
packages: gcc-12 g++-12 | |
os: ubuntu-22.04 | |
- compiler: gcc-14 | |
cxx: g++-14 | |
packages: gcc-14 g++-14 | |
os: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
env: { ccache-prefix: 'ubuntu-${{ matrix.compiler }}-cpp-${{ matrix.cppVersion }}-ccache-${{ env.ccache-generation }}' } | |
with: | |
path: ${{ runner.workspace }}/.ccache | |
key: ${{ env.ccache-prefix }}-${{ github.sha }} | |
restore-keys: ${{ env.ccache-prefix }}- | |
- name: Install deps | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libcurl4-openssl-dev ninja-build ccache ${{ matrix.packages }} | |
- name: Configure | |
run: cmake -H. -B'${{ runner.workspace }}/b/ninja' -GNinja -DBUILD_GUI=OFF | |
-DCMAKE_BUILD_TYPE=Debug | |
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} -DCMAKE_C_COMPILER=${{ matrix.compiler }} | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
-DCMAKE_CXX_STANDARD=${{ matrix.cppVersion }} | |
- name: Build | |
env: | |
CCACHE_BASEDIR: ${{ runner.workspace }} | |
CCACHE_DIR: ${{ runner.workspace }}/.ccache | |
CCACHE_MAXSIZE: 192M # full build consumes around ~80, ~2x that to be safe | |
run: | | |
ccache -z | |
ninja -C '${{ runner.workspace }}/b/ninja' | |
ccache -s | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
${{ runner.workspace }}/b/ninja/simc | |
profiles | |
tests | |
generate_profiles_ci.sh | |
.git | |
key: ubuntu-${{ matrix.compiler }}-for_run-${{ env.BINARY_CACHE_SHA }}-cpp-${{ matrix.cppVersion }} | |
ubuntu-clang-build: | |
name: ubuntu-build-${{ matrix.compiler }}-C++${{ matrix.cppVersion }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
cppVersion: [17, 20] | |
compiler: [clang++-15, clang++-18] | |
include: | |
- compiler: clang++-15 | |
os: ubuntu-22.04 | |
packages: clang-15 lld-15 | |
enable_file_prefix_map: true | |
- compiler: clang++-18 | |
os: ubuntu-24.04 | |
packages: clang-18 lld-18 | |
enable_file_prefix_map: true | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
env: { ccache-prefix: 'ubuntu-${{ matrix.compiler }}-cpp-${{ matrix.cppVersion }}-ccache-${{ env.ccache-generation }}' } | |
with: | |
path: ${{ runner.workspace }}/.ccache | |
key: ${{ env.ccache-prefix }}-${{ github.sha }} | |
restore-keys: ${{ env.ccache-prefix }}- | |
- name: Install deps | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libcurl4-openssl-dev ninja-build ccache ${{ matrix.packages }} | |
- name: Configure | |
env: | |
UBSAN_STRIP_COUNT: "`echo \"${{ runner.workspace }}//\" | grep -o '/' - | wc -l`" | |
run: cmake -H. -B'${{ runner.workspace }}/b/ninja' -GNinja -DBUILD_GUI=OFF | |
-DCMAKE_BUILD_TYPE=Debug | |
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }} | |
-DCMAKE_CXX_FLAGS="-Og ${{ matrix.enable_file_prefix_map && format('-ffile-prefix-map={0}/=/', runner.workspace) || ''}} | |
-fno-omit-frame-pointer -fsanitize=address,undefined | |
-fsanitize-undefined-strip-path-components=$UBSAN_STRIP_COUNT" | |
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld -fsanitize=address,undefined" | |
-DCMAKE_CXX_STANDARD=${{ matrix.cppVersion }} | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
- name: Build | |
env: | |
CCACHE_BASEDIR: ${{ runner.workspace }} | |
CCACHE_DIR: ${{ runner.workspace }}/.ccache | |
CCACHE_MAXSIZE: 256M # full build consumes around ~124, ~2x that to be safe | |
run: | | |
ccache -z | |
ninja -C '${{ runner.workspace }}/b/ninja' | |
ccache -s | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
${{ runner.workspace }}/b/ninja/simc | |
profiles | |
tests | |
generate_profiles_ci.sh | |
.git | |
key: ubuntu-${{ matrix.compiler }}-for_run-${{ env.BINARY_CACHE_SHA }}-cpp-${{ matrix.cppVersion }} | |