|
| 1 | +name: C++ Internal |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: 0 1 * * * # Nightly at 01:00 UTC |
| 6 | + push: |
| 7 | + branches: |
| 8 | + - master |
| 9 | + pull_request: |
| 10 | + |
| 11 | +jobs: |
| 12 | + linux_cmake: |
| 13 | + timeout-minutes: 45 |
| 14 | + strategy: |
| 15 | + fail-fast: false |
| 16 | + matrix: |
| 17 | + config: |
| 18 | + - runner: ubuntu-current |
| 19 | + name: GCC Latest |
| 20 | + toolchain: "./resolve_symlinks/toolchains/gcc-toolchain.cmake" |
| 21 | + - runner: ubuntu-current |
| 22 | + name: Clang Latest |
| 23 | + toolchain: "./resolve_symlinks/toolchains/clang-toolchain.cmake" |
| 24 | + - runner: ubuntu-current |
| 25 | + name: Clang ASAN Latest |
| 26 | + toolchain: "./resolve_symlinks/toolchains/clang-asan-toolchain.cmake" |
| 27 | + - runner: ubuntu-current |
| 28 | + name: Clang TSAN Latest |
| 29 | + toolchain: "./resolve_symlinks/toolchains/clang-tsan-toolchain.cmake" |
| 30 | + - runner: ubuntu-current |
| 31 | + name: Clang UBSAN Latest |
| 32 | + toolchain: "./resolve_symlinks/toolchains/clang-ubsan-toolchain.cmake" |
| 33 | + - runner: ubuntu-old |
| 34 | + name: GCC Oldest |
| 35 | + toolchain: "./resolve_symlinks/toolchains/gcc-toolchain.cmake" |
| 36 | + - runner: ubuntu-old |
| 37 | + name: Clang Oldest |
| 38 | + toolchain: "./resolve_symlinks/toolchains/clang-toolchain.cmake" |
| 39 | + runs-on: |
| 40 | + - self-hosted |
| 41 | + - vm |
| 42 | + - ${{ matrix.config.runner }} |
| 43 | + name: ${{ matrix.config.name }} |
| 44 | + steps: |
| 45 | + # This is sometimes needed when running docker builds since these |
| 46 | + # sometimes produce files with root ownership |
| 47 | + - name: Ensure correct owner of repository |
| 48 | + run: sudo chown -R actions-runner:actions-runner . |
| 49 | + - name: Checkout source code |
| 50 | + uses: actions/checkout@v3 |
| 51 | + - name: Waf Clean |
| 52 | + run: python3 waf clean --no_resolve |
| 53 | + - name: Waf Configure |
| 54 | + run: python3 waf configure --git_protocol=git@ --cmake_toolchain=${{ matrix.config.toolchain }} --cmake_verbose |
| 55 | + - name: Waf Build |
| 56 | + run: python3 waf build --run_tests |
| 57 | + |
| 58 | + valgrind: |
| 59 | + timeout-minutes: 45 |
| 60 | + runs-on: |
| 61 | + - self-hosted |
| 62 | + - vm |
| 63 | + - ubuntu-current |
| 64 | + name: Valgrind |
| 65 | + steps: |
| 66 | + - name: Ensure correct owner of repository |
| 67 | + run: sudo chown -R actions-runner:actions-runner . |
| 68 | + |
| 69 | + - name: Checkout source code |
| 70 | + uses: actions/checkout@v3 |
| 71 | + |
| 72 | + - name: Waf Clean |
| 73 | + run: python3 waf clean --no_resolve |
| 74 | + |
| 75 | + - name: Waf Configure |
| 76 | + run: python3 waf configure --git_protocol=git@ --cmake_toolchain=./resolve_symlinks/toolchains/gcc-toolchain.cmake --cmake_verbose |
| 77 | + |
| 78 | + - name: Waf Build |
| 79 | + run: python3 waf build --run_tests --ctest_valgrind |
| 80 | + |
| 81 | + zig_toolchain_build: |
| 82 | + name: Zig Toolchain Build (Docker) |
| 83 | + runs-on: [self-hosted, vm, ubuntu-current] |
| 84 | + container: |
| 85 | + image: ghcr.io/steinwurf/build-images/zig-cpp:0.14.1 |
| 86 | + options: --user 0:0 |
| 87 | + volumes: |
| 88 | + - /root/.ssh:/root/.ssh |
| 89 | + steps: |
| 90 | + - name: Checkout source code |
| 91 | + uses: actions/checkout@v4 |
| 92 | + - name: Waf Clean |
| 93 | + run: python3 waf clean --no_resolve |
| 94 | + - name: Waf Configure with Zig Toolchain |
| 95 | + run: python3 waf configure --git_protocol=git@ --cmake_toolchain=../resolve_symlinks/toolchains/zig-toolchain-x86_64-linux-musl.cmake --cmake_verbose |
| 96 | + - name: Waf Build with Zig Toolchain |
| 97 | + run: python3 waf build --run_tests |
| 98 | + |
| 99 | + macos_cmake: |
| 100 | + timeout-minutes: 45 |
| 101 | + strategy: |
| 102 | + fail-fast: false |
| 103 | + matrix: |
| 104 | + config: |
| 105 | + - arch: ARM64 |
| 106 | + os: big_sur |
| 107 | + name: Apple Big Sur (ARM) |
| 108 | + toolchain: "./resolve_symlinks/toolchains/clang-toolchain.cmake" |
| 109 | + runs-on: |
| 110 | + - self-hosted |
| 111 | + - macOS |
| 112 | + - ${{ matrix.config.os }} |
| 113 | + - ${{ matrix.config.arch }} |
| 114 | + - cmake |
| 115 | + - builder |
| 116 | + name: ${{ matrix.config.name }} |
| 117 | + steps: |
| 118 | + - name: Checkout |
| 119 | + uses: actions/checkout@v3 |
| 120 | + - name: Waf Clean |
| 121 | + run: python3 waf clean --no_resolve |
| 122 | + - name: Waf Configure |
| 123 | + run: python3 waf configure --git_protocol=git@ --cmake_toolchain=${{ matrix.config.toolchain }} --cmake_verbose |
| 124 | + - name: Waf Build |
| 125 | + run: python3 waf build --run_tests |
| 126 | + |
| 127 | + windows_cmake: |
| 128 | + timeout-minutes: 45 |
| 129 | + strategy: |
| 130 | + fail-fast: false |
| 131 | + runs-on: [self-hosted, windows, vm, windows-current] |
| 132 | + name: Windows |
| 133 | + steps: |
| 134 | + - name: Checkout |
| 135 | + uses: actions/checkout@v3 |
| 136 | + - name: Waf Clean |
| 137 | + run: python waf clean --no_resolve |
| 138 | + - name: Waf Configure |
| 139 | + run: python waf configure --git_protocol=git@ --cmake_verbose |
| 140 | + - name: Waf Build |
| 141 | + run: python waf build --run_tests |
| 142 | + |
| 143 | + clang-format: |
| 144 | + timeout-minutes: 45 |
| 145 | + name: Clang-Format |
| 146 | + runs-on: [self-hosted, vm, ubuntu-current] |
| 147 | + steps: |
| 148 | + - name: Ensure correct owner of repository |
| 149 | + run: sudo chown -R actions-runner:actions-runner . |
| 150 | + - name: Clang format version |
| 151 | + run: clang-format --version |
| 152 | + - name: Checkout source code |
| 153 | + uses: actions/checkout@v3 |
| 154 | + - name: Run Clang-format |
| 155 | + run: find ./ -iname *.hpp -o -iname *.cpp -o -iname *.c -o -iname *.h | xargs clang-format --dry-run --Werror |
| 156 | + |
| 157 | + workflow-keepalive: |
| 158 | + if: github.event_name == 'schedule' |
| 159 | + runs-on: [self-hosted, vm, ubuntu-current] |
| 160 | + permissions: |
| 161 | + actions: write |
| 162 | + steps: |
| 163 | + - name: Install GitHub CLI |
| 164 | + run: | |
| 165 | + sudo apt update |
| 166 | + sudo apt install -y gh |
| 167 | + - uses: liskin/gh-workflow-keepalive@v1 |
| 168 | + |
| 169 | +concurrency: |
| 170 | + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} |
| 171 | + cancel-in-progress: true |
0 commit comments