From a1dda6d0d241ede237c506334facac5ab1f631f3 Mon Sep 17 00:00:00 2001 From: b-ma Date: Tue, 24 Dec 2024 15:59:40 +0100 Subject: [PATCH] ci: add linux-arm-gnueabihf target --- .github/workflows/matrix-build.yaml | 33 +++++++++++++------------ .scripts/build-retrieve-from-github.mjs | 2 +- Cross.toml | 6 +++++ 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/.github/workflows/matrix-build.yaml b/.github/workflows/matrix-build.yaml index bb123f0..8571f6d 100644 --- a/.github/workflows/matrix-build.yaml +++ b/.github/workflows/matrix-build.yaml @@ -24,21 +24,26 @@ jobs: fail-fast: false matrix: include: - # - name: darwin-arm64 - # runner: macos-latest - # target: aarch64-apple-darwin - # command: cargo + - name: darwin-arm64 + runner: macos-latest + target: aarch64-apple-darwin + command: cargo - # - name: win32-x64-msvc - # runner: windows-latest - # target: x86_64-pc-windows-msvc - # command: cargo + - name: win32-x64-msvc + runner: windows-latest + target: x86_64-pc-windows-msvc + command: cargo - name: linux-arm64-gnu runner: ubuntu-latest target: aarch64-unknown-linux-gnu command: cross + - name: linux-arm-gnueabihf + runner: ubuntu-latest + target: arm-unknown-linux-gnueabihf + command: cross + name: build - ${{ matrix.name }} steps: - name: Check out repository @@ -85,22 +90,18 @@ jobs: - name: Rename Binary shell: bash run: | + BIN_PREFIX="" BIN_SUFFIX="" - if [[ "${{ matrix.runner }}" == "windows-latest" ]]; then - BIN_SUFFIX=".dll" - elif [[ "${{ matrix.runner }}" == "macos-latest" ]]; then - BIN_SUFFIX=".dylib" - elif [[ "${{ matrix.runner }}" == "ubuntu-latest" ]]; then - BIN_SUFFIX=".so" - fi - BIN_PREFIX="" if [[ "${{ matrix.runner }}" == "windows-latest" ]]; then BIN_PREFIX="" + BIN_SUFFIX=".dll" elif [[ "${{ matrix.runner }}" == "macos-latest" ]]; then BIN_PREFIX="lib" + BIN_SUFFIX=".dylib" elif [[ "${{ matrix.runner }}" == "ubuntu-latest" ]]; then BIN_PREFIX="lib" + BIN_SUFFIX=".so" fi ls -al target/${{ matrix.target }}/release/ diff --git a/.scripts/build-retrieve-from-github.mjs b/.scripts/build-retrieve-from-github.mjs index 26a870a..aeab911 100644 --- a/.scripts/build-retrieve-from-github.mjs +++ b/.scripts/build-retrieve-from-github.mjs @@ -10,7 +10,7 @@ const repo = process.env.REPO_NAME; const ghToken = process.env.GITHUB_TOKEN; const workflowName = 'matrix-build'; -const numArtifacts = 2; // 2 Mac, 2 windows +const numArtifacts = 1; // 2 Mac, 2 windows // need a key for downloading job artifacts const octokit = new Octokit({ auth: ghToken }); diff --git a/Cross.toml b/Cross.toml index 0ff6e3c..e864b76 100644 --- a/Cross.toml +++ b/Cross.toml @@ -3,3 +3,9 @@ pre-build = [ "dpkg --add-architecture $CROSS_DEB_ARCH", "apt-get update && apt-get --assume-yes install libasound2-dev:$CROSS_DEB_ARCH libjack-jackd2-dev:$CROSS_DEB_ARCH" ] + +[target.arm-unknown-linux-gnueabihf] +pre-build = [ + "dpkg --add-architecture $CROSS_DEB_ARCH", + "apt-get update && apt-get --assume-yes install libasound2-dev:$CROSS_DEB_ARCH libjack-jackd2-dev:$CROSS_DEB_ARCH" +]