Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Commit

Permalink
feat: pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
simxnet committed May 12, 2024
1 parent 6655906 commit 1208b5b
Show file tree
Hide file tree
Showing 5 changed files with 2,002 additions and 59 deletions.
106 changes: 53 additions & 53 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,61 +27,61 @@ jobs:
settings:
- host: macos-latest
target: x86_64-apple-darwin
build: yarn build --target x86_64-apple-darwin
build: pnpm build --target x86_64-apple-darwin
- host: windows-latest
build: yarn build --target x86_64-pc-windows-msvc
build: pnpm build --target x86_64-pc-windows-msvc
target: x86_64-pc-windows-msvc
- host: windows-latest
build: |
yarn build --target i686-pc-windows-msvc
yarn test
pnpm build --target i686-pc-windows-msvc
pnpm test
target: i686-pc-windows-msvc
- 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: pnpm 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: pnpm build --target x86_64-unknown-linux-musl
- host: macos-latest
target: aarch64-apple-darwin
build: yarn build --target aarch64-apple-darwin
build: pnpm 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: pnpm build --target aarch64-unknown-linux-gnu
- host: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
setup: |
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf -y
build: yarn build --target armv7-unknown-linux-gnueabihf
build: pnpm build --target armv7-unknown-linux-gnueabihf
- host: ubuntu-latest
target: armv7-unknown-linux-musleabihf
build: yarn build --target armv7-unknown-linux-musleabihf
build: pnpm build --target armv7-unknown-linux-musleabihf
- host: ubuntu-latest
target: aarch64-linux-android
build: yarn build --target aarch64-linux-android
build: pnpm build --target aarch64-linux-android
- host: ubuntu-latest
target: armv7-linux-androideabi
build: yarn build --target armv7-linux-androideabi
build: pnpm build --target armv7-linux-androideabi
- host: ubuntu-latest
target: aarch64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: |-
set -e &&
rustup target add aarch64-unknown-linux-musl &&
yarn build --target aarch64-unknown-linux-musl
pnpm build --target aarch64-unknown-linux-musl
- host: windows-latest
target: aarch64-pc-windows-msvc
build: yarn build --target aarch64-pc-windows-msvc
build: pnpm build --target aarch64-pc-windows-msvc
- host: ubuntu-latest
target: riscv64gc-unknown-linux-gnu
setup: |
sudo apt-get update
sudo apt-get install gcc-riscv64-linux-gnu -y
build: yarn build --target riscv64gc-unknown-linux-gnu
build: pnpm build --target riscv64gc-unknown-linux-gnu
name: stable - ${{ matrix.settings.target }} - node@20
runs-on: ${{ matrix.settings.host }}
steps:
Expand All @@ -91,7 +91,7 @@ jobs:
if: ${{ !matrix.settings.docker }}
with:
node-version: 20
cache: yarn
cache: pnpm
- name: Install
uses: dtolnay/rust-toolchain@stable
if: ${{ !matrix.settings.docker }}
Expand All @@ -118,16 +118,16 @@ jobs:
shell: bash
- name: Setup node x86
if: matrix.settings.target == 'i686-pc-windows-msvc'
run: yarn config set supportedArchitectures.cpu "ia32"
run: pnpm config set supportedArchitectures.cpu "ia32"
shell: bash
- name: Install dependencies
run: yarn install
run: pnpm install
- name: Setup node x86
uses: actions/setup-node@v4
if: matrix.settings.target == 'i686-pc-windows-msvc'
with:
node-version: 20
cache: yarn
cache: pnpm
architecture: x86
- name: Build in docker
uses: addnab/docker-run-action@v3
Expand Down Expand Up @@ -166,27 +166,27 @@ jobs:
shell: bash
run: |
sudo pkg install -y -f curl node libnghttp2 npm
sudo npm install -g yarn --ignore-scripts
sudo npm install -g pnpm --ignore-scripts
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain stable
source "$HOME/.cargo/env"
echo "~~~~ rustc --version ~~~~"
rustc --version
echo "~~~~ node -v ~~~~"
node -v
echo "~~~~ yarn --version ~~~~"
yarn --version
echo "~~~~ pnpm --version ~~~~"
pnpm --version
pwd
ls -lah
whoami
env
freebsd-version
yarn install
yarn build
yarn test
pnpm install
pnpm build
pnpm test
rm -rf node_modules
rm -rf target
rm -rf .yarn/cache
rm -rf .pnpm/cache
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -215,10 +215,10 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: yarn
cache: pnpm
architecture: x64
- name: Install dependencies
run: yarn install
run: pnpm install
- name: Download artifacts
uses: actions/download-artifact@v4
with:
Expand All @@ -228,7 +228,7 @@ jobs:
run: ls -R .
shell: bash
- name: Test bindings
run: yarn test
run: pnpm test
test-linux-x64-gnu-binding:
name: Test bindings on Linux-x64-gnu - node@${{ matrix.node }}
needs:
Expand All @@ -246,9 +246,9 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: yarn
cache: pnpm
- name: Install dependencies
run: yarn install
run: pnpm install
- name: Download artifacts
uses: actions/download-artifact@v4
with:
Expand All @@ -258,7 +258,7 @@ jobs:
run: ls -R .
shell: bash
- name: Test bindings
run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim yarn test
run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim pnpm test
test-linux-x64-musl-binding:
name: Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }}
needs:
Expand All @@ -276,11 +276,11 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: yarn
cache: pnpm
- name: Install dependencies
run: |
yarn config set supportedArchitectures.libc "musl"
yarn install
pnpm config set supportedArchitectures.libc "musl"
pnpm install
- name: Download artifacts
uses: actions/download-artifact@v4
with:
Expand All @@ -290,7 +290,7 @@ jobs:
run: ls -R .
shell: bash
- name: Test bindings
run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-alpine yarn test
run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-alpine pnpm test
test-linux-aarch64-gnu-binding:
name: Test bindings on aarch64-unknown-linux-gnu - node@${{ matrix.node }}
needs:
Expand All @@ -314,9 +314,9 @@ jobs:
shell: bash
- name: Install dependencies
run: |
yarn config set supportedArchitectures.cpu "arm64"
yarn config set supportedArchitectures.libc "glibc"
yarn install
pnpm config set supportedArchitectures.cpu "arm64"
pnpm config set supportedArchitectures.libc "glibc"
pnpm install
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
Expand All @@ -329,7 +329,7 @@ jobs:
options: '--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build'
run: |
set -e
yarn test
pnpm test
ls -la
test-linux-aarch64-musl-binding:
name: Test bindings on aarch64-unknown-linux-musl - node@${{ matrix.node }}
Expand All @@ -348,9 +348,9 @@ jobs:
shell: bash
- name: Install dependencies
run: |
yarn config set supportedArchitectures.cpu "arm64"
yarn config set supportedArchitectures.libc "musl"
yarn install
pnpm config set supportedArchitectures.cpu "arm64"
pnpm config set supportedArchitectures.libc "musl"
pnpm install
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
Expand All @@ -363,7 +363,7 @@ jobs:
options: '--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build'
run: |
set -e
yarn test
pnpm test
test-linux-arm-gnueabihf-binding:
name: Test bindings on armv7-unknown-linux-gnueabihf - node@${{ matrix.node }}
needs:
Expand All @@ -387,8 +387,8 @@ jobs:
shell: bash
- name: Install dependencies
run: |
yarn config set supportedArchitectures.cpu "arm"
yarn install
pnpm config set supportedArchitectures.cpu "arm"
pnpm install
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
Expand All @@ -401,7 +401,7 @@ jobs:
options: '--platform linux/arm/v7 -v ${{ github.workspace }}:/build -w /build'
run: |
set -e
yarn test
pnpm test
ls -la
universal-macOS:
name: Build universal macOS binary
Expand All @@ -414,9 +414,9 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
cache: pnpm
- name: Install dependencies
run: yarn install
run: pnpm install
- name: Download macOS x64 artifact
uses: actions/download-artifact@v4
with:
Expand All @@ -428,7 +428,7 @@ jobs:
name: bindings-aarch64-apple-darwin
path: artifacts
- name: Combine binaries
run: yarn universal
run: pnpm universal
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
Expand All @@ -453,15 +453,15 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
cache: pnpm
- name: Install dependencies
run: yarn install
run: pnpm install
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Move artifacts
run: yarn artifacts
run: pnpm artifacts
- name: List packages
run: ls -R ./npm
shell: bash
Expand Down
3 changes: 1 addition & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ npm
.eslintrc
.prettierignore
rustfmt.toml
yarn.lock
pnpm-lock.yaml
*.node
.yarn
__test__
renovate.json
3 changes: 0 additions & 3 deletions .yarnrc.yml

This file was deleted.

Loading

0 comments on commit 1208b5b

Please sign in to comment.