-
Notifications
You must be signed in to change notification settings - Fork 5
86 lines (82 loc) · 2.99 KB
/
ios.yaml
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: ios
on:
push:
branches:
- main
pull_request:
# Cancel in-progress CI jobs when a new commit is pushed to a PR.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
pre_check:
name: pre_check
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.check_changes.outputs.run_tests }}
steps:
# Checkout repo to Github Actions runner
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: check for relevant changes
id: check_changes
run: |
./ci/check_bazel.sh //examples/swift:ios_app //platform/swift //test/platform/swift || ./ci/files_changed.sh .github/workflows/ios.yaml && ./ci/run_tests.sh
true
swift_hello_world:
name: swift_hello_world
timeout-minutes: 40
needs: "pre_check"
if: needs.pre_check.outputs.should_run == 'true'
runs-on: macos-14
steps:
# Checkout repo to Github Actions runner
- name: Checkout
uses: actions/checkout@v4
- name: 'Install dependencies'
run: ./ci/mac_ci_setup.sh
- run: ./bazelw build --config ci //examples/swift/hello_world:ios_app
name: 'Build app'
# TODO(snowp): Add some kind of assertion that the app does that it's supposed to
- run: ./bazelw run --config ci //examples/swift/hello_world:ios_app &> /tmp/envoy.log &
name: 'Run app'
macos_asan:
runs-on: macos-14
needs: "pre_check"
if: needs.pre_check.outputs.should_run == 'true'
steps:
# Checkout repo to Github Actions runner
- name: Checkout
uses: actions/checkout@v4
- name: 'Install dependencies'
run: ./ci/mac_ci_setup.sh
- name: Run tests (asan)
run: env -u ANDROID_NDK_HOME ./bazelw test //core/... //platform/... //test/platform/swift/unit_integration/... --test_tag_filters=macos_only --test_output=errors --build_tests_only --config ci --config asan
macos_tsan:
runs-on: macos-14
needs: "pre_check"
if: needs.pre_check.outputs.should_run == 'true'
steps:
# Checkout repo to Github Actions runner
- name: Checkout
uses: actions/checkout@v4
- name: 'Install dependencies'
run: ./ci/mac_ci_setup.sh
- name: Run iOS tests (tsan)
run: env -u ANDROID_NDK_HOME ./bazelw test $(./bazelw query 'kind(ios_unit_test, //test/platform/swift/unit_integration/core/...)') --test_tag_filters=macos_only --test_output=errors --config ci --config ios-tsan
verify_ios:
runs-on: ubuntu-latest
needs: ["macos_tsan", "macos_asan", "swift_hello_world"]
if: always()
steps:
# Checkout repo to Github Actions runner
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- run: |
./ci/check_result.sh ${{ needs.macos_tsan.result }} \
&& ./ci/check_result.sh ${{ needs.macos_asan.result }} \
&& ./ci/check_result.sh ${{ needs.swift_hello_world.result }}