Fixed VERBOSE
env var reading in Makefile
#162
Workflow file for this run
This file contains hidden or 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: 'Test' | |
on: | |
pull_request: | |
branches: [ "master" ] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
code-quality: | |
name: "Code Quality" | |
runs-on: [self-hosted, linux, normal] | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v4 | |
with: | |
# Check out pull request HEAD instead of merge commit. | |
ref: ${{ github.event.pull_request.head.sha }} | |
submodules: recursive | |
- name: "Set up nightly Rust" # https://github.com/rust-lang/rustup/issues/3409 | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly-2024-11-29 # Hardcoded version, same as is in the build.rs | |
- name: 'Build stable-mir-json' # rustfmt documentation claims it is unstable on code that doesn't build | |
run: | | |
cargo build -vv | |
- name: "Check `cargo clippy`" | |
run: | | |
rustup component add clippy | |
cargo clippy -- -Dwarnings | |
- name: "Check `cargo fmt`" | |
run: | | |
rustup component add rustfmt | |
cargo fmt --check | |
integration-tests: | |
needs: code-quality | |
name: "Integration tests" | |
runs-on: [self-hosted, linux, normal] | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v4 | |
with: | |
# Check out pull request HEAD instead of merge commit. | |
ref: ${{ github.event.pull_request.head.sha }} | |
submodules: recursive | |
- name: "Set up nightly Rust" # https://github.com/rust-lang/rustup/issues/3409 | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly-2024-11-29 # Hardcoded version, same as is in the build.rs | |
- name: 'Build stable-mir-json' | |
run: | # Warning check should be redundant since code-quality runs first | |
RUSTFLAGS='--deny warnings' cargo build -vv | |
- name: 'Run smir integration tests' | |
run: | | |
which jq | |
jq --version | |
make integration-test | |
ui-tests: | |
needs: code-quality | |
name: "ui-tests" | |
runs-on: [self-hosted, linux, normal] | |
steps: | |
- name: 'Check out code' | |
uses: actions/checkout@v4 | |
with: | |
# Check out pull request HEAD instead of merge commit. | |
ref: ${{ github.event.pull_request.head.sha }} | |
submodules: recursive | |
- name: 'Check out Rust repo' | |
uses: actions/checkout@v4 | |
with: | |
repository: rust-lang/rust | |
ref: a2545fd6fc66b4323f555223a860c451885d1d2b # hash of Hardcoded Rust version | |
path: rust | |
fetch-depth: 1 | |
- name: "Set up nightly Rust" # https://github.com/rust-lang/rustup/issues/3409 | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly-2024-11-29 # Hardcoded version, same as is in the build.rs | |
- name: 'Build stable-mir-json' | |
run: | # Warning check should be redundant since code-quality runs first | |
RUSTFLAGS='--deny warnings' cargo build -vv | |
- name: 'Run smir integration tests' | |
run: | | |
RUST_DIR_ROOT='rust' VERBOSE=1 make test-ui |