name: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Initialize Lean
run: |
wget https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -O elan-init.sh
bash elan-init.sh -y
echo "$HOME/.elan/bin" >> $GITHUB_PATH
- name: Initialize Rustup
run: |
rustup toolchain install nightly --component rustfmt clippy --profile minimal --force
rustup override set nightly
- name: Run build
run: cargo build --verbose
- name: Build Release
run: cargo build --release --verbose
- name: Run rustfmt
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --all -- --deny warnings
- name: Run debug tests
run: cargo test --verbose --no-default-features --features=mimalloc
- name: Run release tests
run: cargo test --verbose --release --no-default-features --features=mimalloc