2019-09-11 09:16:26 +08:00
|
|
|
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- target: aarch64-unknown-linux-gnu
|
|
|
|
os: ubuntu-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: arm-unknown-linux-gnueabi
|
|
|
|
os: ubuntu-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: arm-unknown-linux-gnueabihf
|
|
|
|
os: ubuntu-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: i586-unknown-linux-gnu
|
|
|
|
os: ubuntu-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: i686-unknown-linux-gnu
|
|
|
|
os: ubuntu-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: mips-unknown-linux-gnu
|
|
|
|
os: ubuntu-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: mips64-unknown-linux-gnuabi64
|
|
|
|
os: ubuntu-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: mips64el-unknown-linux-gnuabi64
|
|
|
|
os: ubuntu-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: mipsel-unknown-linux-gnu
|
|
|
|
os: ubuntu-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: powerpc-unknown-linux-gnu
|
|
|
|
os: ubuntu-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: powerpc64-unknown-linux-gnu
|
|
|
|
os: ubuntu-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: powerpc64le-unknown-linux-gnu
|
|
|
|
os: ubuntu-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: thumbv6m-none-eabi
|
|
|
|
os: ubuntu-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: thumbv7em-none-eabi
|
|
|
|
os: ubuntu-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: thumbv7em-none-eabihf
|
|
|
|
os: ubuntu-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: thumbv7m-none-eabi
|
|
|
|
os: ubuntu-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: wasm32-unknown-unknown
|
|
|
|
os: ubuntu-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: x86_64-unknown-linux-gnu
|
|
|
|
os: ubuntu-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: x86_64-apple-darwin
|
|
|
|
os: macos-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: i686-pc-windows-msvc
|
|
|
|
os: windows-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: x86_64-pc-windows-msvc
|
|
|
|
os: windows-latest
|
|
|
|
rust: nightly
|
|
|
|
- target: i686-pc-windows-gnu
|
|
|
|
os: windows-latest
|
|
|
|
rust: nightly-i686-gnu
|
|
|
|
- target: x86_64-pc-windows-gnu
|
|
|
|
os: windows-latest
|
|
|
|
rust: nightly-x86_64-gnu
|
|
|
|
steps:
|
2019-12-04 01:11:29 +08:00
|
|
|
- uses: actions/checkout@v1
|
2019-09-11 09:16:26 +08:00
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- name: Install Rust (rustup)
|
|
|
|
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
|
2019-10-28 22:39:04 +08:00
|
|
|
shell: bash
|
2019-09-11 09:16:26 +08:00
|
|
|
- run: rustup target add ${{ matrix.target }}
|
2020-05-30 03:38:29 +08:00
|
|
|
- run: rustup component add llvm-tools-preview
|
2019-09-11 09:16:26 +08:00
|
|
|
- name: Download compiler-rt reference sources
|
|
|
|
run: |
|
2020-08-24 06:31:51 +08:00
|
|
|
curl -L -o code.tar.gz https://github.com/rust-lang/llvm-project/archive/rustc/10.0-2020-05-05.tar.gz
|
|
|
|
tar xzf code.tar.gz --strip-components 1 llvm-project-rustc-10.0-2020-05-05/compiler-rt
|
2019-09-11 09:16:26 +08:00
|
|
|
echo "##[set-env name=RUST_COMPILER_RT_ROOT]./compiler-rt"
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
# Non-linux tests just use our raw script
|
|
|
|
- run: ./ci/run.sh ${{ matrix.target }}
|
|
|
|
if: matrix.os != 'ubuntu-latest'
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
# Otherwise we use our docker containers to run builds
|
|
|
|
- run: cargo generate-lockfile && ./ci/run-docker.sh ${{ matrix.target }}
|
2020-05-30 03:38:29 +08:00
|
|
|
if: matrix.os == 'ubuntu-latest'
|
2019-09-11 09:16:26 +08:00
|
|
|
|
|
|
|
rustfmt:
|
|
|
|
name: Rustfmt
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2019-12-04 01:11:29 +08:00
|
|
|
- uses: actions/checkout@v1
|
2019-09-11 09:16:26 +08:00
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- name: Install Rust
|
|
|
|
run: rustup update stable && rustup default stable && rustup component add rustfmt
|
|
|
|
- run: cargo fmt -- --check
|