From 9eb12e04678dcbe8113c1eb26492f0638d8370be Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Tue, 3 Dec 2019 20:00:16 +0900 Subject: [PATCH] Use GitHub Actions (#71) --- .github/workflows/main.yml | 58 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..619b6988 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,58 @@ +name: CI + +on: [push, pull_request] + +jobs: + build_and_test: + strategy: + fail-fast: false + matrix: + toolchain: + - x86_64-pc-windows-msvc + - x86_64-pc-windows-gnu + - i686-pc-windows-msvc + - x86_64-apple-darwin + version: + - stable + - nightly + include: + - toolchain: x86_64-pc-windows-msvc + os: windows-latest + - toolchain: x86_64-pc-windows-gnu + os: windows-latest + - toolchain: i686-pc-windows-msvc + os: windows-latest + - toolchain: x86_64-apple-darwin + os: macOS-latest + + name: ${{ matrix.version }} - ${{ matrix.toolchain }} + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@master + + - name: Install ${{ matrix.version }} + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.version }}-${{ matrix.toolchain }} + default: true + + - name: check nightly + if: matrix.version == 'nightly' + uses: actions-rs/cargo@v1 + with: + command: check + args: --all --benches --bins --examples --tests + + - name: check stable + if: matrix.version == 'stable' + uses: actions-rs/cargo@v1 + with: + command: check + args: --all --bins --examples --tests + + - name: tests + uses: actions-rs/cargo@v1 + with: + command: test + args: --all --all-features -- --nocapture