Skip to content

Prepare runguard

Prepare runguard #138

Workflow file for this run

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 libcgroup-dev
- 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