Skip to content

Rewrite io + Enable CI #8

Rewrite io + Enable CI

Rewrite io + Enable CI #8

Workflow file for this run

name: Check
on:
- push
- pull_request
env:
CARGO_NET_RETRY: 10
CI: 1
RUSTUP_MAX_RETRIES: 10
jobs:
build:
name: CI (Ubuntu)
runs-on: ubuntu-latest
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- i686-unknown-linux-gnu
env:
CARGO_BUILD_TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: ${{ matrix.target }}
profile: minimal
override: true
components: clippy
- name: Install System packages
run: |
sudo apt update
sudo apt install gcc-multilib nasm
- name: Clippy
run: cargo clippy
env:
RUSTFLAGS: "-D warnings -A clippy::missing_safety_doc"
- name: Test
run: cargo test --lib -- --test-threads 1
env:
RUSTFLAGS: ""
- name: Check C
run: |
python ./scripts/build-and-judge.py ${{ runner.temp }} ./release.sh C ./src/solution.rs ./tests/boj_1000.in ./tests/boj_1000.out
- name: Check Rust
run: |
python ./scripts/build-and-judge.py ${{ runner.temp }} ./release-rs.sh Rust ./src/solution.rs ./tests/boj_1000.in ./tests/boj_1000.out
- name: Check Rust (BOJ 1001)
run: |
python ./scripts/build-and-judge.py ${{ runner.temp }} ./release-rs.sh Rust ./tests/boj_1001.rs ./tests/boj_1001.in ./tests/boj_1001.out
- name: Check Rust (BOJ 3745)
run: |
python ./scripts/build-and-judge.py ${{ runner.temp }} ./release-rs.sh Rust ./tests/boj_3745.rs ./tests/boj_3745.in ./tests/boj_3745.out