2021-07-23 13:22:42 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
|
2022-11-16 17:00:02 +01:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2019-10-31 19:53:54 +01:00
|
|
|
name: CI
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
name: Lint
|
2021-07-26 13:06:53 +02:00
|
|
|
runs-on: macos-11
|
2019-10-31 19:53:54 +01:00
|
|
|
env:
|
2021-07-26 13:06:53 +02:00
|
|
|
DEVELOPER_DIR: /Applications/Xcode_12.5.app
|
2019-10-31 19:53:54 +01:00
|
|
|
steps:
|
2022-11-16 17:00:02 +01:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2019-10-31 19:53:54 +01:00
|
|
|
with:
|
2022-11-16 17:00:02 +01:00
|
|
|
components: "clippy, rustfmt"
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
2019-10-31 19:53:54 +01:00
|
|
|
# make sure all code has been formatted with rustfmt
|
2021-07-23 13:22:42 +02:00
|
|
|
- run: cargo fmt --all -- --check --color always
|
2019-10-31 19:53:54 +01:00
|
|
|
# run clippy to verify we have no warnings
|
2021-07-23 13:22:42 +02:00
|
|
|
- run: cargo fetch --target x86_64-apple-darwin
|
|
|
|
- run: cargo clippy --features pre-built -- -D warnings
|
2019-10-31 19:53:54 +01:00
|
|
|
|
2020-02-05 15:06:36 +01:00
|
|
|
cargo-deny:
|
2022-11-16 17:00:02 +01:00
|
|
|
runs-on: ubuntu-22.04
|
2020-02-05 15:06:36 +01:00
|
|
|
steps:
|
2022-11-16 17:00:02 +01:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
2020-05-11 09:51:50 +02:00
|
|
|
- uses: EmbarkStudios/cargo-deny-action@v1
|
2020-02-05 15:06:36 +01:00
|
|
|
|
2020-11-14 23:56:28 +01:00
|
|
|
test-source:
|
|
|
|
name: Test (source build)
|
2021-07-26 13:06:53 +02:00
|
|
|
runs-on: macos-11
|
2019-10-31 19:53:54 +01:00
|
|
|
env:
|
2021-07-26 13:06:53 +02:00
|
|
|
DEVELOPER_DIR: /Applications/Xcode_12.5.app
|
2019-10-31 19:53:54 +01:00
|
|
|
steps:
|
2022-11-16 17:00:02 +01:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
2021-07-23 13:22:42 +02:00
|
|
|
- run: cargo fetch --target x86_64-apple-darwin
|
|
|
|
- run: cargo build
|
2020-11-14 23:56:28 +01:00
|
|
|
|
|
|
|
test:
|
|
|
|
name: Test (pre-built)
|
2021-07-26 13:06:53 +02:00
|
|
|
runs-on: macos-11
|
2020-11-14 23:56:28 +01:00
|
|
|
env:
|
2021-07-26 13:06:53 +02:00
|
|
|
DEVELOPER_DIR: /Applications/Xcode_12.5.app
|
2020-11-14 23:56:28 +01:00
|
|
|
steps:
|
2022-11-16 17:00:02 +01:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
2021-07-23 13:22:42 +02:00
|
|
|
- run: cargo fetch --target x86_64-apple-darwin
|
|
|
|
- run: cargo build --verbose --features pre-built
|