-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix tests under
bazel test -c opt
. (#212)
With certain versions of GCC, `bazel test -c opt ...` failed, apparently due to a compiler bug. This change: 1. Adds a workaround for the GCC bug. 2. Enables the workaround on versions of GCC known to have the bug. 3. Documents the bug (in comments). 4. Enables testing with `-c opt` as part of the commit hook. Note that the versions covered by #2 are a little wider than may be technically necessary. As of the time of writing, this affects all released versions of GCC from 12.1 through 14.1, but the GCC fix has been backported to the 12.X and 13.X branches. It may be possible to reduce the workaround's scope once those are released.
- Loading branch information
Showing
3 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ jobs: | |
strategy: | ||
matrix: | ||
cpp-compiler: ["clang", "gcc"] | ||
options: ["-c opt", ""] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: bazel-contrib/[email protected] | ||
|
@@ -16,7 +17,7 @@ jobs: | |
disk-cache: "verify-pr:run-bazel-tests:${{ matrix.cpp-compiler }}" | ||
repository-cache: true | ||
- run: echo "CC=${{ matrix.cpp-compiler }}" >> $GITHUB_ENV | ||
- run: bazel test ... | ||
- run: bazel test ${{ matrix.options }} ... | ||
check-formatting: | ||
name: "Check Python formatting" | ||
runs-on: ubuntu-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters