File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Apple Clang
2+
3+ on :
4+ push :
5+ branches : [main, dev]
6+ pull_request :
7+ branches : [main]
8+
9+ jobs :
10+ apple-clang :
11+ uses : ./.github/workflows/build.yml
12+ with :
13+ os : macos-latest
14+ generator : Ninja
15+ cmake_args : " -DCMAKE_BUILD_TYPE=Debug"
Original file line number Diff line number Diff line change 1+ # Reusable build workflow — called by per-compiler CI workflows.
2+ name : Build
3+
4+ on :
5+ workflow_call :
6+ inputs :
7+ os :
8+ required : true
9+ type : string
10+ generator :
11+ required : true
12+ type : string
13+ cmake_args :
14+ required : false
15+ type : string
16+ default : " "
17+ build_args :
18+ required : false
19+ type : string
20+ default : " "
21+ test_args :
22+ required : false
23+ type : string
24+ default : " "
25+
26+ jobs :
27+ build :
28+ runs-on : ${{ inputs.os }}
29+
30+ steps :
31+ - uses : actions/checkout@v4
32+ with :
33+ fetch-depth : 1
34+
35+ # ── Cache submodules ──
36+ - name : Compute submodule cache key
37+ id : submod-hash
38+ shell : bash
39+ run : |
40+ echo "hash=$(git ls-tree HEAD third_party common/crypto | git hash-object --stdin)" >> "$GITHUB_OUTPUT"
41+
42+ - name : Cache submodules
43+ id : cache-submodules
44+ uses : actions/cache@v4
45+ with :
46+ path : |
47+ third_party
48+ common/crypto
49+ key : submodules-${{ runner.os }}-${{ steps.submod-hash.outputs.hash }}
50+
51+ - name : Init submodules
52+ if : steps.cache-submodules.outputs.cache-hit != 'true'
53+ run : git submodule update --init --recursive --depth 1
54+
55+ # ── Cache CPM downloads ──
56+ - name : Cache CPM
57+ uses : actions/cache@v4
58+ with :
59+ path : build/_deps
60+ key : cpm-${{ runner.os }}-${{ inputs.generator }}-${{ hashFiles('CMakeLists.txt', 'sdk/src/CMakeLists.txt') }}
61+ restore-keys : |
62+ cpm-${{ runner.os }}-${{ inputs.generator }}-
63+
64+ # ── Install Ninja ──
65+ - name : Install Ninja (Linux)
66+ if : runner.os == 'Linux'
67+ run : sudo apt-get update && sudo apt-get install -y ninja-build
68+
69+ - name : Install Ninja (macOS)
70+ if : runner.os == 'macOS'
71+ run : brew install ninja
72+
73+ # ── Configure ──
74+ - name : Configure
75+ shell : bash
76+ run : |
77+ cmake -B build \
78+ -G "${{ inputs.generator }}" \
79+ ${{ inputs.cmake_args }} \
80+ -DENABLE_TESTS=ON
81+
82+ # ── Build ──
83+ - name : Build
84+ run : cmake --build build ${{ inputs.build_args }} -j
85+
86+ # ── Test ──
87+ - name : Test
88+ run : ctest --test-dir build ${{ inputs.test_args }} --output-on-failure
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Clang
2+
3+ on :
4+ push :
5+ branches : [main, dev]
6+ pull_request :
7+ branches : [main]
8+
9+ jobs :
10+ clang :
11+ uses : ./.github/workflows/build.yml
12+ with :
13+ os : ubuntu-latest
14+ generator : Ninja
15+ cmake_args : >-
16+ -DCMAKE_BUILD_TYPE=Debug
17+ -DCMAKE_C_COMPILER=clang-18
18+ -DCMAKE_CXX_COMPILER=clang++-18
Original file line number Diff line number Diff line change 1+ name : GCC
2+
3+ on :
4+ push :
5+ branches : [main, dev]
6+ pull_request :
7+ branches : [main]
8+
9+ jobs :
10+ gcc :
11+ uses : ./.github/workflows/build.yml
12+ with :
13+ os : ubuntu-latest
14+ generator : Ninja
15+ cmake_args : >-
16+ -DCMAKE_BUILD_TYPE=Debug
17+ -DCMAKE_C_COMPILER=gcc-14
18+ -DCMAKE_CXX_COMPILER=g++-14
Original file line number Diff line number Diff line change 1+ name : MSVC
2+
3+ on :
4+ push :
5+ branches : [main, dev]
6+ pull_request :
7+ branches : [main]
8+
9+ jobs :
10+ msvc :
11+ uses : ./.github/workflows/build.yml
12+ with :
13+ os : windows-latest
14+ generator : " Visual Studio 17 2022"
15+ cmake_args : " -A x64"
16+ build_args : " --config Debug"
17+ test_args : " -C Debug"
You can’t perform that action at this time.
0 commit comments