feat: add crate swift-rs

This commit is contained in:
2023-12-09 10:17:41 +08:00
parent d36c06f461
commit 215b75d6da
35 changed files with 2489 additions and 2 deletions

38
swift-rs/.github/workflows/main.yaml vendored Normal file
View File

@@ -0,0 +1,38 @@
name: Build
on:
push:
branches: [ master ]
pull_request:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
build:
name: Build
runs-on: macos-latest
strategy:
matrix:
rust: [stable, beta]
steps:
- uses: actions/checkout@v3
name: Checkout
- name: Install specific rust version
run: |
rustup install ${{ matrix.rust }} --profile minimal
rustup component add --toolchain ${{ matrix.rust }} rustfmt clippy
- name: Setup cache
uses: Swatinem/rust-cache@v2
- name: Test example
working-directory: example
run: cargo +${{ matrix.rust }} run
- name: Run Tests
env:
TEST_SWIFT_RS: "true"
run: cargo +${{ matrix.rust }} test --features build
- name: Check Code Formatting
run: cargo +${{ matrix.rust }} fmt --all -- --check
- name: Lints
run: cargo +${{ matrix.rust }} clippy -- -D warnings