-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from LukasKalbertodt/gh-actions
Move to GitHub Actions for CI (plus minor improvements)
- Loading branch information
Showing
8 changed files
with
89 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [ master ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUSTFLAGS: --deny warnings | ||
|
||
jobs: | ||
style: | ||
name: 'Check basic style' | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Check basic style | ||
run: ./.github/check-basic-style.sh | ||
|
||
check: | ||
name: 'Build & test' | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
rust: | ||
- stable | ||
- beta | ||
- nightly | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
profile: minimal | ||
- name: Prepare cache key | ||
run: | | ||
cargo generate-lockfile | ||
cp Cargo.lock cache-fingerprint | ||
echo $RUSTFLAGS >> cache-fingerprint | ||
echo $(rustc -V) >> cache-fingerprint | ||
- name: Restore cargo cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('cache-fingerprint') }} | ||
- name: Build | ||
run: cargo build | ||
- name: Build benchmarks | ||
run: cargo build --benches --features=nightly-bench | ||
if: matrix.rust == 'nightly' | ||
- name: Run tests | ||
run: cargo test | ||
- name: Generate docs | ||
run: cargo doc | ||
|
||
# We do not use a cache here as Miri prefers a clean working directory anyway. | ||
check-miri: | ||
name: 'Run tests with miri' | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
override: true | ||
profile: minimal | ||
components: miri | ||
- name: "Miri setup" | ||
run: cargo miri setup | ||
- name: "Run tests with miri" | ||
run: cargo miri test |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters