Skip to content

Add cross-platform GitHub Actions CI test workflows #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
on: [push, pull_request]

name: Rustfmt check

jobs:
fmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Run rustfmt check
run: |
rustup component add rustfmt
cargo fmt --version
cargo fmt -- --check || (echo "Please reformat your code with 'cargo fmt' (version $(cargo fmt --version))"; false)
36 changes: 36 additions & 0 deletions .github/workflows/linuxci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
on: [push, pull_request]

name: GNU/Linux CI

jobs:
check:
name: GNU/Linux CI
runs-on: ubuntu-latest
steps:
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

- uses: actions/checkout@v2
- name: Install latest stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
36 changes: 36 additions & 0 deletions .github/workflows/macosci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
on: [push, pull_request]

name: macOS CI

jobs:
check:
name: macOS CI
runs-on: macos-latest
steps:
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

- uses: actions/checkout@v2
- name: Install latest stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
20 changes: 20 additions & 0 deletions .github/workflows/windowsci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
on: [push, pull_request]

name: Windows CI

jobs:
check:
name: Windows CI
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install latest stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.