Skip to content

Commit

Permalink
ci: different build prefix accroding to platform
Browse files Browse the repository at this point in the history
  • Loading branch information
b-ma committed Dec 24, 2024
1 parent 4fc255b commit 05d3b68
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/matrix-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: matrix-build
env:
DEBUG: napi:*
PROJECT_NAME: node-web-audio-api
CARGO_BUILD_NAME: libnode_web_audio_api
CARGO_BUILD_NAME: node_web_audio_api
MACOSX_DEPLOYMENT_TARGET: '10.13'
CARGO_TERM_COLOR: always

Expand All @@ -24,10 +24,10 @@ 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
Expand Down Expand Up @@ -93,10 +93,19 @@ jobs:
BIN_SUFFIX=".so"
fi
BIN_PREFIX=""
if [[ "${{ matrix.runner }}" == "windows-latest" ]]; then
BIN_PREFIX=""
elif [[ "${{ matrix.runner }}" == "macos-latest" ]]; then
BIN_PREFIX="lib"
elif [[ "${{ matrix.runner }}" == "ubuntu-latest" ]]; then
BIN_PREFIX="lib"
fi
ls -al target/${{ matrix.target }}/release/
# The built binary output location
BIN_OUTPUT="target/${{ matrix.target }}/release/${CARGO_BUILD_NAME}${BIN_SUFFIX}"
BIN_OUTPUT="target/${{ matrix.target }}/release/${BIN_PREFIX}${CARGO_BUILD_NAME}${BIN_SUFFIX}"
# Define a better name for the final binary
BIN_RELEASE="${PROJECT_NAME}.${{ matrix.name }}.node"
Expand Down

0 comments on commit 05d3b68

Please sign in to comment.