-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (64 loc) · 1.93 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Continuous Integration
on:
pull_request:
branches: [ main ]
schedule:
# Every day at 11:16 UTC.
- cron: '16 11 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
macos_build:
runs-on: macos-14
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.1'
- uses: cgrindel/gha_set_up_bazel@v1
with:
repo_name: rules_swiftformat
- uses: ./.github/actions/build_and_test
# See comment in BUILD.bazel for more details.
- name: Execute Integration Tests
shell: bash
run: |
bazelisk test //:macos_ci_integration_tests
ubuntu_build:
runs-on: ubuntu-22.04
env:
CC: clang
steps:
- uses: cgrindel/gha_install_swift_on_ubuntu@v1
id: install_swift
with:
swift_release_tag: "swift-5.7.2-RELEASE"
ubuntu_version: "22.04"
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: cgrindel/gha_set_up_bazel@v1
with:
repo_name: rules_swiftformat
- name: Update local.bazelrc with Linux Flags
shell: bash
run: |
cat >> "local.bazelrc" <<EOF
# Need to expose the PATH so that the Swift toolchain can be found
build --action_env=PATH
# Need to expose the LD_LIBRARY_PATH so that the Swift dynamic loaded
# so files can be found
build --action_env=LD_LIBRARY_PATH
EOF
- uses: ./.github/actions/build_and_test
- name: Execute Integration Tests
shell: bash
run: |
bazelisk test //:all_integration_tests
all_ci_tests:
runs-on: ubuntu-22.04
needs: [macos_build, ubuntu_build]
if: ${{ always() }}
steps:
- uses: cgrindel/gha_join_jobs@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}