Files
regalloc2/.github/workflows/rust.yml
Chris Fallin 4cac1614bf Add serde support for exposed types. (#40)
This adds derived `Serialize` and `Deserialize` implementations for
exposed types that describe registers, operands, and related program
inputs; entity indices; and regalloc output types. This allows
serialization of any of the embedder's IR data types that may embed or
build upon regalloc2 types.

These implementations (and the dependency on the `serde` crate itself)
are enabled only when the non-default `enable-serde` feature is
specified.
2022-04-13 10:14:00 -07:00

73 lines
2.1 KiB
YAML

# Derived from regalloc.rs' GitHub CI config file.
name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
# Lint code with rustfmt, report an error if it needs to be run.
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install rustfmt
run: rustup component add rustfmt
- name: Run rustfmt and check there's no difference
run: cargo fmt --all -- --check
# Make sure the code compiles and that all the tests pass.
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build
- name: Run tests
run: cargo test --all --verbose
# Make sure the code typechecks with non-default features enabled.
features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check with all features
run: cargo check --all-features
# Lint dependency graph for security advisories, duplicate versions, and
# incompatible licences.
cargo_deny:
name: Cargo deny
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- run: |
set -e
curl -L https://github.com/EmbarkStudios/cargo-deny/releases/download/0.8.5/cargo-deny-0.8.5-x86_64-unknown-linux-musl.tar.gz | tar xzf -
mv cargo-deny-*-x86_64-unknown-linux-musl/cargo-deny cargo-deny
echo `pwd` >> $GITHUB_PATH
- run: cargo deny check
# Builds the fuzz targets.
fuzz:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install nightly
run: rustup toolchain install nightly
- name: Install cargo-fuzz
run: cargo +nightly install cargo-fuzz
- name: Build ssagen fuzzing target
run: cargo +nightly fuzz build ssagen
- name: Build moves fuzzing target
run: cargo +nightly fuzz build moves
- name: Build ion fuzzing target
run: cargo +nightly fuzz build ion
- name: Build and smoke-test ion_checker fuzzing target
run: cargo +nightly fuzz run ion_checker ./fuzz/smoketest/ion_checker.bin