Skip to content

Commit e683568

Browse files
authored
Test Bazel integration under Linux (#1026)
1 parent 580d863 commit e683568

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed

.github/workflows/test.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,37 @@ jobs:
2222
- uses: actions/checkout@master
2323
- uses: jdx/mise-action@v2
2424
- run: mise run lint-ci
25+
- name: Check generated Bazel rules
26+
run: mise r gen-bazel-rules && git diff --quiet --exit-code
2527
bazel:
26-
runs-on: macos-26
27-
name: Bazel
28+
name: Bazel (${{ matrix.os }})
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
os: [macOS, Linux]
33+
include:
34+
- os: macOS
35+
runs-on: macos-26
36+
baseline: bazel.json
37+
- os: Linux
38+
runs-on: ubuntu-latest
39+
container: swift:latest
40+
cc: clang
41+
baseline: linux-bazel.json
42+
runs-on: ${{ matrix.runs-on }}
43+
container: ${{ matrix.container }}
44+
env:
45+
CC: ${{ matrix.cc }}
2846
steps:
2947
- uses: actions/checkout@master
30-
- uses: jdx/mise-action@v2
3148
- uses: bazel-contrib/[email protected]
3249
with:
50+
bazelisk-version: 1.x
3351
bazelisk-cache: true
34-
disk-cache: ${{ github.workflow }}
52+
disk-cache: bazel-${{ matrix.os }}
3553
repository-cache: true
36-
- name: Check generated rules
37-
run: mise r gen-bazel-rules && git diff --quiet --exit-code
3854
- name: Scan
39-
run: bazel run //:periphery -- scan --bazel --quiet --strict --baseline baselines/bazel.json
55+
run: bazel run //:periphery -- scan --bazel --quiet --strict --baseline baselines/${{ matrix.baseline }}
4056
macOS:
4157
name: macOS
4258
strategy:

baselines/linux-bazel.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"v1":{"usrs":["import-Configuration-Sources\/ProjectDrivers\/XcodeProjectDriver.swift:2:5","import-Indexer-Sources\/ProjectDrivers\/XcodeProjectDriver.swift:4:5","import-Logger-Sources\/ProjectDrivers\/XcodeProjectDriver.swift:5:5","import-Shared-Sources\/ProjectDrivers\/XcodeProjectDriver.swift:6:5","import-SourceGraph-Sources\/ProjectDrivers\/XcodeProjectDriver.swift:7:5","import-TestShared-Tests\/PeripheryTests\/ObjcAccessibleRetentionTest.swift:2:1","import-TestShared-Tests\/PeripheryTests\/ObjcAnnotatedRetentionTest.swift:2:1","s:11SourceGraph15ProjectFileKindO10extensionsSaySSGvp","s:13ConfigurationAAC20_retainFilesMatchers33_99B696DD1FA930EA831ABFF16BC88E61LLSay15FilenameMatcherAEVGSgvp","s:13ConfigurationAAC21_indexExcludeMatchers33_99B696DD1FA930EA831ABFF16BC88E61LLSay15FilenameMatcherAEVGSgvp","s:6Shared14SetupSelectionO","s:6Shared17SetupGuideHelpersC6select8multipleAA0B9SelectionOSaySSG_tF","s:8Frontend13UpdateCheckerC13latestVersion33_996BB8CE205CF54754BD877559C8CCFELLSSSgvp","s:8Frontend13UpdateCheckerC5error33_996BB8CE205CF54754BD877559C8CCFELLs5Error_pSgvp","s:SS10ExtensionsE17withEscapedQuotesSSvp","s:SS10ExtensionsE4djb2Sivp","s:SS10ExtensionsE7djb2HexSSvp","import-Configuration-Tests\/AccessibilityTests\/RedundantPublicAccessibilityTest.swift:1:1","s:13Configuration15AbstractSettingP5resetyyF","s:13Configuration7SettingC5resetyyF","s:13ConfigurationAAC13resetMatchersyyF","s:13ConfigurationAAC5resetyyF","s:13SystemPackage8FilePathV10ExtensionsE5chdir7closureyyyKXE_tKF","s:14SyntaxAnalysis21UnusedParameterParserV5parse4file0F9ProtocolsSayAA8FunctionVG11SourceGraph0J4FileC_SbtKFZ","s:14SyntaxAnalysis8FunctionV8fullNameSSvp","s:13SystemPackage8FilePathV10ExtensionsE4globyShyACGSSFZ","s:10Extensions4Glob33_78772790CB7745B67917FD65D1BCE611LLC"]}}

0 commit comments

Comments
 (0)