Skip to content

Commit

Permalink
Remove node 14, add node 20, and add arm64-linux. (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjyar authored Jul 28, 2023
1 parent 87491c3 commit ab3c005
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 79 deletions.
61 changes: 35 additions & 26 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ name: Publish
release:
types:
- created
# workflow_dispatch is just for testing, and it won't fully work.
workflow_dispatch:
inputs:
name:
description: fake version name
required: true

env:
# hack to get dynlibs working with musl
Expand All @@ -21,39 +27,34 @@ jobs:
fail-fast: false
matrix:
node_version:
- 14
- 16
- 18
- 20
system:
- os: macos-12
target: x86_64-apple-darwin
- os: ubuntu-22.04
arch: x64
- os: buildjet-2vcpu-ubuntu-2204
target: x86_64-unknown-linux-gnu
arch: x64
- os: buildjet-4vcpu-ubuntu-2204-arm
target: arm64-unknown-linux-gnu
arch: arm64
- os: windows-2019
target: x86_64-pc-windows-msvc
arch:
- x64
include:
# only node 15+ supports arm64 natively, so we only need to build 16 for now
- system:
os: [self-hosted, macOS, ARM64]
target: aarch64-apple-darwin
node_version: 16
arch: arm64
- system:
os: [self-hosted, macOS, ARM64]
target: aarch64-apple-darwin
node_version: 18
arch: x64
- os: [self-hosted, macOS, ARM64]
target: aarch64-apple-darwin
arch: arm64
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.release.tag_name }}
ref: ${{ github.event.release.tag_name }}${{ github.ref }}
- uses: c-hive/gha-yarn-cache@v1
- uses: actions/[email protected]
with:
node-version: ${{ matrix.node_version }}
architecture: ${{ matrix.arch }}
architecture: ${{ matrix.system.arch }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand All @@ -75,26 +76,33 @@ jobs:
cd bin-package
echo "asset=$(echo *.tar.gz)" >> "$GITHUB_OUTPUT"
- name: Upload release asset
run: gh release upload ${{ github.event.release.tag_name }} bin-package/${{ steps.build.outputs.asset }} --clobber
run: gh release upload ${{ github.event.release.tag_name }}${{ github.event.inputs.name }} bin-package/${{ steps.build.outputs.asset }} --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-github-docker:
runs-on: ubuntu-22.04
runs-on: ${{ matrix.os }}
container:
image: node:${{ matrix.node_version }}-alpine
strategy:
fail-fast: false
matrix:
node_version:
- '14'
- '16'
- '18'
- 16
- 18
- 20
os:
- buildjet-2vcpu-ubuntu-2204
- buildjet-4vcpu-ubuntu-2204-arm
steps:
- run: apk add build-base git python3 wget github-cli
- uses: actions/checkout@v2
# https:/actions/runner/issues/801#issuecomment-1374967227
- run: |
apk add gcompat
sed -i "s:ID=alpine:ID=NotpineForGHA:" /etc/os-release
- uses: actions/checkout@v3
with:
ref: ${{ github.event.release.tag_name }}
ref: ${{ github.event.release.tag_name }}${{ github.ref }}
- uses: c-hive/gha-yarn-cache@v1
- uses: actions-rs/toolchain@v1
with:
Expand All @@ -112,11 +120,12 @@ jobs:
- name: Upload release asset
run: |
git config --global --add safe.directory $(pwd)
gh release upload ${{ github.event.release.tag_name }} bin-package/${{ steps.build.outputs.asset }} --clobber
gh release upload ${{ github.event.release.tag_name }}${{ github.event.inputs.name }} bin-package/${{ steps.build.outputs.asset }} --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-npm:
if: '${{ github.event.release.tag_name }}'
needs:
- publish-github
- publish-github-docker
Expand All @@ -128,7 +137,7 @@ jobs:
- uses: c-hive/gha-yarn-cache@v1
- uses: actions/[email protected]
with:
node-version: 14
node-version: 16
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand Down
68 changes: 21 additions & 47 deletions .github/workflows/typescript-napi-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,54 +17,24 @@ jobs:
- stable
- beta
node_version:
- 14
- 16
- 18
- 20
system:
- os: macos-12
target: x86_64-apple-darwin
- os: ubuntu-22.04
arch: x64
- os: buildjet-2vcpu-ubuntu-2204
target: x86_64-unknown-linux-gnu
arch: x64
- os: buildjet-4vcpu-ubuntu-2204-arm
target: arm64-unknown-linux-gnu
arch: arm64
- os: windows-2019
target: x86_64-pc-windows-msvc
arch:
- x64
include:
- system:
os:
- self-hosted
- macOS
- ARM64
target: aarch64-apple-darwin
node_version: 16
rust_version: stable
arch: arm64
- system:
os:
- self-hosted
- macOS
- ARM64
target: aarch64-apple-darwin
node_version: 16
rust_version: beta
arch: arm64
- system:
os:
- self-hosted
- macOS
- ARM64
target: aarch64-apple-darwin
node_version: 18
rust_version: stable
arch: arm64
- system:
os:
- self-hosted
- macOS
- ARM64
target: aarch64-apple-darwin
node_version: 18
rust_version: beta
arch: x64
- os: [self-hosted, macOS, ARM64]
target: aarch64-apple-darwin
arch: arm64
fail-fast: false
steps:
Expand All @@ -73,7 +43,7 @@ jobs:
with:
node-version: ${{ matrix.node_version }}
cache: yarn
architecture: ${{ matrix.arch }}
architecture: ${{ matrix.system.arch }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand All @@ -94,24 +64,30 @@ jobs:
delta: 0.2
afterSwitchCommand: yarn install --ignore-scripts && yarn run compile
accessToken: ${{ secrets.WORKFLOW_PAT }}

test-docker:
runs-on: ${{ matrix.os }}
container:
image: node:${{ matrix.node_version }}-alpine
strategy:
matrix:
rust_version:
- stable
- beta
node_version:
- 14
- 16
- 18
arch:
- x64
- 20
os:
- ubuntu-22.04
- buildjet-2vcpu-ubuntu-2204
- buildjet-4vcpu-ubuntu-2204-arm
fail-fast: false
steps:
- run: apk add build-base git python3 wget
# https:/actions/runner/issues/801#issuecomment-1374967227
- run: |
apk add gcompat
sed -i "s:ID=alpine:ID=NotpineForGHA:" /etc/os-release
- run: echo RUSTFLAGS="-C target-feature=-crt-static" >> "${GITHUB_ENV}"
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
Expand All @@ -125,5 +101,3 @@ jobs:
run: yarn run compile
- name: Run tests
run: yarn run test
container:
image: node:${{ matrix.node_version }}-alpine
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ This library uses the [Neon Bindings](https://www.neon-bindings.com) toolchain t

## Supported Platforms

| | Node 14 | Node 16 | Node 18 |
| --------------------- | ------- | ------- | ------- |
| Linux x64 - glibc ||||
| Linux x64 - musl-libc ||||
| OSX x64 ||||
| Windows x64 ||||
| | Node 16 | Node 18 | Node 20 |
| ----------------------- | ------- | ------- | ------- |
| Linux x64 - glibc ||||
| Linux x64 - musl-libc ||||
| Linux arm64 - glibc ||||
| Linux arm64 - musl-libc ||||
| OSX x64 ||||
| OSX arm64 ||||
| Windows x64 ||||

## Install

Expand Down

0 comments on commit ab3c005

Please sign in to comment.