Minimal codegen support: numbers and function parameters #40
This file contains 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: CI | |
on: [push, pull_request] | |
env: | |
RUSTDOCFLAGS: -D warnings | |
RUSTFLAGS: -D warnings | |
jobs: | |
clippy: | |
name: clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup show | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install packages | |
run: | | |
sudo apt-get install llvm-14-tools | |
- run: cargo clippy --manifest-path crates/Cargo.toml --all-features --all-targets -- -D warnings | |
test: | |
name: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup show | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install packages | |
run: | | |
sudo apt-get install llvm-14-tools | |
- run: ./y test | |
rustfmt: | |
name: rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup show | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install packages | |
run: | | |
sudo apt-get install llvm-14-tools | |
- run: ./y fmt --check | |
doc: | |
name: docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup show | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install packages | |
run: | | |
sudo apt-get install llvm-14-tools | |
- run: cargo doc --manifest-path crates/Cargo.toml | |
success: | |
needs: | |
- clippy | |
- test | |
- rustfmt | |
- doc | |
runs-on: ubuntu-latest | |
# GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency | |
# failed" as success. So we have to do some contortions to ensure the job fails if any of its | |
# dependencies fails. | |
if: always() # make sure this is never "skipped" | |
steps: | |
# Manually check the status of all dependencies. `if: failure()` does not work. | |
- name: check if any dependency failed | |
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}' |