Skip to content
Draft
Show file tree
Hide file tree
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
10 changes: 9 additions & 1 deletion .github/actions/bazel-linux-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
14 changes: 14 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/...
Expand Down
Loading