diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..399932d --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,62 @@ +name: CI + +jobs: + check: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly-2021-07-27 + override: true + components: rustfmt, clippy + - name: Check code format + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + - name: Clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-20.04, macos-latest] + steps: + - uses: actions/checkout@v2 + with: + submodules: 'recursive' + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly-2021-07-27 + components: rust-src + - name: Build + run: | + cd code + cargo build +# uses: actions-rs/cargo@v1 +# with: +# command: build + + test: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-20.04, macos-latest] + steps: + - uses: actions/checkout@v2 + with: + submodules: 'recursive' + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly-2021-07-27 + components: rust-src + - name: Test + run: | + cd code + cargo test