diff --git a/.github/actions/bazel-linux-build/action.yml b/.github/actions/bazel-linux-build/action.yml index d563961410..3cb2eb7090 100644 --- a/.github/actions/bazel-linux-build/action.yml +++ b/.github/actions/bazel-linux-build/action.yml @@ -4,6 +4,9 @@ inputs: target: description: The Bazel target to build default: //:swiftlint + debug: + description: Whether to build in debug mode + default: "false" runs: using: composite steps: @@ -24,4 +27,9 @@ runs: echo "CC=clang" >> $GITHUB_ENV - name: Build SwiftLint with Bazel shell: bash - run: bazel build --config release ${{ inputs.target }} + run: | + if [ "${{ inputs.debug }}" = "true" ]; then + bazel build ${{ inputs.target }} --verbose_failures --keep_going --jobs=1 + else + bazel build ${{ inputs.target }} --config release + fi diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eb26266e80..6da2506c6e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,3 +49,17 @@ jobs: path: .build - name: Run tests run: make spm_test + + bazel_linux_debug: + name: Bazel, Linux, Swift 6.1 (debug) + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/bazel-linux-build + name: Build with Bazel + env: + CI_BAZELRC_FILE_CONTENT: ${{ secrets.CI_BAZELRC_FILE_CONTENT }} + with: + debug: 'true' + - name: Run tests + run: make bazel_test diff --git a/Makefile b/Makefile index d96690f97b..09acbff99b 100644 --- a/Makefile +++ b/Makefile @@ -147,7 +147,7 @@ package: $(SWIFTLINT_EXECUTABLE) "$(OUTPUT_PACKAGE)" bazel_test: - bazel test --test_env=SKIP_INTEGRATION_TESTS=true --test_output=errors //Tests/... + bazel test --test_env=SKIP_INTEGRATION_TESTS=true --test_output=errors --verbose_failures --keep_going --jobs=1 //Tests/... bazel_test_tsan: bazel test --test_output=errors --build_tests_only --features=tsan --test_timeout=1000 //Tests/...