-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cargo.toml
, .github/workflows/*
: Separate profiles into dev
, `f…
…ast-dev`, `release`, `checked-release` and update CI accordingly. Previously, `profile.dev` had `opt-level = 1` for fast development, but that's bad for debugging (`profile.dev` is also confusingly `debug`). This separates the two into `profile.dev`/`debug` for debugging and `profile.fast-dev` for the fastest local development cycle. This also splits up `profile.release` into `profile.release` and `profile.checked-release`, which is `profile.release` with runtime checks and minimal debug info. This is run in CI now (as opposed to a mix of `profile.dev` and `profile.release`), except for `profile.release`, which is used for benchmarking. This also consolidates some of the GitHub Actions workflows to more easily manage the profiles, features, as some things were missing. Specifically, * argon tests were not run with `debug_assertions` * arm tests were not run with `debug_assertions` or `overflow_checks`
- Loading branch information
Showing
6 changed files
with
158 additions
and
156 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
name: build and test on arm with QEMU | ||
on: [push, pull_request] | ||
jobs: | ||
test-on-qemu: | ||
strategy: | ||
matrix: | ||
target: [ | ||
{ | ||
rust: "aarch64-unknown-linux-gnu", | ||
gcc: "g++-aarch64-linux-gnu", | ||
libc_cross: "libc6-dev-arm64-cross", | ||
docker_image: "debian-bullseye-aarch64", | ||
docker_platform: "linux/arm64", | ||
}, | ||
{ | ||
rust: "armv7-unknown-linux-gnueabihf", | ||
gcc: "g++-arm-linux-gnueabihf", | ||
libc_cross: "libc6-dev-armhf-cross", | ||
docker_image: "debian-bullseye-arm7", | ||
docker_platform: "linux/arm/v7", | ||
}, | ||
] | ||
build: [ | ||
{profile: "checked-release", features: "asm", timeout_multiplier: 2}, | ||
# The asm fallback "should" be the same on all platforms, | ||
# so if we tested it for x86, we shouldn't need to for arm either | ||
# (which is slower due to qemu). | ||
# {profile: "checked-release", features: "" , timeout_multiplier: 2}, | ||
] | ||
runs-on: ubuntu-latest | ||
name: meson tests on ${{ matrix.target.rust }} (qemu) with --features ${{ matrix.build.features }} | ||
steps: | ||
- name: install prerequisites | ||
uses: awalsh128/cache-apt-pkgs-action@latest | ||
with: | ||
packages: ${{ matrix.target.gcc }} ${{ matrix.target.libc_cross }} | ||
version: 1.0 # version of cache to load | ||
- name: git checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
- name: set up qemu | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: arm64 | ||
- name: cache rust dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ matrix.target.rust }}-cargo-and-target-${{ hashFiles('**/Cargo.lock') }} | ||
# - name: cache dav1d object files | ||
# uses: actions/cache@v3 | ||
# with: | ||
# path: build/ | ||
# key: ${{ matrix.target.rust }}-c-object-files-${{ hashFiles('**/meson.build', '**/*.c', '**/*.h') }} | ||
- name: cargo build | ||
run: | | ||
rustup target add ${{ matrix.target.rust }} | ||
cargo build \ | ||
--target ${{ matrix.target.rust }} \ | ||
--profile ${{ matrix.build.profile }} \ | ||
--no-default-features --features=bitdepth_8,bitdepth_16,${{ matrix.build.features }} | ||
- name: docker pull | ||
run: docker pull ghcr.io/immunant/rav1d/${{ matrix.target.docker_image }}:latest | ||
- name: build and run tests in docker | ||
run: | | ||
docker run \ | ||
--rm \ | ||
-v ~/.cargo/git:/home/prossimo/.cargo/git \ | ||
-v ~/.cargo/registry:/home/prossimo/.cargo/registry \ | ||
-v $(pwd):/${{ github.workspace }} \ | ||
-w ${{ github.workspace }} \ | ||
--platform ${{ matrix.target.docker_platform }} \ | ||
ghcr.io/immunant/rav1d/${{ matrix.target.docker_image }}:latest \ | ||
.github/workflows/test.sh \ | ||
-r ../target/${{ matrix.target.rust }}/${{ matrix.build.profile }}/dav1d \ | ||
-s ../target/${{ matrix.target.rust }}/${{ matrix.build.profile }}/seek_stress \ | ||
-t ${{ matrix.build.timeout_multiplier }} | ||
- name: copy log files | ||
if: ${{ !cancelled() }} | ||
run: | | ||
cp ${{ github.workspace }}/build/meson-logs/testlog.txt \ | ||
${{ github.workspace }}/build/meson-logs/testlog-${{ matrix.target }}-${{ matrix.build.features }}.txt | ||
- name: upload build artifacts | ||
if: ${{ !cancelled() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: meson-test-logs | ||
path: | | ||
${{ github.workspace }}/build/meson-logs/testlog-*.txt |
This file was deleted.
Oops, something went wrong.
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
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
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