Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 76 additions & 62 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,46 +21,48 @@ jobs:
settings:
- host: macos-latest
target: x86_64-apple-darwin
build: yarn build --target x86_64-apple-darwin
build: npm install -g pnpm@10 -f && pnpm build --target x86_64-apple-darwin
- host: windows-latest
build: yarn build --target x86_64-pc-windows-msvc
build: npm install -g pnpm@10 -f && pnpm build --target x86_64-pc-windows-msvc
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
build: yarn build --target x86_64-unknown-linux-gnu
build: npm install -g pnpm@10 -f && 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: npm install -g pnpm@10 -f && pnpm build --target x86_64-unknown-linux-musl
- host: macos-latest
target: aarch64-apple-darwin
build: yarn build --target aarch64-apple-darwin
build: npm install -g pnpm@10 -f && 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: npm install -g pnpm@10 -f && pnpm build --target aarch64-unknown-linux-gnu
- 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
npm install -g pnpm@10 -f && pnpm build --target aarch64-unknown-linux-musl
# not sure if we will add this eventually so leaving here as reminder to turn on the build
# - host: windows-latest
# target: aarch64-pc-windows-msvc
# build: yarn build --target aarch64-pc-windows-msvc
# build: npm install -g pnpm@10 -f && pnpm build --target aarch64-pc-windows-msvc
name: Build - ${{ matrix.settings.target }} - node@22
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
if: ${{ !matrix.settings.docker }}
with:
node-version: "22.4.x"
cache: yarn
cache: pnpm
- name: Install
uses: dtolnay/rust-toolchain@stable
if: ${{ !matrix.settings.docker }}
Expand All @@ -85,18 +87,20 @@ jobs:
run: ${{ matrix.settings.setup }}
if: ${{ matrix.settings.setup }}
shell: bash
- name: Setup pnpm
uses: pnpm/action-setup@v4
- 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 --frozen-lockfile
- name: Setup node x86
uses: actions/setup-node@v4
uses: actions/setup-node@v6
if: matrix.settings.target == 'i686-pc-windows-msvc'
with:
node-version: "22.4.x"
cache: yarn
cache: pnpm
architecture: x86
- name: Build in docker
uses: addnab/docker-run-action@v3
Expand Down Expand Up @@ -133,15 +137,17 @@ jobs:
- "22.4.x"
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
cache: yarn
cache: pnpm
architecture: x64
- name: Install dependencies
run: yarn install
run: pnpm install --frozen-lockfile
- name: Download artifacts
uses: actions/download-artifact@v4
with:
Expand All @@ -151,11 +157,11 @@ jobs:
run: ls -R .
shell: bash
- name: Test bindings
run: yarn test:unit
run: pnpm test:unit
- name: Download spec tests
run: yarn download-spec-tests
run: pnpm download-spec-tests
- name: Spec tests
run: yarn test:spec
run: pnpm test:spec

test-linux-x64-gnu-binding:
name: Test - Linux-x64-gnu - node@${{ matrix.node }}
Expand All @@ -169,14 +175,16 @@ jobs:
- "22.4.x"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
cache: yarn
cache: pnpm
- name: Install dependencies
run: yarn install
run: pnpm install --frozen-lockfile
- name: Download artifacts
uses: actions/download-artifact@v4
with:
Expand All @@ -186,17 +194,17 @@ jobs:
run: ls -R .
shell: bash
- name: Lint project
run: yarn lint
run: pnpm lint
- name: Run napi version
run: yarn run version
run: pnpm run version
- name: Ensure there are no unstaged changes
run: git diff --exit-code
- name: Test bindings
run: yarn test:unit
run: pnpm test:unit
- name: Download spec tests
run: yarn download-spec-tests
run: pnpm download-spec-tests
- name: Spec tests
run: yarn test:spec
run: pnpm test:spec

test-linux-x64-gnu-binding-bun:
name: Test - Linux-x64-gnu - bun@${{ matrix.bun }}
Expand All @@ -209,14 +217,16 @@ jobs:
- "latest"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
# - name: Setup pnpm
# uses: pnpm/action-setup@v4
# - name: Setup node
# uses: actions/setup-node@v4
# uses: actions/setup-node@v6
# with:
# node-version: ${{ matrix.node }}
# cache: yarn
# cache: pnpm
# - name: Install dependencies
# run: yarn install
# run: pnpm install
- uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ matrix.bun }}
Expand Down Expand Up @@ -255,16 +265,18 @@ jobs:
- 22.4
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
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 --frozen-lockfile
- name: Download artifacts
uses: actions/download-artifact@v4
with:
Expand All @@ -280,9 +292,9 @@ jobs:
options: "--platform linux/amd64 -v ${{ github.workspace }}:/build -w /build"
run: |
set -e
yarn test:unit
yarn download-spec-tests
yarn test:spec
pnpm test:unit
pnpm download-spec-tests
pnpm test:spec
ls -la

test-linux-aarch64-gnu-binding:
Expand All @@ -297,7 +309,7 @@ jobs:
- 22.4
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Download artifacts
uses: actions/download-artifact@v4
with:
Expand All @@ -308,9 +320,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 --frozen-lockfile
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
Expand All @@ -323,9 +335,9 @@ jobs:
options: "--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build"
run: |
set -e
yarn test:unit
yarn download-spec-tests
yarn test:spec
pnpm test:unit
pnpm download-spec-tests
pnpm test:spec
ls -la

test-linux-aarch64-musl-binding:
Expand All @@ -340,7 +352,7 @@ jobs:
- 22.4
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Download artifacts
uses: actions/download-artifact@v4
with:
Expand All @@ -351,9 +363,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 --frozen-lockfile
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
Expand All @@ -366,9 +378,9 @@ jobs:
options: "--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build"
run: |
set -e
yarn test:unit
yarn download-spec-tests
yarn test:spec
pnpm test:unit
pnpm download-spec-tests
pnpm test:spec
ls -la

publish:
Expand All @@ -383,12 +395,14 @@ jobs:
- test-linux-aarch64-gnu-binding
- test-linux-aarch64-musl-binding
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup node
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: "22.4.x"
cache: yarn
cache: pnpm
- name: Create tag
id: tag
uses: butlerlogic/[email protected]
Expand All @@ -403,13 +417,13 @@ jobs:
with:
script: core.setFailed('The package.json version did not change. Workflow will not create a release.')
- name: Install dependencies
run: yarn install
run: pnpm install --frozen-lockfile
- 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
15 changes: 2 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ node_modules
prebuild

npm-debug.log
yarn-error.log
pnpm-debug.log

# Eth2.0 spec tests data
spec-tests
Expand All @@ -23,9 +23,7 @@ fuzz-tests
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
Expand Down Expand Up @@ -86,8 +84,6 @@ typings/
# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
Expand Down Expand Up @@ -204,11 +200,4 @@ $RECYCLE.BIN/
Cargo.lock

.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

*.node
2 changes: 0 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ npm
.eslintrc
.prettierignore
rustfmt.toml
yarn.lock
*.node
.yarn
__test__
renovate.json
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Thank you for your interest in contribution to the `blst-ts` project. This file

```sh
git submodule update --init --recursive
yarn
pnpm install
```

### Scripts
Expand Down
Loading