|
1 | | -name: ci |
2 | | -on: |
3 | | - push: |
4 | | - tags-ignore: v*.* |
5 | | - branches: |
6 | | - - '*' |
| 1 | +name: ci-pr |
| 2 | +on: [pull_request, workflow_dispatch] |
7 | 3 | jobs: |
8 | | - build-linux: |
| 4 | + format-check: |
9 | 5 | runs-on: ubuntu-latest |
10 | 6 | steps: |
11 | | - - uses: actions/checkout@v2 |
| 7 | + - uses: actions/checkout@v4 |
| 8 | + - name: format code |
| 9 | + run: scripts/format_code.sh |
| 10 | + - name: check diff |
| 11 | + run: .github/format_check_diff.sh |
| 12 | + x64-linux-gcc: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v4 |
12 | 16 | - name: init |
13 | | - run: sudo apt install -yqq ninja-build g++-11 |
14 | | - - name: configure gcc |
15 | | - run: cmake -S . --preset=default -B build -DCMAKE_CXX_COMPILER=g++-11 |
16 | | - - name: configure clang |
17 | | - run: cmake -S . --preset=ninja-clang -B clang |
18 | | - - name: build gcc |
19 | | - run: cmake --build build --config=Release |
20 | | - - name: build clang |
21 | | - run: cmake --build clang --config=Release |
22 | | - - name: test |
23 | | - run: cd build && ctest -C Release |
24 | | - build-windows: |
| 17 | + run: uname -m; sudo apt install -yqq ninja-build |
| 18 | + - name: configure |
| 19 | + run: cmake -S . --preset=ninja-gcc -B build -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 |
| 20 | + - name: build debug |
| 21 | + run: cmake --build build --config=Debug -- -v |
| 22 | + - name: build release |
| 23 | + run: cmake --build build --config=Release -- -v |
| 24 | + - name: test debug |
| 25 | + run: cd build && ctest -V -C Debug |
| 26 | + - name: test release |
| 27 | + run: cd build && ctest -V -C Release |
| 28 | + x64-linux-clang: |
| 29 | + runs-on: ubuntu-latest |
| 30 | + steps: |
| 31 | + - uses: actions/checkout@v4 |
| 32 | + - name: init |
| 33 | + run: | |
| 34 | + uname -m |
| 35 | + sudo apt update -yqq && sudo apt install -yqq clang-19 ninja-build |
| 36 | + sudo update-alternatives --remove-all clang++ |
| 37 | + sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-19 10 |
| 38 | + - name: configure |
| 39 | + run: cmake -S . --preset=ninja-clang -B build |
| 40 | + - name: build debug |
| 41 | + run: cmake --build build --config=Debug -- -v |
| 42 | + - name: build release |
| 43 | + run: cmake --build build --config=Release -- -v |
| 44 | + - name: test debug |
| 45 | + run: cd build && ctest -V -C Debug |
| 46 | + - name: test release |
| 47 | + run: cd build && ctest -V -C Release |
| 48 | + arm64-linux-gcc: |
| 49 | + runs-on: ubuntu-24.04-arm |
| 50 | + steps: |
| 51 | + - uses: actions/checkout@v4 |
| 52 | + - name: init |
| 53 | + run: uname -m |
| 54 | + - name: configure |
| 55 | + run: cmake -S . --preset=ninja-gcc -B build -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 |
| 56 | + - name: build debug |
| 57 | + run: cmake --build build --config=Debug -- -v |
| 58 | + - name: build release |
| 59 | + run: cmake --build build --config=Release -- -v |
| 60 | + - name: test debug |
| 61 | + run: cd build && ctest -V -C Debug |
| 62 | + - name: test release |
| 63 | + run: cd build && ctest -V -C Release |
| 64 | + arm64-linux-clang: |
| 65 | + runs-on: ubuntu-24.04-arm |
| 66 | + steps: |
| 67 | + - uses: actions/checkout@v4 |
| 68 | + - name: init |
| 69 | + run: | |
| 70 | + uname -m |
| 71 | + sudo apt update -yqq && sudo apt install -yqq clang-19 ninja-build |
| 72 | + sudo update-alternatives --remove-all clang++ |
| 73 | + sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-19 10 |
| 74 | + - name: configure |
| 75 | + run: cmake -S . --preset=ninja-clang -B build |
| 76 | + - name: build debug |
| 77 | + run: cmake --build build --config=Debug -- -v |
| 78 | + - name: build release |
| 79 | + run: cmake --build build --config=Release -- -v |
| 80 | + - name: test debug |
| 81 | + run: cd build && ctest -V -C Debug |
| 82 | + - name: test release |
| 83 | + run: cd build && ctest -V -C Release |
| 84 | + x64-windows-vs22: |
25 | 85 | runs-on: windows-latest |
26 | 86 | steps: |
27 | | - - uses: actions/checkout@v2 |
| 87 | + - uses: actions/checkout@v4 |
28 | 88 | - name: configure |
29 | 89 | run: cmake -S . --preset=vs22 -B build |
30 | | - - name: build |
31 | | - run: cmake --build build --config=Release |
32 | | - - name: test |
33 | | - run: cd build && ctest -C Release |
| 90 | + - name: build debug |
| 91 | + run: cmake --build build --config=Debug --parallel |
| 92 | + - name: build release |
| 93 | + run: cmake --build build --config=Release --parallel |
| 94 | + - name: test debug |
| 95 | + run: cd build && ctest -V -C Debug |
| 96 | + - name: test release |
| 97 | + run: cd build && ctest -V -C Release |
| 98 | + x64-windows-clang: |
| 99 | + runs-on: windows-latest |
| 100 | + steps: |
| 101 | + - uses: actions/checkout@v4 |
| 102 | + - name: init |
| 103 | + run: choco install ninja |
| 104 | + - name: configure |
| 105 | + run: cmake -S . --preset=ninja-clang -B clang |
| 106 | + - name: build debug |
| 107 | + run: cmake --build clang --config=Debug -- -v |
| 108 | + - name: build release |
| 109 | + run: cmake --build clang --config=Release -- -v |
| 110 | + - name: test debug |
| 111 | + run: cd clang && ctest -V -C Debug |
| 112 | + - name: test release |
| 113 | + run: cd clang && ctest -V -C Release |
0 commit comments