|
1 | | -name: build |
| 1 | +name: build and test |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | pull_request: |
5 | 5 | push: |
6 | | - branches: |
7 | | - - master |
8 | 6 | release: |
9 | 7 | types: |
10 | 8 | - released |
|
28 | 26 | - macos-14-large |
29 | 27 | - macos-14-xlarge |
30 | 28 | - macos-latest-large |
| 29 | + # macos-latest-xlarge may timeout. |
| 30 | + # https://github.com/google/s2geometry/issues/409 |
31 | 31 | - macos-latest-xlarge |
32 | 32 | fail-fast: false |
33 | 33 | runs-on: ${{ matrix.runs-on }} |
|
39 | 39 | abseil-version: "20250814.1" |
40 | 40 | - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 |
41 | 41 | - run: mkdir build |
42 | | - - run: cmake -DWITH_PYTHON=yes -DCMAKE_CXX_STANDARD=17 -DCMAKE_PREFIX_PATH=/usr/local/ -DBUILD_TESTS=OFF .. |
| 42 | + - run: > |
| 43 | + cmake |
| 44 | + -DWITH_PYTHON=yes |
| 45 | + -DCMAKE_CXX_STANDARD=17 |
| 46 | + -DCMAKE_PREFIX_PATH=/usr/local/ |
| 47 | + .. |
43 | 48 | working-directory: build/ |
44 | | - - run: sudo cmake --build . --parallel 45 --target=install |
| 49 | + - run: cmake --build . --parallel 45 |
45 | 50 | working-directory: build/ |
| 51 | + - if: always() |
| 52 | + run: cmake --build . --parallel 45 --target=test |
| 53 | + env: |
| 54 | + CTEST_OUTPUT_ON_FAILURE: ON |
| 55 | + CTEST_PARALLEL_LEVEL: 45 |
| 56 | + working-directory: build/ |
| 57 | + bazel: |
| 58 | + runs-on: ubuntu-latest |
| 59 | + |
| 60 | + # We would like to test on the oldest and newest supported. |
| 61 | + # https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md |
| 62 | + # https://bazel.build/release#support-matrix |
| 63 | + # It's not clear how to do that since bazelisk has some magic to pick a |
| 64 | + # bazel version. |
| 65 | + |
| 66 | + steps: |
| 67 | + - name: Checkout repository |
| 68 | + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 |
| 69 | + |
| 70 | + - name: Setup Bazel ${{ matrix.bazel }} |
| 71 | + uses: bazel-contrib/setup-bazel@43d7d5ceab59a307da44fc7585faa2a2fff4f88d # v0.16.0 |
| 72 | + with: |
| 73 | + # Avoid downloading Bazel every time. |
| 74 | + bazelisk-cache: true |
| 75 | + # Store build cache per workflow. |
| 76 | + disk-cache: ${{ github.workflow }} |
| 77 | + # Share repository cache between workflows. |
| 78 | + repository-cache: true |
| 79 | + |
| 80 | + - name: Build and Test |
| 81 | + run: | |
| 82 | + bazel test \ |
| 83 | + --jobs=45 --keep_going \ |
| 84 | + --test_verbose_timeout_warnings --test_output=errors \ |
| 85 | + //... |
| 86 | + working-directory: src |
0 commit comments