Skip to content

Commit

Permalink
ci: Merge bazel build and bazel test
Browse files Browse the repository at this point in the history
On Windows, `bazel test` uses a different `PATH` value than
`bazel build`, which results in duplicated build steps. Since
`bazel test //...` also builds all targets, the additional `build` step
does not provide additional assurances.

This may also resolve `failed to delete output files` errors which occur
during the test step, likely because the build step leaks open files
somewhere.
  • Loading branch information
fmeum committed Apr 21, 2023
1 parent 852514f commit 5a3496b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/run-all-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,8 @@ jobs:
run: .github/scripts/echoBuildBuddyConfig.sh ${{ secrets.BUILDBUDDY_API_KEY }} >> $GITHUB_ENV
shell: bash

- name: Build
run: bazelisk build ${{env.BUILD_BUDDY_CONFIG}} --java_runtime_version=local_jdk_${{ matrix.jdk }} --disk_cache=${{ matrix.cache }} ${{ matrix.bazel_args }} --build_tag_filters="-no-${{ matrix.arch }}-jdk${{ matrix.jdk }},-no-jdk${{ matrix.jdk }}" //...

- name: Test
run: bazelisk test ${{env.BUILD_BUDDY_CONFIG}} --java_runtime_version=local_jdk_${{ matrix.jdk }} --disk_cache=${{ matrix.cache }} ${{ matrix.bazel_args }} --test_tag_filters="-no-${{ matrix.arch }}-jdk${{ matrix.jdk }},-no-jdk${{ matrix.jdk }}" //...
- name: Build & Test
run: bazelisk test ${{env.BUILD_BUDDY_CONFIG}} --java_runtime_version=local_jdk_${{ matrix.jdk }} --disk_cache=${{ matrix.cache }} ${{ matrix.bazel_args }} --build_tag_filters="-no-${{ matrix.arch }}-jdk${{ matrix.jdk }},-no-jdk${{ matrix.jdk }}" --test_tag_filters="-no-${{ matrix.arch }}-jdk${{ matrix.jdk }},-no-jdk${{ matrix.jdk }}" //...

- name: Copy Bazel log
if: always()
Expand Down

0 comments on commit 5a3496b

Please sign in to comment.