From c76f3268ecb7b2962aee578d4e364cc2c398fb6d Mon Sep 17 00:00:00 2001 From: HEnquist Date: Mon, 9 Nov 2020 20:52:00 +0100 Subject: [PATCH] Check and test for armv7, 32bit --- .github/workflows/cpal.yml | 45 ++++++++++++++++++++++++++++++++++++++ Cross.toml | 7 ++++++ Dockerfile | 9 ++++++++ 3 files changed, 61 insertions(+) create mode 100644 Cross.toml create mode 100644 Dockerfile diff --git a/.github/workflows/cpal.yml b/.github/workflows/cpal.yml index e5a75e5..1d75779 100644 --- a/.github/workflows/cpal.yml +++ b/.github/workflows/cpal.yml @@ -99,6 +99,51 @@ jobs: command: test args: --all --all-features --verbose + arm32bit-check-and-test: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + target: armv7-unknown-linux-gnueabihf + override: true + + - name: Build image + run: docker build -t cross/cpal_armv7:v1 ./ + + - name: Check without features for armv7 + uses: actions-rs/cargo@v1 + with: + command: check + use-cross: true + args: --target armv7-unknown-linux-gnueabihf --workspace --no-default-features --verbose + + - name: Test without features for armv7 + uses: actions-rs/cargo@v1 + with: + command: test + use-cross: true + args: --target armv7-unknown-linux-gnueabihf --workspace --no-default-features --verbose + + - name: Check all features for armv7 + uses: actions-rs/cargo@v1 + with: + command: check + use-cross: true + args: --target armv7-unknown-linux-gnueabihf --workspace --all-features --verbose + + - name: Test all features for armv7 + uses: actions-rs/cargo@v1 + with: + command: test + use-cross: true + args: --target armv7-unknown-linux-gnueabihf --workspace --all-features --verbose + asmjs-wasm32-test: strategy: matrix: diff --git a/Cross.toml b/Cross.toml new file mode 100644 index 0000000..39abb81 --- /dev/null +++ b/Cross.toml @@ -0,0 +1,7 @@ +[target.armv7-unknown-linux-gnueabihf] +image = "cross/cpal_armv7:v1" + +[target.armv7-unknown-linux-gnueabihf.env] +passthrough = [ + "RUSTFLAGS", +] \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..05045c3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM rustembedded/cross:armv7-unknown-linux-gnueabihf + +ENV PKG_CONFIG_ALLOW_CROSS 1 +ENV PKG_CONFIG_PATH /usr/lib/arm-linux-gnueabihf/pkgconfig/ + +RUN dpkg --add-architecture armhf && \ + apt-get update && \ + apt-get install libasound2-dev:armhf -y && \ + apt-get install libjack-jackd2-dev:armhf libjack-jackd2-0:armhf -y \ \ No newline at end of file