-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
149: Switch CI to GitHub Actions r=cuviper a=cuviper Co-authored-by: Josh Stone <[email protected]>
- Loading branch information
Showing
9 changed files
with
253 additions
and
90 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,101 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- staging | ||
- trying | ||
|
||
jobs: | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: [ | ||
1.31.0, # 2018! | ||
1.32.0, # rand | ||
1.34.0, # quickcheck, has_try_from | ||
1.36.0, # alloc | ||
stable, | ||
beta, | ||
nightly | ||
] | ||
steps: | ||
- name: Rust install | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
profile: minimal | ||
override: true | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
- name: Test | ||
run: ./ci/test_full.sh | ||
|
||
# try a target with `BigDigit = u32` | ||
i686: | ||
name: Test (i686) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: System install | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install gcc-multilib | ||
- name: Rust install | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable-i686-unknown-linux-gnu | ||
profile: minimal | ||
override: true | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
- name: Test | ||
run: ./ci/test_full.sh | ||
|
||
# try a target that doesn't have std at all, but does have alloc | ||
no_std: | ||
name: No Std | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Rust install | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
target: thumbv6m-none-eabi | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --target thumbv6m-none-eabi --no-default-features --features "serde rand" | ||
|
||
fmt: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Rust install | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.42.0 | ||
profile: minimal | ||
override: true | ||
components: rustfmt | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Check formatting | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: master | ||
on: | ||
push: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: '0 0 * * 0' # 00:00 Sunday | ||
|
||
jobs: | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: [1.31.0, stable] | ||
steps: | ||
- name: Rust install | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
profile: minimal | ||
override: true | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
- name: Test | ||
run: ./ci/test_full.sh |
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,46 @@ | ||
name: PR | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: [1.31.0, stable] | ||
steps: | ||
- name: Rust install | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
profile: minimal | ||
override: true | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
- name: Test | ||
run: ./ci/test_full.sh | ||
|
||
fmt: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Rust install | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.42.0 | ||
profile: minimal | ||
override: true | ||
components: rustfmt | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Check formatting | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check |
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 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 |
---|---|---|
@@ -1,3 +1,12 @@ | ||
status = [ | ||
"continuous-integration/travis-ci/push", | ||
"Test (1.31.0)", | ||
"Test (1.32.0)", | ||
"Test (1.34.0)", | ||
"Test (1.36.0)", | ||
"Test (stable)", | ||
"Test (beta)", | ||
"Test (nightly)", | ||
"Test (i686)", | ||
"No Std", | ||
"Format", | ||
] |
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 |
---|---|---|
@@ -1,12 +1,10 @@ | ||
#!/bin/sh | ||
# Use rustup to locally run the same suite of tests as .travis.yml. | ||
# (You should first install/update all versions listed below.) | ||
# Use rustup to locally run the same suite of tests as .github/workflows/ | ||
# (You should first install/update all of the versions below.) | ||
|
||
set -ex | ||
|
||
export TRAVIS_RUST_VERSION | ||
for TRAVIS_RUST_VERSION in 1.31.0 1.32.0 1.34.0 1.36.0 stable beta nightly; do | ||
run="rustup run $TRAVIS_RUST_VERSION" | ||
$run cargo build --verbose | ||
$run $PWD/ci/test_full.sh | ||
ci=$(dirname $0) | ||
for version in 1.31.0 1.32.0 1.34.0 1.36.0 stable beta nightly; do | ||
rustup run "$version" "$ci/test_full.sh" | ||
done |
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