Skip to content

Commit

Permalink
CI: Disable QEMU workflows, add macOS/aarch64 workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
thedataking committed Mar 15, 2024
1 parent 94bfe8e commit cfb86b1
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 2 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/build-and-test-aarch64-darwin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: build and test on aarch64
on: [push, pull_request]
jobs:
test-on-macos-aarch64:
runs-on: macos-14
name: test on macos-14-aarch64
steps:
- name: install prerequisites
run: |
rustup target add armv7-unknown-linux-gnueabihf
brew tap messense/macos-cross-toolchains
brew install \
armv7-unknown-linux-gnueabihf \
meson \
docker
source "$HOME/.cargo/env"
- name: git checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: cache rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: arm-darwin-cargo-and-target-${{ hashFiles('**/Cargo.lock') }}
- name: cargo build for aarch64-apple-darwin
run: cargo build --release
- run: .github/workflows/test.sh -r ./target/release/dav1d -s ./target/release/seek_stress
- name: cargo build for armv7-unknown-linux
run: |
CC_armv7_unknown_linux_gnueabihf=$(brew --prefix armv7-unknown-linux-gnueabihf)/bin/armv7-unknown-linux-gnueabihf-gcc \
AR_armv7_unknown_linux_gnueabihf=$(brew --prefix armv7-unknown-linux-gnueabihf)/bin/armv7-unknown-linux-gnueabihf-ar \
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=$(brew --prefix armv7-unknown-linux-gnueabihf)/bin/armv7-unknown-linux-gnueabihf-ld \
RUSTFLAGS="-C target-feature=+crt-static -L $(brew --prefix armv7-unknown-linux-gnueabihf)/toolchain/lib/gcc/armv7-unknown-linux-gnueabihf/13.2.0" \
cargo build --release --target armv7-unknown-linux-gnueabihf
- name: docker run
run: |
$(brew --prefix docker)/bin/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 linux/arm/v7 \
ghcr.io/immunant/rav1d/debian-bullseye-arm7:latest \
.github/workflows/test.sh -t 2 \
-r target/armv7-unknown-linux-gnueabihf/release/dav1d \
-s target/armv7-unknown-linux-gnueabihf/release/seek_stress
- name: upload build artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v3
with:
name: meson-test-logs
path: |
${{ github.workspace }}/build/meson-logs/testlog.txt
6 changes: 5 additions & 1 deletion .github/workflows/build-and-test-aarch64.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: build and test on aarch64 with QEMU
on: [push, pull_request]
on:
# * is a special character in YAML so we quote lines containing it
push:
branches:
- '**qemu**' # Run when pushing branches that have qemu in the name
jobs:
test-on-qemu-linux-aarch64:
runs-on: ubuntu-latest
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-and-test-arm7.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: build and test on arm7 with QEMU
on: [push, pull_request]
on:
# * is a special character in YAML so we quote lines containing it
push:
branches:
- '**qemu**' # Run when pushing branches that have qemu in the name
jobs:
test-on-qemu-linux-arm7:
runs-on: ubuntu-latest
Expand Down

0 comments on commit cfb86b1

Please sign in to comment.