Skip to content

fix: List value of PKG_CONFIG_PATH on Mac aarch #21

fix: List value of PKG_CONFIG_PATH on Mac aarch

fix: List value of PKG_CONFIG_PATH on Mac aarch #21

Workflow file for this run

name: cohort_sdk_js
on:
#workflow_call:
push:
env:
LIBRARY_NAME: cohort_sdk_js
SDK_JS_HOME: packages/cohort_sdk_js
DEBUG: "napi:*"
jobs:
npm:
strategy:
fail-fast: false
matrix:
settings:
- host: macos-latest
target: x86_64-apple-darwin
customiseHostCommand: |
echo 'No customisartions are needed'
buildCommand: |
cd $SDK_JS_HOME && npm run build -- --target x86_64-apple-darwin
- host: macos-latest
target: aarch64-apple-darwin
customiseHostCommand: |-
brew update && brew install cyrus-sasl &&
export PKG_CONFIG_PATH="/usr/local/opt/cyrus-sasl/lib/pkgconfig" &&
ls -lah $PKG_CONFIG_PATH
buildCommand: |
cd $SDK_JS_HOME && npm run build -- --target aarch64-apple-darwin
- host: windows-latest
target: x86_64-pc-windows-msvc
customiseHostCommand: |
ECHO 'No customisartions are needed'
buildCommand: |
cd $SDK_JS_HOME && npm run build -- --target x86_64-pc-windows-msvc
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
customiseHostCommand: |
sudo apt-get update -y && sudo apt-get install -y libsasl2-dev
buildCommand: |
cd $SDK_JS_HOME && npm run build -- --target x86_64-unknown-linux-gnu
name: stable - ${{ matrix.settings.target }} - node@16
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
check-latest: true
- name: Install
uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true
toolchain: stable
target: ${{ matrix.settings.target }}
- name: Customise host image
shell: bash
run: ${{ matrix.settings.customiseHostCommand }}
- name: List current directory
shell: bash
run: pwd
- name: List content before build
shell: bash
run: ls -l .
# - name: Cache cargo TODO deal with caching
- name: Install node dependencies
run: cd $SDK_JS_HOME && pwd && ls -l . && npm install -verbose
- name: Cargo build
run: cargo build
- name: NAPI-RS build
shell: bash
run: ${{ matrix.settings.buildCommand }}
- name: List content after build
shell: bash
run: ls -l && ls -l $SDK_JS_HOME
- name: Upload built binary
uses: actions/upload-artifact@v3
with:
name: bindings-${{ matrix.settings.target }}
path: ${{ env.SDK_JS_HOME }}/${{ env.LIBRARY_NAME }}.*.node
if-no-files-found: error