-
Notifications
You must be signed in to change notification settings - Fork 62
91 lines (67 loc) · 2.02 KB
/
test.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: test
on:
push:
branches:
- master
pull_request:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Rust Version Info
run: rustc --version && cargo --version
- name: Cargo format
run: cargo fmt --all -- --check
- name: Run tests
run: |
RUSTFLAGS="-D warnings" cargo test -p swift-bridge \
-p swift-bridge-build \
-p swift-bridge-cli \
-p swift-bridge-ir \
-p swift-bridge-macro \
-p swift-integration-tests
swift-package-test:
runs-on: macos-14
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Add rust targets
run: rustup target add aarch64-apple-darwin x86_64-apple-darwin
- name: Run swift package tests
run: ./test-swift-packages.sh
integration-test:
runs-on: macos-14
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Add rust targets
run: rustup target add aarch64-apple-darwin x86_64-apple-darwin
- name: Run integration tests
run: ./test-swift-rust-integration.sh
build-examples:
runs-on: macos-14
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Add rust targets
run: rustup target add aarch64-apple-darwin x86_64-apple-darwin
- name: Build codegen-visualizer example
run: xcodebuild -project examples/codegen-visualizer/CodegenVisualizer/CodegenVisualizer.xcodeproj -scheme CodegenVisualizer
- name: Build async function example
run: ./examples/async-functions/build.sh
- name: Build Rust binary calls Swift Package examaple
run: cargo build -p rust-binary-calls-swift-package