Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
YassinEldeeb committed Jan 24, 2024
1 parent 415fec9 commit 0e3138f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 76 deletions.
54 changes: 1 addition & 53 deletions .github/workflows/napi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ jobs:
build: |
yarn build
strip -x *.node
- host: windows-latest
build: yarn build
target: x86_64-pc-windows-msvc
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
Expand Down Expand Up @@ -76,24 +73,14 @@ jobs:
run: ${{ matrix.settings.setup }}
if: ${{ matrix.settings.setup }}
shell: bash
- name: Setup node x86
if: matrix.settings.target == 'i686-pc-windows-msvc'
run: yarn config set supportedArchitectures.cpu "ia32"
shell: bash
- name: Install dependencies
run: yarn install
- name: Setup node x86
uses: actions/setup-node@v4
if: matrix.settings.target == 'i686-pc-windows-msvc'
with:
node-version: 18
architecture: x86
- name: Build in docker
uses: addnab/docker-run-action@v3
if: ${{ matrix.settings.docker }}
with:
image: ${{ matrix.settings.docker }}
options: '--user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /libs/napi/build'
options: '--user 0:0 -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}/.cargo/registry/cache:/usr/local/cargo/registry/cache -v ${{ github.workspace }}/.cargo/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}:/build -w /libs/napi'
run: ${{ matrix.settings.build }}
- name: Build
run: ${{ matrix.settings.build }}
Expand All @@ -105,44 +92,6 @@ jobs:
name: bindings-${{ matrix.settings.target }}
path: libs/napi/${{ env.APP_NAME }}.*.node
if-no-files-found: error
test-macOS-windows-binding:
name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }}
needs:
- build
strategy:
fail-fast: false
matrix:
settings:
- host: macos-latest
target: x86_64-apple-darwin
- host: windows-latest
target: x86_64-pc-windows-msvc
node:
- '18'
- '20'
runs-on: ${{ matrix.settings.host }}
defaults:
run:
working-directory: libs/napi
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Install dependencies
run: yarn install
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: bindings-${{ matrix.settings.target }}
path: .
- name: List packages
run: ls -R .
shell: bash
- name: Test bindings
run: yarn test
test-linux-x64-gnu-binding:
name: Test bindings on Linux-x64-gnu - node@${{ matrix.node }}
needs:
Expand Down Expand Up @@ -184,7 +133,6 @@ jobs:
run:
working-directory: libs/napi
needs:
- test-macOS-windows-binding
- test-linux-x64-gnu-binding
steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 0 additions & 3 deletions libs/napi/npm/win32-x64-msvc/README.md

This file was deleted.

18 changes: 0 additions & 18 deletions libs/napi/npm/win32-x64-msvc/package.json

This file was deleted.

10 changes: 8 additions & 2 deletions libs/napi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
"types": "index.d.ts",
"napi": {
"name": "lib",
"triples": {}
"triples": {
"defaults": false,
"additional": [
"x86_64-apple-darwin",
"x86_64-unknown-linux-gnu"
]
}
},
"license": "MIT",
"devDependencies": {
Expand All @@ -27,4 +33,4 @@
"universal": "napi universal",
"version": "napi version"
}
}
}

0 comments on commit 0e3138f

Please sign in to comment.