From fcae7f6234d67ead5b7e3b7172f1afd389f25923 Mon Sep 17 00:00:00 2001 From: Nodari Chkuaselidze Date: Wed, 15 Jan 2025 15:04:39 +0400 Subject: [PATCH] ci: update versions and fix node v14. --- .github/workflows/node.js.yml | 57 ++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 15 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 9afdc48b..eecbd336 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -7,9 +7,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: 22.x @@ -24,15 +24,21 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [18.x, 20.x] + node: [14.x, 16.x, 18.x, 20.x, 22.x] script: [test-js, test-bigint] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} + # Pythong 3.10->3.11 broke node-gyp. This upgrades node-gyp for older nodejs. + # https://github.com/nodejs/node-gyp/issues/2219 + - name: Update npm. + if: contains(matrix.node, '14.x') + run: npm i -g npm@9 + - name: Install dependencies run: npm install @@ -44,11 +50,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node }} + node-version: 22.x - name: Install browserify tools run: npm install --location=global browserify @@ -59,21 +65,31 @@ jobs: - name: Browser run: npm run test-browser - build-native: name: Native runs-on: ${{ matrix.os }} strategy: matrix: os: [macos-latest, ubuntu-latest] - node: [18.x, 20.x] + node: [14.x, 16.x, 18.x, 20.x, 22.x] + exclude: + - os: macos-latest + node: 14.x + - os: macos-latest + node: 16.x steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} + # Pythong 3.10->3.11 broke node-gyp. This upgrades node-gyp for older nodejs. + # https://github.com/nodejs/node-gyp/issues/2219 + - name: Update npm. + if: contains(matrix.node, '14.x') + run: npm i -g npm@9 + - name: Install & Build run: npm install @@ -86,14 +102,25 @@ jobs: strategy: matrix: os: [macos-latest, ubuntu-latest] - node: [18.x, 20.x] + node: [14.x, 16.x, 18.x, 20.x, 22.x] + exclude: + - os: macos-latest + node: 14.x + - os: macos-latest + node: 16.x steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} + # Pythong 3.10->3.11 broke node-gyp. This upgrades node-gyp for older nodejs. + # https://github.com/nodejs/node-gyp/issues/2219 + - name: Update npm. + if: contains(matrix.node, '14.x') + run: npm i -g npm@9 + - name: Install & Build run: npm install