arnaucube
arnaucube/ark-r1cs-stdPublic Self-hosted repository
ark-r1cs-std/.github/workflows/ci.yml
.github/workflows/ci.ymlRaw
  1name: CI
  2on:
  3  pull_request:
  4  push:
  5    branches:
  6      - master
  7env:
  8  RUST_BACKTRACE: 1
  9
 10jobs:
 11  style:
 12    name: Check Style
 13    runs-on: ubuntu-latest
 14    steps:
 15
 16    - name: Checkout
 17      uses: actions/checkout@v1
 18    - name: Install Rust
 19      uses: actions-rs/toolchain@v1
 20      with:
 21        profile: minimal
 22        toolchain: stable
 23        override: true
 24        components: rustfmt
 25
 26    - name: cargo fmt --check
 27      uses: actions-rs/cargo@v1
 28      with:
 29        command: fmt
 30        args: --all -- --check
 31
 32  test:
 33    name: Test
 34    runs-on: ubuntu-latest
 35    env:
 36      RUSTFLAGS: -Dwarnings
 37    strategy:
 38      matrix:
 39        rust:
 40          - stable
 41          - nightly
 42    steps:
 43      - name: Checkout
 44        uses: actions/checkout@v2
 45
 46      - name: Install Rust (${{ matrix.rust }})
 47        uses: actions-rs/toolchain@v1
 48        with:
 49          profile: minimal
 50          toolchain: ${{ matrix.rust }}
 51          override: true
 52
 53      - uses: actions/cache@v2
 54        with:
 55          path: |
 56            ~/.cargo/registry
 57            ~/.cargo/git
 58            target            
 59          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
 60
 61      - name: Check examples
 62        uses: actions-rs/cargo@v1
 63        with:
 64            command: check
 65            args: --examples --all
 66
 67      - name: Check examples with all features on stable
 68        uses: actions-rs/cargo@v1
 69        with:
 70            command: check
 71            args: --examples --all-features --all
 72        if: matrix.rust == 'stable'
 73
 74      - name: Check benchmarks on nightly
 75        uses: actions-rs/cargo@v1
 76        with:
 77            command: check
 78            args: --all-features --examples --all --benches
 79        if: matrix.rust == 'nightly'
 80
 81      - name: Test
 82        uses: actions-rs/cargo@v1
 83        with:
 84            command: test
 85            args: "--all \
 86                   --all-features \
 87                   --exclude cp-benches "
 88
 89  check_no_std:
 90    name: Check no_std
 91    runs-on: ubuntu-latest
 92    steps:
 93      - name: Checkout
 94        uses: actions/checkout@v2
 95
 96      - name: Install Rust (${{ matrix.rust }})
 97        uses: actions-rs/toolchain@v1
 98        with:
 99          toolchain: stable
100          target: thumbv6m-none-eabi
101          override: true
102
103      - name: Install Rust ARM64 (${{ matrix.rust }})
104        uses: actions-rs/toolchain@v1
105        with:
106          toolchain: stable
107          target: aarch64-unknown-none
108          override: true
109
110      - uses: actions/cache@v2
111        with:
112          path: |
113            ~/.cargo/registry
114            ~/.cargo/git
115            target            
116          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
117
118      - name: r1cs-std
119        run: |
120          cd r1cs-std
121          cargo build -p r1cs-std --no-default-features --target aarch64-unknown-none
122          cargo check --examples -p r1cs-std --no-default-features --target aarch64-unknown-none
123          cd ..          
124
125      - name: crypto-primitives
126        run: |
127          cd crypto-primitives
128          cargo build -p crypto-primitives --no-default-features --target aarch64-unknown-none
129          cargo check --examples -p crypto-primitives --no-default-features --target aarch64-unknown-none
130          cd ..