Skip to content

Commit 7117c84

Browse files
committed
Build with Bazel
1 parent 48c201a commit 7117c84

2 files changed

Lines changed: 18 additions & 10 deletions

File tree

.bazelrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ build --enable_platform_specific_config
77
build:macos --apple_crosstool_top=@local_config_apple_cc//:toolchain
88
build:macos --crosstool_top=@local_config_apple_cc//:toolchain
99
build:macos --host_crosstool_top=@local_config_apple_cc//:toolchain
10-
11-
build --macos_minimum_os=13.5 --host_macos_minimum_os=13.5
10+
build:macos --macos_minimum_os=13.5 --host_macos_minimum_os=13.5
1211
build --disk_cache=~/.bazel_cache
1312
build --experimental_remote_cache_compression
1413
build --remote_build_event_upload=minimal

.github/workflows/test.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ jobs:
7474
arch: arm64
7575
windows-display-name: '11 ARM'
7676
swift-version: 6.2.1
77+
env:
78+
CC: clang
79+
BAZEL_LLVM: C:\Program Files\LLVM
7780
steps:
7881
- uses: compnerd/gha-setup-swift@main
7982
with:
@@ -83,13 +86,19 @@ jobs:
8386
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
8487
with:
8588
persist-credentials: false
86-
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
87-
with:
88-
key: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}-${{ hashFiles('Package.resolved', 'Package.swift') }}
89-
restore-keys: windows-${{ matrix.windows-version }}-spm-${{ matrix.swift-version }}-
90-
path: .build
91-
- name: Build all targets
92-
run: swift build --build-tests --vv
89+
- name: Apply patch
90+
run: |
91+
git apply --ignore-whitespace .bcr/patches/no-warnings-as-errors.patch
92+
git update-index --assume-unchanged BUILD
93+
- name: Build SwiftLint
94+
run: bazel build //:swiftlint --toolchain_resolution_debug=.*
9395
- name: Run selected tests
94-
run: swift test --vv --skip IntegrationTests --skip FileSystemAccessTests
96+
run: >
97+
bazel test --test_output=errors
98+
//Tests:BuiltInRulesTests
99+
//Tests:CoreTests
100+
//Tests:ExtraRulesTests
101+
//Tests:FrameworkTests
102+
//Tests:GeneratedTests
103+
//Tests:MacrosTests
95104
# To be extended with test execution and linting ...

0 commit comments

Comments
 (0)