Add new flag to add copyright #11
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: Rust | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
RUSTDOCFLAGS: -D warnings | |
CC: clang | |
CXX: clang++ | |
jobs: | |
build: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Lint | |
run: cargo clippy --all-targets -- -D clippy::all -D unused | |
- name: Build statically linked compiler | |
run: | | |
rustup target add x86_64-unknown-linux-musl | |
cargo build --target x86_64-unknown-linux-musl --profile opt | |
- name: Upload statically linked compiler | |
uses: actions/upload-artifact@v4 | |
with: | |
name: idlc | |
path: target/x86_64-unknown-linux-musl/opt/idlc | |
format: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Formatting | |
run: cargo fmt --check | |
documentation: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Documentation | |
run: cargo doc --document-private-items | |
tests: | |
needs: build | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run unit tests | |
run: cargo test | |
- name: Run Rust+C integration test | |
env: | |
IDLC: "../target/debug/idlc" | |
run: | | |
cargo build | |
cd tests | |
cargo test | |
cargo test --release | |
rustup toolchain install nightly | |
rustup +nightly component add rust-src miri | |
cargo clean && RUSTFLAGS="-Zsanitizer=address" CFLAGS="-fsanitize=address" CXXFLAGS="-fsanitize=address" cargo +nightly test -Zbuild-std --target $(rustc -vV | awk '/^host/ { print $2 }') | |
cargo clean && RUSTFLAGS="-Zsanitizer=address" CFLAGS="-fsanitize=address" CXXFLAGS="-fsanitize=address" cargo +nightly test -Zbuild-std --target $(rustc -vV | awk '/^host/ { print $2 }') --release | |
cargo clean && cargo +nightly miri test |