Files
Wireguard-tools.js/.github/workflows/test.yml
Matheus Sampaio Queiroga 362cd41953
Some checks failed
Test / linux_test (16.x, aarch64, linux) (pull_request) Failing after 2m18s
Test / linux_test (16.x, x86_64, linux) (pull_request) Failing after 2m32s
Test / linux_test (18.x, x86_64, linux) (pull_request) Failing after 2m29s
Test / linux_test (18.x, aarch64, linux) (pull_request) Failing after 2m42s
Test / linux_test (19.x, aarch64, linux) (pull_request) Failing after 2m21s
Test / linux_test (20.x, aarch64, linux) (pull_request) Failing after 2m37s
Test / linux_test (19.x, x86_64, linux) (pull_request) Failing after 2m39s
Test / linux_test (20.x, x86_64, linux) (pull_request) Failing after 3m10s
Test / linux_test (21.x, aarch64, linux) (pull_request) Failing after 1m36s
Test / linux_test (21.x, x86_64, linux) (pull_request) Failing after 1m19s
Test / Pack npm package (pull_request) Has been skipped
Goodbye node-gyp and commonjs
We are saying goodbye to node-gyp and commonjs, I am currently migrating several tools to ESM, and wireguard-tools.js was one of them.

I'm saying goodbye to node-gyp, it ended up becoming a difficult tool to use with wireguard-tools.js, wg.js uses several other programming languages, much more than C and C++, and rebory it brings new features that node-gyp doesn't have.
2024-02-15 23:37:33 -03:00

84 lines
2.0 KiB
YAML

name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
linux_test:
runs-on: ubuntu-latest
strategy:
matrix:
node_version: [ 16.x, 18.x, 19.x, 20.x, 21.x ]
target_arch: [ "x86_64", "aarch64" ]
target_os:
- "linux"
# - "windows"
# - "macos"
steps:
- uses: actions/checkout@v4
name: Checkout
- name: "Setup zig"
uses: korandoru/setup-zig@v1
with:
zig-version: "master"
- uses: actions/setup-node@v4
name: Setup Node.js
with:
node-version: ${{ matrix.node_version }}
- name: Install dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt update
sudo apt install -y "binutils-multiarch" "build-essential"
npm install --no-save --ignore-scripts
- name: Build addon
run: npm run dev -- --target_zig=${{ matrix.target_arch }}-${{ matrix.target_os }}
- name: Upload prebuilds interface
uses: actions/upload-artifact@v3
with:
retention-days: 7
name: prebuilds_${{ matrix.target_arch }}-${{ matrix.target_os }}_${{ matrix.node_version }}
path: "prebuilds/**"
- name: Test
run: node --require ts-node/register --loader ts-node/esm ./src/index_test.ts
pack_package:
needs: linux_test
runs-on: ubuntu-latest
name: Pack npm package
env:
PACKAGE_VERSION: ${{ github.ref }}
steps:
- uses: actions/checkout@v4
name: Code checkout
- uses: actions/setup-node@v4
name: Setup node.js
with:
node-version: 20.x
registry-url: https://registry.npmjs.org/
- name: Download all artefacts
uses: actions/download-artifact@v3
with:
path: ./prebuilds
- run: npm install --no-save --ignore-scripts
- run: npm pack
- name: Upload npm package
uses: actions/upload-artifact@v3
with:
name: Package_Pack
path: "*.tgz"