mirror of
https://github.com/italicsjenga/ash-molten.git
synced 2024-12-23 21:31:30 +11:00
Switch from Travis to GitHub Actions (#8)
Speeds up builds from 37 min to 15 min
This commit is contained in:
parent
c2b15c989e
commit
9ee5e45bf6
43
.github/workflows/ci.yaml
vendored
Normal file
43
.github/workflows/ci.yaml
vendored
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
on: [push, pull_request]
|
||||||
|
name: CI
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
name: Lint
|
||||||
|
runs-on: macOS-latest
|
||||||
|
env:
|
||||||
|
DEVELOPER_DIR: /Applications/Xcode_11.1.app
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
|
||||||
|
# make sure all code has been formatted with rustfmt
|
||||||
|
- run: rustup component add rustfmt
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: fmt
|
||||||
|
args: --all -- --check --color always
|
||||||
|
|
||||||
|
# run clippy to verify we have no warnings
|
||||||
|
- run: rustup component add clippy
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: clippy
|
||||||
|
args: --all-features -- -D warnings
|
||||||
|
|
||||||
|
test:
|
||||||
|
name: Test
|
||||||
|
runs-on: macOS-latest
|
||||||
|
env:
|
||||||
|
DEVELOPER_DIR: /Applications/Xcode_11.1.app
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
30
.travis.yml
30
.travis.yml
|
@ -1,30 +0,0 @@
|
||||||
language: rust
|
|
||||||
|
|
||||||
rust:
|
|
||||||
- stable
|
|
||||||
matrix:
|
|
||||||
fast_finish: true
|
|
||||||
include:
|
|
||||||
- os: osx
|
|
||||||
osx_image: xcode10.2
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- rustup component add rustfmt clippy
|
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- RUST_BACKTRACE=1
|
|
||||||
|
|
||||||
script:
|
|
||||||
# Ensure everything has been rustfmt'ed
|
|
||||||
- cargo fmt -- --check
|
|
||||||
# Download in a separate step to separate
|
|
||||||
# building from fetching dependencies
|
|
||||||
- cargo fetch
|
|
||||||
# Build everything in a separate step to make a
|
|
||||||
# clear distinction between building and testing
|
|
||||||
- cargo test --no-run -vv
|
|
||||||
- cargo test --no-fail-fast -vv
|
|
||||||
# Because rust isn't brutal enough itself
|
|
||||||
# We need to run it after the build, otherwise clippy will try to build MoltenVK and travis will time out
|
|
||||||
- cargo clippy -- -D warnings
|
|
Loading…
Reference in a new issue