Skip to content

Commit

Permalink
ci: add linux-arm-gnueabihf target
Browse files Browse the repository at this point in the history
  • Loading branch information
b-ma committed Dec 24, 2024
1 parent c0a6d02 commit a1dda6d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/matrix-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion .scripts/build-retrieve-from-github.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 });

Expand Down
6 changes: 6 additions & 0 deletions Cross.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]

0 comments on commit a1dda6d

Please sign in to comment.