Skip to content

Commit

Permalink
cxxopt better
Browse files Browse the repository at this point in the history
  • Loading branch information
grencez committed Jun 3, 2024
1 parent cd8123a commit 08cbcba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
12 changes: 0 additions & 12 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,6 @@ common --registry=https://raw.githubusercontent.com/rendezqueue/rendezqueue_baze
common --registry=https://raw.githubusercontent.com/bazelbuild/bazel-central-registry/main
common --cxxopt=-std=c++17

# Testing.
build:standard_test_platform --disk_cache=~/.cache/bazel
# Ubuntu compiles with native.
build:linux_test_platform --copt=-march=native
build:linux_test_platform --config=standard_test_platform
build:ubuntu-latest_test_platform --config=linux_test_platform
# OSX uses the same Bazel flags for automated tests.
build:macos-latest_test_platform --config=linux_test_platform
# Windows has a different flag for C++17.
build:windows-latest_test_platform --cxxopt=/std:c++17
build:windows-latest_test_platform --config=standard_test_platform

# Valgrind.
#build:valgrind --run_under='valgrind --trace-children=yes --track-fds=yes --leak-check=full --show-leak-kinds=all --track-origins=yes'
build:valgrind --run_under='valgrind --trace-children=yes'
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/test_bazel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
include:
- platform: ubuntu-latest
cxxopt: -std=c++17
- platform: macos-latest
cxxopt: -std=c++17
- platform: windows-latest
cxxopt: /std:c++17

runs-on: ${{ matrix.platform }}

Expand All @@ -29,10 +35,14 @@ jobs:

- name: Build
run: >
bazel build --config=${{ matrix.platform }}_test_platform
bazel build
--cxxopt=${{matrix.cxxopt}}
--disk_cache=~/.cache/bazel
//...
- name: Test
run: >
bazel test --config=${{ matrix.platform }}_test_platform
bazel test
--cxxopt=${{matrix.cxxopt}}
--disk_cache=~/.cache/bazel
//...

0 comments on commit 08cbcba

Please sign in to comment.