Skip to content

Commit 9d74fbd

Browse files
committed
Specify Rust target for iOS
1 parent 8b17243 commit 9d74fbd

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

.github/workflows/ios-rust-ffi.yml

+18-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: iOS - Build and test Rust FFI (mullvad-ios)
33
on:
44
pull_request:
55
paths:
6-
- .github/workflows/clippy.yml
6+
- .github/workflows/ios-rust-ffi.yml
77
- clippy.toml
88
- '**/*.rs'
99
workflow_dispatch:
@@ -17,19 +17,27 @@ jobs:
1717
- name: Checkout repository
1818
uses: actions/checkout@v2
1919

20+
- name: Install Protoc
21+
uses: arduino/setup-protoc@v3
22+
with:
23+
repo-token: ${{ secrets.GITHUB_TOKEN }}
24+
2025
- name: Install Rust
2126
uses: actions-rs/toolchain@v1.0.6
2227
with:
2328
toolchain: stable
2429
target: ${{ matrix.target }}
30+
default: true
2531

2632
- name: Build and test crates
2733
shell: bash
2834
env:
2935
RUSTFLAGS: --deny warnings
36+
# NOTE: Tests actually target macOS here. This is because we do not have an iOS runner
37+
# handy.
3038
run: |
3139
source env.sh
32-
time cargo build --locked --verbose --lib -p mullvad-ios
40+
time cargo build --locked --verbose --lib -p mullvad-ios --target ${{ matrix.target }}
3341
time cargo test --locked --verbose --lib -p mullvad-ios
3442
3543
clippy-check-ios:
@@ -41,17 +49,23 @@ jobs:
4149
- name: Checkout repository
4250
uses: actions/checkout@v2
4351

52+
- name: Install Protoc
53+
uses: arduino/setup-protoc@v3
54+
with:
55+
repo-token: ${{ secrets.GITHUB_TOKEN }}
56+
4457
- name: Install Rust
4558
uses: actions-rs/toolchain@v1.0.6
4659
with:
4760
toolchain: stable
4861
target: ${{ matrix.target }}
62+
default: true
4963

5064
- name: Clippy check
5165
shell: bash
5266
env:
5367
RUSTFLAGS: --deny warnings
5468
run: |
5569
source env.sh
56-
time cargo clippy --locked --all-targets --no-default-features -p mullvad-ios
57-
time cargo clippy --locked --all-targets --all-features -p mullvad-ios
70+
time cargo clippy --locked --all-targets --no-default-features -p mullvad-ios --target ${{ matrix.target }}
71+
time cargo clippy --locked --all-targets --all-features -p mullvad-ios --target ${{ matrix.target }}

0 commit comments

Comments
 (0)