Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify Rust target in iOS workflow #6637

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions .github/workflows/ios-rust-ffi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: iOS - Build and test Rust FFI (mullvad-ios)
on:
pull_request:
paths:
- .github/workflows/clippy.yml
- .github/workflows/ios-rust-ffi.yml
- clippy.toml
- '**/*.rs'
workflow_dispatch:
Expand All @@ -17,19 +17,27 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
target: ${{ matrix.target }}
default: true

- name: Build and test crates
shell: bash
env:
RUSTFLAGS: --deny warnings
# NOTE: Tests actually target macOS here. This is because we do not have an iOS runner
# handy.
run: |
source env.sh
time cargo build --locked --verbose --lib -p mullvad-ios
time cargo build --locked --verbose --lib -p mullvad-ios --target ${{ matrix.target }}
time cargo test --locked --verbose --lib -p mullvad-ios

clippy-check-ios:
Expand All @@ -41,17 +49,23 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Rust
uses: actions-rs/toolchain@v1.0.6
with:
toolchain: stable
target: ${{ matrix.target }}
default: true

- name: Clippy check
shell: bash
env:
RUSTFLAGS: --deny warnings
run: |
source env.sh
time cargo clippy --locked --all-targets --no-default-features -p mullvad-ios
time cargo clippy --locked --all-targets --all-features -p mullvad-ios
time cargo clippy --locked --all-targets --no-default-features -p mullvad-ios --target ${{ matrix.target }}
time cargo clippy --locked --all-targets --all-features -p mullvad-ios --target ${{ matrix.target }}
Loading