Skip to content

Commit b4f7a88

Browse files
consolidate workflows
1 parent ac448e2 commit b4f7a88

File tree

3 files changed

+46
-107
lines changed

3 files changed

+46
-107
lines changed

.github/workflows/bazel.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
name: build
1+
name: build and test
22

33
on:
44
pull_request:
55
push:
6-
branches:
7-
- master
86
release:
97
types:
108
- released
@@ -28,6 +26,8 @@ jobs:
2826
- macos-14-large
2927
- macos-14-xlarge
3028
- macos-latest-large
29+
# macos-latest-xlarge may timeout.
30+
# https://github.com/google/s2geometry/issues/409
3131
- macos-latest-xlarge
3232
fail-fast: false
3333
runs-on: ${{ matrix.runs-on }}
@@ -39,7 +39,48 @@ jobs:
3939
abseil-version: "20250814.1"
4040
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
4141
- 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+
..
4348
working-directory: build/
44-
- run: sudo cmake --build . --parallel 45 --target=install
49+
- run: cmake --build . --parallel 45
4550
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

.github/workflows/test.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)