2021-07-23 21:22:42 +10:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
|
2019-11-01 05:53:54 +11:00
|
|
|
name: CI
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
name: Lint
|
2020-11-10 07:31:47 +11:00
|
|
|
runs-on: macos-latest
|
2019-11-01 05:53:54 +11:00
|
|
|
env:
|
2020-11-10 07:31:47 +11:00
|
|
|
DEVELOPER_DIR: /Applications/Xcode_12.1.app
|
2019-11-01 05:53:54 +11:00
|
|
|
steps:
|
2021-07-23 21:22:42 +10:00
|
|
|
- uses: actions/checkout@v2
|
2019-11-01 05:53:54 +11:00
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
# make sure all code has been formatted with rustfmt
|
|
|
|
- run: rustup component add rustfmt
|
2021-07-23 21:22:42 +10:00
|
|
|
- run: cargo fmt --all -- --check --color always
|
2019-11-01 05:53:54 +11:00
|
|
|
# run clippy to verify we have no warnings
|
|
|
|
- run: rustup component add clippy
|
2021-07-23 21:22:42 +10:00
|
|
|
- run: cargo fetch --target x86_64-apple-darwin
|
|
|
|
- run: cargo clippy --features pre-built -- -D warnings
|
2019-11-01 05:53:54 +11:00
|
|
|
|
2020-02-06 01:06:36 +11:00
|
|
|
cargo-deny:
|
2021-07-23 21:22:42 +10:00
|
|
|
runs-on: ubuntu-20.04
|
2020-02-06 01:06:36 +11:00
|
|
|
steps:
|
2021-07-23 21:22:42 +10:00
|
|
|
- uses: actions/checkout@v2
|
2020-05-11 17:51:50 +10:00
|
|
|
- uses: EmbarkStudios/cargo-deny-action@v1
|
2020-02-06 01:06:36 +11:00
|
|
|
|
2020-11-15 09:56:28 +11:00
|
|
|
test-source:
|
|
|
|
name: Test (source build)
|
2020-11-10 07:31:47 +11:00
|
|
|
runs-on: macos-latest
|
2019-11-01 05:53:54 +11:00
|
|
|
env:
|
2020-11-10 07:31:47 +11:00
|
|
|
DEVELOPER_DIR: /Applications/Xcode_12.1.app
|
2019-11-01 05:53:54 +11:00
|
|
|
steps:
|
2021-07-23 21:22:42 +10:00
|
|
|
- uses: actions/checkout@v2
|
2019-11-01 05:53:54 +11:00
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
2021-07-23 21:22:42 +10:00
|
|
|
- run: cargo fetch --target x86_64-apple-darwin
|
|
|
|
- run: cargo build
|
2020-11-15 09:56:28 +11:00
|
|
|
|
|
|
|
test:
|
|
|
|
name: Test (pre-built)
|
|
|
|
runs-on: macos-latest
|
|
|
|
env:
|
|
|
|
DEVELOPER_DIR: /Applications/Xcode_12.1.app
|
|
|
|
steps:
|
2021-07-23 21:22:42 +10:00
|
|
|
- uses: actions/checkout@v2
|
2020-11-15 09:56:28 +11:00
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
2021-07-23 21:22:42 +10:00
|
|
|
- run: cargo fetch --target x86_64-apple-darwin
|
|
|
|
- run: cargo build --verbose --features pre-built
|