-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run cargo tests on all platforms (#172)
- Loading branch information
Showing
4 changed files
with
107 additions
and
102 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,24 +14,34 @@ defaults: | |
shell: bash | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
build-test: | ||
strategy: | ||
matrix: | ||
target: [ 'x86_64-unknown-linux-gnu', 'aarch64-unknown-linux-gnu', 'x86_64-pc-windows-msvc', 'x86_64-apple-darwin', 'aarch64-apple-darwin', 'wasm32-unknown-unknown' ] | ||
include: | ||
- target: x86_64-unknown-linux-gnu | ||
os: ubuntu-latest | ||
- target: aarch64-unknown-linux-gnu | ||
os: ubuntu-latest | ||
- target: x86_64-pc-windows-msvc | ||
os: windows-latest | ||
- target: x86_64-apple-darwin | ||
os: macos-latest | ||
- target: aarch64-apple-darwin | ||
os: macos-latest | ||
- target: wasm32-unknown-unknown | ||
os: ubuntu-latest | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache | ||
id: rust-cache | ||
uses: actions/cache@v3 | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup cache | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }} | ||
save-if: ${{ github.ref == 'refs/heads/main' }} | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
|
@@ -40,32 +50,27 @@ jobs: | |
components: rustfmt, clippy | ||
default: true | ||
|
||
- name: Compile | ||
- name: Build | ||
run: cargo build --target=${{ matrix.target }} | ||
|
||
ci: | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest"] | ||
|
||
runs-on: ${{ matrix.os }} | ||
- name: Run tests | ||
if: ${{ !contains(matrix.os, 'windows') }} | ||
# Skip tests on Windows as compaction tests are not supported | ||
run: make test | ||
|
||
ci: | ||
runs-on: ubuntu-latest | ||
env: | ||
RUSTFLAGS: --deny warnings | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache | ||
id: rust-cache | ||
uses: actions/cache@v3 | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup cache | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml', '.github/workflows/*.yml') }} | ||
save-if: ${{ github.ref == 'refs/heads/main' }} | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
|
@@ -74,13 +79,13 @@ jobs: | |
default: true | ||
|
||
- name: Install cargo-deny | ||
run: cargo install --debug --locked [email protected] | ||
run: which cargo-deny || cargo install --debug --locked [email protected] | ||
|
||
- name: Run tests | ||
run: make test | ||
- name: License check | ||
run: cargo deny --all-features check licenses | ||
|
||
- name: Clippy | ||
run: cargo clippy --all --all-targets -- -Dwarnings | ||
|
||
- name: Format | ||
run: cargo fmt --all -- --check | ||
run: cargo fmt --all -- --check |
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 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