Add flag to treat LLVM errors as fatal #1061
Workflow file for this run
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: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
schedule: | |
- cron: 00 4 * * * | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: | |
- stable | |
- beta | |
- nightly | |
llvm: | |
- 16 | |
name: rustc=${{ matrix.rust }} llvm=${{ matrix.llvm }} | |
env: | |
RUST_BACKTRACE: full | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust ${{ matrix.rust }} | |
if: matrix.rust != 'nightly' | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: Install Rust ${{ matrix.rust }} | |
if: matrix.rust == 'nightly' | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: rust-src | |
- uses: Swatinem/rust-cache@v2 | |
- name: Check (default features, no system LLVM) | |
run: cargo check | |
- name: Build (default features, no system LLVM) | |
run: cargo build | |
- name: Install LLVM | |
shell: bash | |
run: | | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
echo -e deb http://apt.llvm.org/focal/ llvm-toolchain-focal-${{ matrix.llvm }} main | sudo tee /etc/apt/sources.list.d/llvm.list | |
sudo apt-get update | |
sudo apt-get -y install \ | |
llvm-${{ matrix.llvm }}-dev \ | |
llvm-${{ matrix.llvm }}-tools \ | |
libclang-${{ matrix.llvm }}-dev \ | |
libpolly-${{ matrix.llvm }}-dev | |
- uses: taiki-e/install-action@cargo-hack | |
- name: Check | |
run: cargo hack check --feature-powerset | |
- name: Build | |
run: cargo hack build --feature-powerset | |
- name: Test | |
if: matrix.rust == 'nightly' | |
run: cargo hack test --feature-powerset | |
- uses: actions/checkout@v3 | |
if: matrix.rust == 'nightly' | |
with: | |
repository: aya-rs/aya | |
path: aya | |
submodules: recursive | |
- name: Install dependencies | |
if: matrix.rust == 'nightly' | |
# ubuntu-20.04 comes with clang prior to | |
# https://github.com/llvm/llvm-project/commit/6d6750696400 which does not implement | |
# __builtin_preserve_enum_value, used by relocation tests in aya. | |
# | |
# gcc-multilib provides at least <asm/types.h> which is referenced by libbpf. | |
run: sudo apt-get -y install clang-${{ matrix.llvm }} gcc-multilib | |
- name: Add clang-${{ matrix.llvm }} to PATH | |
if: matrix.rust == 'nightly' | |
run: echo /usr/lib/llvm-${{ matrix.llvm }}/bin >> $GITHUB_PATH | |
- name: Install | |
if: matrix.rust == 'nightly' | |
run: cargo install --path . --no-default-features | |
- name: Run aya integration tests | |
if: matrix.rust == 'nightly' | |
working-directory: aya | |
run: cargo xtask integration-test --runner "sudo PATH=$PATH" |