diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..a3014a1 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,12 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: daily + timezone: Etc/UTC + open-pull-requests-limit: 10 + reviewers: + - str4d + assignees: + - str4d diff --git a/.github/workflows/lints.yml b/.github/workflows/lints.yml new file mode 100644 index 0000000..6e4111a --- /dev/null +++ b/.github/workflows/lints.yml @@ -0,0 +1,54 @@ +name: Lints + +# We only run these lints on trial-merges of PRs to reduce noise. +on: pull_request + +jobs: + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Clippy check + uses: auguwu/clippy-action@1.2.2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + all-features: true + deny: warnings + args: --all-targets + + doc-links: + name: Intra-doc links + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: cargo fetch + # Requires #![deny(rustdoc::broken_intra_doc_links)] in crates. + - name: Check intra-doc links + run: cargo doc --workspace --all-features --document-private-items + + fmt: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Check formatting + run: cargo fmt --all --check + + hacspec: + name: hacspec syntax + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - name: Install hax + run: nix profile install github:hacspec/hax + - name: Check syntax + run: cargo hax json plonkish-relation + - name: Check compilation to Coq + run: cargo hax into coq plonkish-relation + - name: Check compilation to Easycrypt + run: cargo hax into easycrypt plonkish-relation + - name: Check compilation to F* + run: cargo hax into fstar plonkish-relation diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..27b915f --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,19 @@ +name: Tests + +on: [push, pull_request] + +jobs: + test: + name: Run on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + + steps: + - uses: actions/checkout@v3 + - run: cargo fetch + - name: Build tests + run: cargo build --workspace --verbose --all-features --tests + - name: Run tests + run: cargo test --workspace --verbose --all-features diff --git a/plonkish-encoding/Cargo.toml b/plonkish-encoding/Cargo.toml index d31360f..6de24d7 100644 --- a/plonkish-encoding/Cargo.toml +++ b/plonkish-encoding/Cargo.toml @@ -7,3 +7,6 @@ description = "An encoding format for PLONKish arithmetic circuits" license.workspace = true [dependencies] + +[dev-dependencies] +plonkish-relation = { path = "../plonkish-relation" } diff --git a/plonkish-encoding/src/lib.rs b/plonkish-encoding/src/lib.rs index 8b13789..9dd0e43 100644 --- a/plonkish-encoding/src/lib.rs +++ b/plonkish-encoding/src/lib.rs @@ -1 +1 @@ - +#![deny(rustdoc::broken_intra_doc_links)] diff --git a/plonkish-relation/Cargo.toml b/plonkish-relation/Cargo.toml index 64294a1..ad0cdc0 100644 --- a/plonkish-relation/Cargo.toml +++ b/plonkish-relation/Cargo.toml @@ -7,3 +7,4 @@ description = "Specification of the PLONKish relation in hacspec" license.workspace = true [dependencies] +hacspec-lib = { git = "https://github.com/hacspec/hacspec.git", rev = "00601ff65cc9a745c5191282986721d0fcb5f4f7" } diff --git a/plonkish-relation/src/lib.rs b/plonkish-relation/src/lib.rs index 8b13789..9dd0e43 100644 --- a/plonkish-relation/src/lib.rs +++ b/plonkish-relation/src/lib.rs @@ -1 +1 @@ - +#![deny(rustdoc::broken_intra_doc_links)] diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..70ab29d --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "nightly-2023-01-15" +components = ["clippy", "rustfmt"]