Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,27 @@ jobs:
# macos-latest-xlarge may timeout.
# https://github.com/google/s2geometry/issues/409
- macos-latest-xlarge
- windows-latest
python: ["ON"]
exclude:
- runs-on: windows-latest
python: "ON"
include:
- runs-on: windows-latest
python: "OFF"
fail-fast: false
runs-on: ${{ matrix.runs-on }}
timeout-minutes: 30
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set NUM_CORES
shell: bash
run: |
NUM_CORES=$(getconf _NPROCESSORS_ONLN)
if [[ "$RUNNER_OS" == "Windows" ]]; then
NUM_CORES=$NUMBER_OF_PROCESSORS
else
NUM_CORES=$(getconf _NPROCESSORS_ONLN)
fi
echo "NUM_CORES=$NUM_CORES" >> $GITHUB_ENV
echo "Detected $NUM_CORES cores"
- name: Setup ccache
Expand All @@ -46,7 +59,7 @@ jobs:
- run: mkdir build
- run: >
cmake
-DWITH_PYTHON=yes
-DWITH_PYTHON=${{ matrix.python }}
-DFETCH_ABSEIL=ON
-DCMAKE_CXX_STANDARD=17
-DCMAKE_C_COMPILER_LAUNCHER=ccache
Expand All @@ -59,7 +72,10 @@ jobs:
run: ctest --parallel ${{ env.NUM_CORES }} --output-on-failure
working-directory: build/
bazel:
runs-on: ubuntu-latest
strategy:
matrix:
runs-on: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.runs-on }}

# We would like to test on the oldest and newest supported.
# https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md
Expand All @@ -82,6 +98,7 @@ jobs:
repository-cache: true

- name: Build and Test
shell: bash
run: |
bazel test \
--keep_going \
Expand Down
Loading