-
Notifications
You must be signed in to change notification settings - Fork 22
64 lines (64 loc) · 2.28 KB
/
build-and-test-qemu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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: ""
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