Skip to content

Commit b2ce70a

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

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-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/build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@ jobs:
1919
env:
2020
CI_BAZELRC_FILE_CONTENT: ${{ secrets.CI_BAZELRC_FILE_CONTENT }}
2121

22+
bazel_linux_debug:
23+
name: Bazel, Linux, Swift 6.1 (debug)
24+
runs-on: ubuntu-24.04
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: ./.github/actions/bazel-linux-build
28+
name: Build SwiftLint with Bazel
29+
env:
30+
CI_BAZELRC_FILE_CONTENT: ${{ secrets.CI_BAZELRC_FILE_CONTENT }}
31+
with:
32+
debug: 'true'
33+
2234
plugins_linux:
2335
name: SPM plugins, Linux, Swift ${{ matrix.version }}
2436
runs-on: ubuntu-24.04

0 commit comments

Comments
 (0)