Skip to content

Commit 07572f1

Browse files
committed
Add Bazel debug build on Linux
1 parent 8cda6c6 commit 07572f1

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

.github/actions/bazel-linux-build/action.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ inputs:
44
target:
55
description: The Bazel target to build
66
default: //:swiftlint
7+
debug:
8+
description: Whether to build in debug mode
9+
default: "false"
710
runs:
811
using: composite
912
steps:
@@ -24,4 +27,9 @@ runs:
2427
echo "CC=clang" >> $GITHUB_ENV
2528
- name: Build SwiftLint with Bazel
2629
shell: bash
27-
run: bazel build --config release ${{ inputs.target }}
30+
run: |
31+
if [ "${{ inputs.debug }}" = "true" ]; then
32+
bazel build ${{ inputs.target }}
33+
else
34+
bazel build ${{ inputs.target }} --config release
35+
fi

.github/workflows/test.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,17 @@ jobs:
4949
path: .build
5050
- name: Run tests
5151
run: make spm_test
52+
53+
bazel_linux_debug:
54+
name: Bazel, Linux, Swift 6.1 (debug)
55+
runs-on: ubuntu-24.04
56+
steps:
57+
- uses: actions/checkout@v4
58+
- uses: ./.github/actions/bazel-linux-build
59+
name: Build with Bazel
60+
env:
61+
CI_BAZELRC_FILE_CONTENT: ${{ secrets.CI_BAZELRC_FILE_CONTENT }}
62+
with:
63+
debug: 'true'
64+
- name: Run tests
65+
run: make bazel_test

0 commit comments

Comments
 (0)