Files
cs420/.github/workflows/ci.yml
Minseong Jang 9da544d942 Fix ci
2022-02-23 23:08:25 +09:00

42 lines
1.1 KiB
YAML

name: CI
on:
pull_request:
push:
branches:
- staging
- trying
defaults:
run:
shell: bash
jobs:
ci:
name: ci
runs-on: [self-hosted, ubuntu-20.04]
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true
components: rust-src, rustfmt, clippy
- name: Install Clang
run: sudo apt-get update && sudo apt-get install -yy clang
- name: Install RISC-V
run: (echo 'Acquire::http { Proxy "http://10.22.0.2:3142"; }' | sudo tee -a /etc/apt/apt.conf.d/01proxy) && sudo apt-get update && sudo apt-get install -yy gcc-riscv64-linux-gnu g++-riscv64-linux-gnu qemu-user-static
- name: Check
run: cargo check --all --verbose
- name: Rustfmt
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all -- -D warnings
- name: Test (Debug)
run: RUST_MIN_STACK=33554432 cargo test
- name: Test (Release)
run: RUST_MIN_STACK=33554432 cargo test --release
- name: Bench
run: cd bench; make run