arnaucube
arnaucube/miden-cryptoPublic Self-hosted repository
miden-crypto/.github/workflows/ci.yml
.github/workflows/ci.ymlRaw
  1name: CI
  2on:
  3  push:
  4    branches:
  5      - main
  6  pull_request:
  7    types: [opened, repoened, synchronize]
  8
  9jobs:
 10  build:
 11    name: Build ${{matrix.toolchain}} on ${{matrix.os}} with ${{matrix.args}}
 12    runs-on: ${{matrix.os}}-latest
 13    strategy:
 14      fail-fast: false
 15      matrix:
 16        toolchain: [stable, nightly]
 17        os: [ubuntu]
 18        target: [wasm32-unknown-unknown]
 19        args: [--no-default-features --target wasm32-unknown-unknown]
 20    steps:
 21      - uses: actions/checkout@main
 22        with:
 23          submodules: recursive
 24      - name: Install rust
 25        uses: actions-rs/toolchain@v1
 26        with:
 27          toolchain: ${{matrix.toolchain}}
 28          override: true
 29      - run: rustup target add ${{matrix.target}}
 30      - name: Test
 31        uses: actions-rs/cargo@v1
 32        with:
 33          command: build
 34          args: ${{matrix.args}}
 35
 36  test:
 37    name: Test ${{matrix.toolchain}} on ${{matrix.os}} with ${{matrix.features}}
 38    runs-on: ${{matrix.os}}-latest
 39    strategy:
 40      fail-fast: false
 41      matrix:
 42        toolchain: [stable, nightly]
 43        os: [ubuntu]
 44        features: ["--features default,std,serde", --no-default-features]
 45    steps:
 46      - uses: actions/checkout@main
 47        with:
 48          submodules: recursive
 49      - name: Install rust
 50        uses: actions-rs/toolchain@v1
 51        with:
 52          toolchain: ${{matrix.toolchain}}
 53          override: true
 54      - name: Test
 55        uses: actions-rs/cargo@v1
 56        with:
 57          command: test
 58          args: ${{matrix.features}}
 59
 60  clippy:
 61    name: Clippy with ${{matrix.features}}
 62    runs-on: ubuntu-latest
 63    strategy:
 64      fail-fast: false
 65      matrix:
 66        features: ["--features default,std,serde", --no-default-features]
 67    steps:
 68      - uses: actions/checkout@main
 69        with:
 70          submodules: recursive
 71      - name: Install minimal nightly with clippy
 72        uses: actions-rs/toolchain@v1
 73        with:
 74          profile: minimal
 75          toolchain: nightly
 76          components: clippy
 77          override: true
 78      - name: Clippy
 79        uses: actions-rs/cargo@v1
 80        with:
 81          command: clippy
 82          args: --all ${{matrix.features}} -- -D clippy::all -D warnings
 83
 84  rustfmt:
 85    name: rustfmt
 86    runs-on: ubuntu-latest
 87    steps:
 88      - uses: actions/checkout@main
 89      - name: Install minimal stable with rustfmt
 90        uses: actions-rs/toolchain@v1
 91        with:
 92          profile: minimal
 93          toolchain: stable
 94          components: rustfmt
 95          override: true
 96
 97      - name: rustfmt
 98        uses: actions-rs/cargo@v1
 99        with:
100          command: fmt
101          args: --all -- --check