Skip to content

Download all artifacts #9

Download all artifacts

Download all artifacts #9

Workflow file for this run

---
name: Build Swift
on:
pull_request:
push:
branches:
- "master"
- "DEVOPS-1525-swift-workflow-for-package-publishing"
workflow_dispatch:
jobs:
build:
runs-on: macos-13
strategy:
fail-fast: false
matrix:
settings:
- target: aarch64-apple-ios-sim
- target: aarch64-apple-ios
- target: x86_64-apple-ios
steps:
- name: Checkout repo
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: Install rust
uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0 # stable
with:
toolchain: 1.67.0 # https://github.com/cross-rs/cross/issues/1222
- name: Cache cargo registry
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0
with:
key: ${{ matrix.settings.target }}-cargo
- name: Rustup target
run: rustup target install ${{ matrix.settings.target }}
- name: Build native library
env:
IPHONEOS_DEPLOYMENT_TARGET: 13.0
RUSTFLAGS: "-C link-arg=-Wl,-application_extension"
run: cargo build --package bitwarden-uniffi --target ${{ matrix.settings.target }} --release
working-directory: languages/swift
- name: Upload artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: swift-${{ matrix.settings.target }}
path: ./target/${{ matrix.settings.target }}/release/libbitwarden_uniffi.a
if-no-files-found: error
combine:
runs-on: macos-13
needs: build
steps:
- name: Checkout repo
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: Install rust
uses: dtolnay/rust-toolchain@5cb429dd810e16ff67df78472fa81cf760f4d1c0 # stable
with:
toolchain: 1.67.0 # https://github.com/cross-rs/cross/issues/1222
- name: Cache cargo registry
uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2.7.0
with:
key: cargo-combine-cache
- name: Download artifacts
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
path: ./languages/swift/target