Add CI #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
permissions: | |
contents: read | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install targets | |
# A macOS ARM64 target and an iOS simulator target for fairly good coverage | |
run: rustup target add aarch64-apple-darwin x86_64-apple-ios | |
- name: Cache Cargo | |
uses: actions/cache@v4 | |
with: | |
path: | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Check formatting | |
run: cargo fmt -- --check | |
- name: Check builds | |
run: cargo build --target aarch64-apple-darwin --target x86_64-apple-ios |