Implement analyzer checks for field size and offsets #304
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: build | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
FORCE_COLOR: 3 | |
RUSTFLAGS: -D warnings | |
jobs: | |
build: | |
name: Build | |
strategy: | |
matrix: | |
rust: | |
- 1.68.0 # This is the Rust version used in Android. | |
- stable | |
os: | |
- ubuntu-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install ${{ matrix.rust }} Rust | |
run: rustup default ${{ matrix.rust }} | |
- name: Setup Rust cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install rustfmt | |
run: rustup component add rustfmt | |
- name: Rust tests | |
run: cargo test | |
documentation: | |
name: Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Rust cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Build documentation | |
env: | |
RUSTDOCFLAGS: --deny rustdoc::broken_intra_doc_links | |
run: cargo doc --no-deps | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Rust cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Clippy | |
run: cargo clippy --no-deps | |
test: | |
name: Canonical Tests | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install stable Rust | |
run: rustup default stable | |
- name: Setup Rust cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt install libgtest-dev | |
python3 -m pip install typing_extensions | |
- name: Install pdlc | |
run: cargo install --path pdl-compiler/ | |
- name: Run Rust generator tests | |
run: pdl-compiler/tests/run_rust_generator_tests.sh | |
- name: Run legacy Rust generator tests | |
run: pdl-compiler/tests/run_rust_legacy_generator_tests.sh | |
- name: Run CXX generator tests | |
run: pdl-compiler/tests/run_cxx_generator_tests.sh | |
- name: Run Python generator tests | |
run: pdl-compiler/tests/run_python_generator_tests.sh | |
- name: Compile Rust generated files | |
run: pdl-compiler/tests/compile_rust_generated_files.sh | |
- name: Compile legacy Rust generated files | |
run: pdl-compiler/tests/compile_rust_legacy_generated_files.sh |