Prepare runguard #136
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust Check | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check format | |
run: cargo fmt --all -- --check | |
- name: Run clippy | |
# run: cargo clippy --all-targets --all-features -- -D warnings | |
run: cargo clippy --all-targets --all-features | |
- name: Install dependencies | |
run: sudo apt-get update && sudo apt-get install -y libseccomp-dev protobuf-compiler | |
- name: Check ENV | |
run: echo $(rustup --version && g++ -v) | |
- name: Build test dist | |
run: cd judge-core/tests/data/built-in-programs && ./build.sh && cd ../../../../ | |
- name: Run tests | |
# Currently use --test-threads=1 to avoid log mess | |
# Should only be used in judge-core later | |
run: RUST_LOG=info cargo test -- --nocapture --test-threads=1 |