Skip to content

fn AlignedVec::resize: Validate safety requirements, specifically overflow #1247

fn AlignedVec::resize: Validate safety requirements, specifically overflow

fn AlignedVec::resize: Validate safety requirements, specifically overflow #1247

name: build and test with QEMU
on:
push:
branches:
- 'main'
pull_request:
jobs:
test-on-ubuntu-latest-with-qemu:
strategy:
matrix:
# only test specific parameter pairs, not the cross product
include:
- target: "armv7-unknown-linux-gnueabihf"
linker: "arm-linux-gnueabihf-gcc"
wrapper: "qemu-arm-static"
packages: "g++-arm-linux-gnueabihf libc6-dev-armhf-cross"
- target: "aarch64-unknown-linux-gnu"
linker: "aarch64-linux-gnu-gcc"
wrapper: "qemu-aarch64-static"
packages: "g++-aarch64-linux-gnu libc6-dev-arm64-cross"
- target: "x86_64-unknown-linux-gnu"
linker: "cc"
wrapper: "qemu-x86_64-static -cpu max" # enable AVX512
packages: ""
# NOTE: This appears to work for Ubuntu 22.04 and other systems
# with a recent version of GNU ld (e.g. 2.38) whereas Ubuntu 20.04
# fails with the following linker error: unsupported ISA subset `z'
- target: "riscv64gc-unknown-linux-gnu"
linker: "riscv64-linux-gnu-gcc"
wrapper: "qemu-riscv64-static"
packages: "g++-riscv64-linux-gnu libc6-dev-riscv64-cross"
runs-on: ubuntu-latest
name: test on ${{ matrix.target }}
steps:
- name: install prerequisites
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: ${{ matrix.packages }} qemu-user-static meson nasm
version: 1.0 # version of cache to load
- name: git checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: cache rust dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ matrix.target }}-cargo-and-target-${{ hashFiles('**/Cargo.lock') }}
- name: cargo build for ${{ matrix.target }}
run: |
rustup target add ${{ matrix.target }}
RUSTFLAGS="-C target-feature=+crt-static -C linker=${{ matrix.linker }}" \
cargo build --release --target ${{ matrix.target }}
- name: run tests
run: |
.github/workflows/test.sh -t 2 \
-r target/${{ matrix.target }}/release/dav1d \
-s target/${{ matrix.target }}/release/seek_stress \
-w "${{ matrix.wrapper }}"
- name: upload build artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: meson-test-logs-${{ matrix.target }}
path: |
${{ github.workspace }}/build/meson-logs/testlog.txt