Skip to content

Commit

Permalink
Added: corepack enable command to CI.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
alMukaafih committed Jul 17, 2024
1 parent 24e4960 commit f290708
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,27 @@ jobs:
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
build: yarn build --target x86_64-unknown-linux-gnu
build: |
corepack enable
cd core
yarn build --target x86_64-unknown-linux-gnu
- host: ubuntu-latest
target: x86_64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: yarn build --target x86_64-unknown-linux-musl
build: |
corepack enable
cd core
yarn build --target x86_64-unknown-linux-musl
- host: macos-latest
target: aarch64-apple-darwin
build: yarn build --target aarch64-apple-darwin
- host: ubuntu-latest
target: aarch64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
build: yarn build --target aarch64-unknown-linux-gnu
build: |
corepack enable
cd core
yarn build --target aarch64-unknown-linux-gnu
- host: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
setup: |
Expand All @@ -73,6 +82,8 @@ jobs:
build: |-
set -e &&
rustup target add aarch64-unknown-linux-musl &&
corepack enable &&
cd core &&
yarn build --target aarch64-unknown-linux-musl
- host: windows-latest
target: aarch64-pc-windows-msvc
Expand All @@ -87,6 +98,10 @@ jobs:
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
- name: Enable Corepack
run: |
npm install -g corepack
corepack enable
- name: Setup node
uses: actions/setup-node@v4
if: ${{ !matrix.settings.docker }}
Expand Down Expand Up @@ -145,7 +160,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: bindings-${{ matrix.settings.target }}
path: ${{ env.APP_NAME }}.*.node
path: "**/${{ env.APP_NAME }}.*.node"
if-no-files-found: error
build-freebsd:
runs-on: macos-13
Expand Down Expand Up @@ -182,7 +197,9 @@ jobs:
whoami
env
freebsd-version
corepack enable
yarn install
cd core
yarn build
yarn test
rm -rf node_modules
Expand All @@ -192,7 +209,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: bindings-freebsd
path: ${{ env.APP_NAME }}.*.node
path: "**/${{ env.APP_NAME }}.*.node"
if-no-files-found: error
test-macOS-windows-binding:
name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }}
Expand All @@ -212,6 +229,10 @@ jobs:
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
- name: Enable Corepack
run: |
npm install -g corepack
corepack enable
- name: Setup node
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -243,6 +264,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- name: Setup node
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -273,6 +295,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- name: Setup node
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -411,6 +434,7 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- name: Setup node
uses: actions/setup-node@v4
with:
Expand All @@ -434,7 +458,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: bindings-universal-apple-darwin
path: ${{ env.APP_NAME }}.*.node
path: "**/${{ env.APP_NAME }}.*.node"
if-no-files-found: error
publish:
name: Publish
Expand All @@ -450,6 +474,7 @@ jobs:
- universal-macOS
steps:
- uses: actions/checkout@v4
- run: corepack enable
- name: Setup node
uses: actions/setup-node@v4
with:
Expand Down

0 comments on commit f290708

Please sign in to comment.