Skip to content

CI: Run tests on all platforms and verify build #48

CI: Run tests on all platforms and verify build

CI: Run tests on all platforms and verify build #48

Workflow file for this run

name: Lint and Test
on:
push:
branches: main
pull_request:
jobs:
lint-and-test:
strategy:
matrix:
runner:
- macos-11
- macos-12
- macos-13
- macos-14
- ubuntu-latest
- windows-latest
rust-version:
- "1.72"
runs-on: "${{matrix.runner}}"
steps:
# TODO: Consider adding caching.
- name: Setup Rust
run: |
rustup default "${{matrix.rust-version}}"
rustup component add rustfmt clippy
- name: Check out sources
uses: actions/checkout@v4
with:
submodules: recursive
- name: Check formatting
run: cargo fmt --check
- name: Run linter
run: cargo clippy
- name: Run tests
run: cargo test
- name: Build Swift package (macOS only)
if: runner.os == 'macOS'
run: |
# TODO: build for own platform only
rustup target add \
aarch64-apple-darwin \
aarch64-apple-ios \
aarch64-apple-ios-sim \
x86_64-apple-darwin \
x86_64-apple-ios
make framework
CONCORDIUM_WALLET_CRYPTO_FRAMEWORK_PATH=./generated/ConcordiumWalletCryptoUniffi.xcframework \
swift build