diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..faf9594 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index abe0621..0000000 --- a/.travis.yml +++ /dev/null @@ -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