Files
Wireguard-tools.js/.github/workflows/test.yml
T
Sirherobrine23 499cf79734
Test / linux_test (16.x, x86_64, linux) (push) Successful in 2m18s
Test / linux_test (16.x, aarch64, linux) (push) Successful in 2m20s
Test / linux_test (18.x, aarch64, linux) (push) Successful in 2m23s
Test / linux_test (18.x, x86_64, linux) (push) Successful in 3m4s
Test / linux_test (20.x, aarch64, linux) (push) Successful in 2m51s
Test / linux_test (19.x, x86_64, linux) (push) Successful in 2m57s
Test / linux_test (20.x, x86_64, linux) (push) Successful in 2m12s
Test / linux_test (21.x, x86_64, linux) (push) Successful in 1m30s
Test / Pack npm package (push) Failing after 3m12s
Test / linux_test (19.x, aarch64, linux) (push) Successful in 2m59s
Test / linux_test (21.x, aarch64, linux) (push) Successful in 1m32s
Update builder and migrate to ESM (#3)
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.

Reviewed-on: https://sirherobrine23.org/Wireguard/Wireguard-tools.js/pulls/3
2024-02-17 16:41:49 +00: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"