arnaucube
arnaucube/plonky2-ecdsaPublic Self-hosted repository
plonky2-ecdsa/.github/workflows/continuous-integration.yml
.github/workflows/continuous-integration.ymlRaw
 1name: Continuous Integration
 2
 3on:
 4  push:
 5    branches: [main]
 6  pull_request:
 7    branches:
 8      - "**"
 9  workflow_dispatch:
10    branches:
11      - "**"
12
13jobs:  
14  test:
15    name: Test Suite
16    runs-on: ubuntu-latest
17    if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
18    steps:
19      - name: Checkout sources
20        uses: actions/checkout@v2
21
22      - name: Install nightly toolchain
23        id: rustc-toolchain
24        uses: actions-rs/toolchain@v1
25        with:
26          profile: minimal
27          toolchain: nightly
28          override: true
29
30      - name: rust-cache
31        uses: actions/cache@v3
32        with:
33          path: |
34            ~/.cargo/bin/
35            ~/.cargo/registry/index/
36            ~/.cargo/registry/cache/
37            ~/.cargo/git/db/
38            target/            
39          key: rustc-test-${{ steps.rustc-toolchain.outputs.rustc_hash }}-cargo-${{ hashFiles('**/Cargo.toml') }}
40
41      - name: Run cargo test
42        uses: actions-rs/cargo@v1
43        with:
44          command: test
45          args: --workspace
46        env:
47          RUSTFLAGS: -Copt-level=3 -Cdebug-assertions -Coverflow-checks=y -Cdebuginfo=0
48          RUST_LOG: 1
49          CARGO_INCREMENTAL: 1
50          RUST_BACKTRACE: 1
51
52  lints:
53    name: Formatting and Clippy
54    runs-on: ubuntu-latest
55    if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
56    steps:
57      - name: Checkout sources
58        uses: actions/checkout@v2
59
60      - name: Install nightly toolchain
61        id: rustc-toolchain
62        uses: actions-rs/toolchain@v1
63        with:
64          profile: minimal
65          toolchain: nightly
66          override: true
67          components: rustfmt, clippy
68
69      - name: rust-cache
70        uses: actions/cache@v3
71        with:
72          path: |
73            ~/.cargo/bin/
74            ~/.cargo/registry/index/
75            ~/.cargo/registry/cache/
76            ~/.cargo/git/db/
77            target/            
78          key: rustc-lints-${{ steps.rustc-toolchain.outputs.rustc_hash }}-cargo-${{ hashFiles('**/Cargo.toml') }}
79
80      - name: Run cargo fmt
81        uses: actions-rs/cargo@v1
82        with:
83          command: fmt
84          args: --all -- --check
85        env:
86          CARGO_INCREMENTAL: 1
87
88      - name: Run cargo clippy
89        uses: actions-rs/cargo@v1
90        with:
91          command: clippy
92          args: --all-features --all-targets -- -D warnings -A incomplete-features
93        env:
94          # Seems necessary until https://github.com/rust-lang/rust/pull/115819 is merged.
95          CARGO_INCREMENTAL: 0