-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adapted CI configuration from travis to github
- Loading branch information
1 parent
5b941e0
commit ff985dd
Showing
1 changed file
with
133 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,133 @@ | ||
name: Rust | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
max-parallel: 2 | ||
matrix: | ||
rust: [stable, beta, nightly, 1.41.0] | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: ci-all-versions | ||
run: | | ||
rustup override set ${{ matrix.rust }} | ||
rustup install beta | ||
env CARGO_BUILD_JOBS=1 | ||
cd "${{github.workspace}}/examples/0_modules_and_interface_types/impl/" | ||
cargo +beta build | ||
cd "${{github.workspace}}/examples/1_trait_objects/plugin_0/" | ||
cargo +beta build | ||
cd "${{github.workspace}}/examples/1_trait_objects/plugin_1/" | ||
cargo +beta build | ||
cd "${{github.workspace}}/examples/2_nonexhaustive/implementation/" | ||
cargo +beta build | ||
cd "${{github.workspace}}/testing/0/impl_0/" | ||
cargo +beta build | ||
cd "${{github.workspace}}/testing/1 - loading errors/impl_1/" | ||
cargo +beta build | ||
cd "${{github.workspace}}/testing/1 - loading errors/non_abi_stable_lib/" | ||
cargo +beta build | ||
cd "${{github.workspace}}/testing/version_compatibility/impl_0" | ||
cargo +beta build | ||
cd "${{github.workspace}}/" | ||
rm Cargo.lock | ||
cd "${{github.workspace}}/examples/0_modules_and_interface_types/impl/" | ||
cargo check | ||
cd "${{github.workspace}}/examples/1_trait_objects/plugin_0/" | ||
cargo check | ||
cd "${{github.workspace}}/examples/1_trait_objects/plugin_1/" | ||
cargo check | ||
cd "${{github.workspace}}/examples/2_nonexhaustive/implementation/" | ||
cargo check | ||
cd "${{github.workspace}}/testing/0/impl_0/" | ||
cargo check | ||
cd "${{github.workspace}}/testing/1 - loading errors/impl_1/" | ||
cargo check | ||
cd "${{github.workspace}}/testing/1 - loading errors/non_abi_stable_lib/" | ||
cargo check | ||
cd "${{github.workspace}}/abi_stable" | ||
cargo check --no-default-features | ||
cd "${{github.workspace}}/abi_stable_derive" | ||
cargo test | ||
cd "${{github.workspace}}/abi_stable" | ||
cargo test --features "testing sabi_trait_examples" | ||
cd "${{github.workspace}}/examples/0_modules_and_interface_types/impl/" | ||
cargo test | ||
cd "${{github.workspace}}/examples/0_modules_and_interface_types/user/" | ||
cargo run -- run-tests | ||
cd "${{github.workspace}}/examples/1_trait_objects/application/" | ||
cargo run | ||
cd "${{github.workspace}}/examples/2_nonexhaustive/implementation/" | ||
cargo test | ||
cd "${{github.workspace}}/examples/2_nonexhaustive/user/" | ||
cargo run | ||
cd "${{github.workspace}}/testing/0/user_0/" | ||
cargo run | ||
cd "${{github.workspace}}/testing/1 - loading errors/user_1/" | ||
env "RETURN=ok" cargo run | ||
env "RETURN=error" cargo run | ||
env "RETURN=panic" cargo run | ||
cd "${{github.workspace}}/testing/version_compatibility/user_0" | ||
cargo run | ||
- uses: actions/checkout@v2 | ||
- name: ci-nighly | ||
if: ${{ matrix.rust == 'nightly' && runner.os == 'Linux' }} | ||
run: | | ||
env CARGO_BUILD_JOBS=1 | ||
rustup override set nightly | ||
cd "${{github.workspace}}/abi_stable/" | ||
MIRI_NIGHTLY=nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/miri) | ||
echo "Installing latest nightly with Miri" | ||
echo "$MIRI_NIGHTLY" | ||
rustup set profile minimal | ||
rustup default "$MIRI_NIGHTLY" | ||
rustup override set "$MIRI_NIGHTLY" | ||
rustup component add miri | ||
cargo miri setup | ||
env "MIRIFLAGS=-Zmiri-disable-isolation" cargo miri test --features testing | ||
cd "${{github.workspace}}" | ||
rm Cargo.lock | ||
cd "${{github.workspace}}/abi_stable/" | ||
cargo clean | ||
cargo update -Z minimal-versions | ||
cd "${{github.workspace}}/abi_stable/" | ||
cargo build | ||