Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up CI for repo #1

Merged
merged 1 commit into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
timezone: Etc/UTC
open-pull-requests-limit: 10
61 changes: 61 additions & 0 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
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/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
all-features: true
deny: warnings

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
working-directory: ./plonkish-relation

- name: Check compilation to Coq
run: cargo hax into coq
working-directory: ./plonkish-relation

- name: Check compilation to Easycrypt
run: cargo hax into easycrypt
working-directory: ./plonkish-relation

- name: Check compilation to F*
run: cargo hax into fstar
working-directory: ./plonkish-relation
19 changes: 19 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions plonkish-encoding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ description = "An encoding format for PLONKish arithmetic circuits"
license.workspace = true

[dependencies]

[dev-dependencies]
plonkish-relation = { path = "../plonkish-relation" }
2 changes: 1 addition & 1 deletion plonkish-encoding/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1 @@

#![deny(rustdoc::broken_intra_doc_links)]
2 changes: 1 addition & 1 deletion plonkish-relation/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1 +1 @@

#![deny(rustdoc::broken_intra_doc_links)]
3 changes: 3 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[toolchain]
channel = "stable"
components = ["clippy", "rustfmt"]