Skip to content
Open
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
107 changes: 98 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,25 @@ jobs:

steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: cachix/install-nix-action@9280e7aca88deada44c930f1e2c78e21c3ae3edd # v31.7.0
with:
install_url: https://releases.nixos.org/nix/nix-2.31.2/install
github_access_token: "${{ secrets.GITHUB_TOKEN }}"
- name: Set Git credentials
run: |
git config --global 'url.https://api@github.com/'.insteadOf 'https://github.com/'
git config --global 'url.https://ssh@github.com/'.insteadOf 'ssh://git@github.com/'
git config --global 'url.https://git@github.com/'.insteadOf 'git@github.com:'
- uses: cachix/cachix-action@v17
with:
name: veridise-public
authToken: '${{ secrets.CACHIX_PUBLIC_TOKEN }}'
- name: Set nix environment
uses: nicknovitski/nix-develop@v1
env:
CI_BOT_PAT: "${{ secrets.CI_BUILD_TOKEN }}"
- name: Cache cargo crates
uses: actions/cache@v5
with:
Expand All @@ -26,8 +45,10 @@ jobs:
~/.cargo/git
target
key: ${{ runner.os }}-${{ matrix.BUILD_TARGET }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run tests for `core`
run: cargo test --profile ${{ matrix.BUILD_TARGET }} --all-features -p haloumi-core
- name: Build in "${{ matrix.BUILD_TARGET }}" mode
run: cargo build --profile ${{ matrix.BUILD_TARGET }} --all-features
- name: Run tests in "${{ matrix.BUILD_TARGET }}" mode
run: cargo test --profile ${{ matrix.BUILD_TARGET }} --all-features

doc-links:
if: github.event.pull_request.draft == false
Expand All @@ -36,8 +57,25 @@ jobs:

steps:
- uses: actions/checkout@v6
- name: 'Install rust-toolchain.toml'
run: rustup toolchain install
with:
persist-credentials: false
- uses: cachix/install-nix-action@9280e7aca88deada44c930f1e2c78e21c3ae3edd # v31.7.0
with:
install_url: https://releases.nixos.org/nix/nix-2.31.2/install
github_access_token: "${{ secrets.GITHUB_TOKEN }}"
- name: Set Git credentials
run: |
git config --global 'url.https://api@github.com/'.insteadOf 'https://github.com/'
git config --global 'url.https://ssh@github.com/'.insteadOf 'ssh://git@github.com/'
git config --global 'url.https://git@github.com/'.insteadOf 'git@github.com:'
- uses: cachix/cachix-action@v17
with:
name: veridise-public
authToken: '${{ secrets.CACHIX_PUBLIC_TOKEN }}'
- name: Set nix environment
uses: nicknovitski/nix-develop@v1
env:
CI_BOT_PAT: "${{ secrets.CI_BUILD_TOKEN }}"
- name: cargo fetch
run: cargo fetch

Expand All @@ -59,15 +97,66 @@ jobs:

clippy:
if: github.event.pull_request.draft == false
name: Clippy
name: Run clippy
timeout-minutes: 30
runs-on: ubuntu-latest


steps:
- uses: actions/checkout@v6
- name: 'Install rust-toolchain.toml'
run: rustup toolchain install
with:
persist-credentials: false
- uses: cachix/install-nix-action@9280e7aca88deada44c930f1e2c78e21c3ae3edd # v31.7.0
with:
install_url: https://releases.nixos.org/nix/nix-2.31.2/install
github_access_token: "${{ secrets.GITHUB_TOKEN }}"
- name: Set Git credentials
run: |
git config --global 'url.https://api@github.com/'.insteadOf 'https://github.com/'
git config --global 'url.https://ssh@github.com/'.insteadOf 'ssh://git@github.com/'
git config --global 'url.https://git@github.com/'.insteadOf 'git@github.com:'
- uses: cachix/cachix-action@v17
with:
name: veridise-public
authToken: '${{ secrets.CACHIX_PUBLIC_TOKEN }}'
- name: Set nix environment
uses: nicknovitski/nix-develop@v1
env:
CI_BOT_PAT: "${{ secrets.CI_BUILD_TOKEN }}"

- name: Run Clippy on `haloumi-core`
if: always()
run: cargo clippy -p haloumi-core --all-targets --all-features -- -Dwarnings --no-deps

- name: Run Clippy on `haloumi-lowering`
if: always()
run: cargo clippy -p haloumi-lowering --all-targets --all-features -- -Dwarnings --no-deps

- name: Run Clippy on `haloumi-ir`
if: always()
run: cargo clippy -p haloumi-ir --all-targets --all-features -- -Dwarnings --no-deps

- name: Run Clippy on `haloumi-synthesis`
if: always()
run: cargo clippy -p haloumi-synthesis --all-targets --all-features -- -Dwarnings --no-deps

- name: Run Clippy on `haloumi-ir-gen`
if: always()
run: cargo clippy -p haloumi-ir-gen --all-targets --all-features -- -Dwarnings --no-deps

- name: Run Clippy on `haloumi-backend`
if: always()
run: cargo clippy -p haloumi-backend --all-targets --all-features -- -Dwarnings --no-deps

# TODO: Fix the warnings in this crate before enabling this step.
# - name: Run Clippy on `haloumi-picus`
# if: always()
# run: cargo clippy -p haloumi-picus --all-targets --all-features -- -Dwarnings --no-deps

- name: Run Clippy on `haloumi-llzk`
if: always()
run: cargo clippy -p haloumi-llzk --all-targets --all-features -- -Dwarnings --no-deps

- name: Run Clippy on `core`
- name: Run Clippy on `haloumi`
if: always()
run: cargo clippy -p haloumi-core --all-targets --all-features -- -Dwarnings
run: cargo clippy -p haloumi --all-targets --all-features -- -Dwarnings --no-deps
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
debug/
target/

build-tools/

# These are backup files generated by rustfmt
**/*.rs.bk

Expand Down
8 changes: 4 additions & 4 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use_try_shorthand = true
use_field_init_shorthand = true
force_explicit_abi = true
disable_all_formatting = false
unstable_features = true
wrap_comments = true
normalize_comments = true
comment_width = 100
# unstable_features = true
# wrap_comments = true
# normalize_comments = true
# comment_width = 100
Loading