Skip to content

Refactor judger code #55

Refactor judger code

Refactor judger code #55

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-20.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
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libseccomp-dev protobuf-compiler gcc-11 g++-11
- name: Setup gcc/g++ 11
run: |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100
- 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