ash-molten/.github/workflows/ci.yaml
Jake Shadle e3030ae381
Fixup CI (#59)
* Fixup CI

* Only fetch for default target
2021-07-23 13:22:42 +02:00

61 lines
1.5 KiB
YAML

on:
push:
branches:
- main
pull_request:
name: CI
jobs:
lint:
name: Lint
runs-on: macos-latest
env:
DEVELOPER_DIR: /Applications/Xcode_12.1.app
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
# make sure all code has been formatted with rustfmt
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check --color always
# run clippy to verify we have no warnings
- run: rustup component add clippy
- run: cargo fetch --target x86_64-apple-darwin
- run: cargo clippy --features pre-built -- -D warnings
cargo-deny:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: EmbarkStudios/cargo-deny-action@v1
test-source:
name: Test (source build)
runs-on: macos-latest
env:
DEVELOPER_DIR: /Applications/Xcode_12.1.app
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- run: cargo fetch --target x86_64-apple-darwin
- run: cargo build
test:
name: Test (pre-built)
runs-on: macos-latest
env:
DEVELOPER_DIR: /Applications/Xcode_12.1.app
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- run: cargo fetch --target x86_64-apple-darwin
- run: cargo build --verbose --features pre-built