From 1e8cbcc8fb8c67bd50e140a68b4d0040b78bf1df Mon Sep 17 00:00:00 2001 From: Siim Kallas Date: Fri, 8 Dec 2023 19:35:41 +0200 Subject: [PATCH 1/7] attempt arm64 prebuilds --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef7bfe98..5968f2af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,32 @@ jobs: with: name: prebuilds-linux path: prebuilds + prebuilds-linux-arm64: + runs-on: [self-hosted, Linux, ARM64] + strategy: + fail-fast: false + matrix: + container: ['node:14.0.0'] + node_api_target: ['14.0.0', '15.0.0', '16.0.0', '17.0.1', '18.0.0'] + include: + - container: 'node:16.0.0' + node_api_target: '20.0.0' + - container: 'node:16.0.0' + node_api_target: '21.2.0' + container: ${{ matrix.container }} + steps: + - name: Checkout + uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + - name: Install npm dependencies + run: npm ci --ignore-scripts --no-optional + - name: Prebuild + run: npm run prebuild:os ${{ matrix.node_api_target }} + - name: upload prebuilds + uses: actions/upload-artifact@v3 + with: + name: prebuilds-linux-arm64 + path: prebuilds prebuilds-macos-windows: strategy: From 17fc555a731efa55068686f988d599f49d22778f Mon Sep 17 00:00:00 2001 From: Siim Kallas Date: Fri, 8 Dec 2023 19:42:20 +0200 Subject: [PATCH 2/7] run tests on ARM64 --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5968f2af..c8e73f14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,7 @@ jobs: path: prebuilds create-package: - needs: [prebuilds-linux, prebuilds-macos-windows] + needs: [prebuilds-linux, prebuilds-macos-windows, prebuilds-linux-arm64] runs-on: ubuntu-latest steps: - name: Checkout @@ -106,6 +106,7 @@ jobs: mkdir -p prebuilds cp -r prebuilds-linux/* prebuilds cp -r prebuilds-macos-windows/* prebuilds + cp -r prebuilds-linux-arm64/* prebuilds - name: Install npm dependencies run: npm ci --ignore-scripts - name: Build @@ -125,7 +126,7 @@ jobs: strategy: fail-fast: false matrix: - os: ['ubuntu-latest', 'windows-2019', 'macos-latest'] + os: ['ubuntu-latest', 'windows-2019', 'macos-latest', 'ARM64'] nodejs: ['14', '16', '17', '18', '20', '21'] include: - os: 'macos-latest' From e83ef773a03d9c817450d9abf7bdd5f89867c353 Mon Sep 17 00:00:00 2001 From: Siim Kallas Date: Fri, 8 Dec 2023 20:02:19 +0200 Subject: [PATCH 3/7] permission workaround --- .github/workflows/ci.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8e73f14..a12dd6f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: container: ${{ matrix.container }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - uses: actions/setup-node@v3 - name: Install npm dependencies run: npm ci --ignore-scripts --no-optional @@ -46,7 +46,7 @@ jobs: container: ${{ matrix.container }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - uses: actions/setup-node@v3 - name: Install npm dependencies run: npm ci --ignore-scripts --no-optional @@ -70,7 +70,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python_version }} @@ -92,7 +92,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: python-version: '3.11' @@ -135,8 +135,12 @@ jobs: nodejs: '14' python_version: '3.10' steps: + - name: chown user + if: ${{ matrix.os == 'ARM64' }} + run: | + sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python_version }} @@ -157,7 +161,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 1 - uses: actions/setup-node@v3 @@ -185,7 +189,7 @@ jobs: - name: Setup container run: ${{ matrix.cmd }} - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install npm dependencies run: npm ci --ignore-scripts --no-optional - name: Compile native @@ -216,7 +220,7 @@ jobs: - name: Setup container run: ${{ matrix.cmd }} - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download uses: actions/download-artifact@v3 - name: copy prebuilds @@ -249,7 +253,7 @@ jobs: name: e2e local ${{ matrix.name }} steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Test ${{ matrix.name }} example working-directory: test/examples run: docker-compose -f e2e.docker-compose.yml ${{ matrix.target }} up --exit-code-from test From 258f73717547bac7142622e2ee024a6e6ce38d5f Mon Sep 17 00:00:00 2001 From: Siim Kallas Date: Fri, 8 Dec 2023 20:04:31 +0200 Subject: [PATCH 4/7] revert to checkout v3 --- .github/workflows/ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a12dd6f2..a039e781 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: container: ${{ matrix.container }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 - uses: actions/setup-node@v3 - name: Install npm dependencies run: npm ci --ignore-scripts --no-optional @@ -46,7 +46,7 @@ jobs: container: ${{ matrix.container }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 - uses: actions/setup-node@v3 - name: Install npm dependencies run: npm ci --ignore-scripts --no-optional @@ -70,7 +70,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python_version }} @@ -92,7 +92,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: python-version: '3.11' @@ -140,7 +140,7 @@ jobs: run: | sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python_version }} @@ -161,7 +161,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 with: fetch-depth: 1 - uses: actions/setup-node@v3 @@ -189,7 +189,7 @@ jobs: - name: Setup container run: ${{ matrix.cmd }} - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Install npm dependencies run: npm ci --ignore-scripts --no-optional - name: Compile native @@ -220,7 +220,7 @@ jobs: - name: Setup container run: ${{ matrix.cmd }} - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Download uses: actions/download-artifact@v3 - name: copy prebuilds @@ -253,7 +253,7 @@ jobs: name: e2e local ${{ matrix.name }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Test ${{ matrix.name }} example working-directory: test/examples run: docker-compose -f e2e.docker-compose.yml ${{ matrix.target }} up --exit-code-from test From cca9e6f59eaeb34929b83f0469b34c037447d458 Mon Sep 17 00:00:00 2001 From: Siim Kallas Date: Fri, 8 Dec 2023 20:10:27 +0200 Subject: [PATCH 5/7] separate arm unit tests --- .github/workflows/ci.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a039e781..4f640311 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -126,7 +126,7 @@ jobs: strategy: fail-fast: false matrix: - os: ['ubuntu-latest', 'windows-2019', 'macos-latest', 'ARM64'] + os: ['ubuntu-latest', 'windows-2019', 'macos-latest'] nodejs: ['14', '16', '17', '18', '20', '21'] include: - os: 'macos-latest' @@ -135,10 +135,6 @@ jobs: nodejs: '14' python_version: '3.10' steps: - - name: chown user - if: ${{ matrix.os == 'ARM64' }} - run: | - sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v3 - uses: actions/setup-python@v4 @@ -157,6 +153,25 @@ jobs: with: verbose: true + unit-tests-arm64: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ['ARM64'] + nodejs: ['14', '16', '17', '18', '20', '21'] + container: node:${{ nodejs }} + steps: + - name: Checkout + uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python_version }} + - name: Install npm dependencies + run: npm ci + - name: Test + run: npm run test + build: runs-on: ubuntu-latest steps: From fa535ae00986f7c39b8ffecd3bcf2da4b7c4e27d Mon Sep 17 00:00:00 2001 From: Siim Kallas Date: Fri, 8 Dec 2023 20:15:29 +0200 Subject: [PATCH 6/7] fix arm container --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f640311..8b1286f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -160,7 +160,7 @@ jobs: matrix: os: ['ARM64'] nodejs: ['14', '16', '17', '18', '20', '21'] - container: node:${{ nodejs }} + container: node:${{ matrix.nodejs }} steps: - name: Checkout uses: actions/checkout@v3 From 88c3f0556c446ba7f2a1e3d961b4cebae3be469f Mon Sep 17 00:00:00 2001 From: Siim Kallas Date: Fri, 8 Dec 2023 22:18:16 +0200 Subject: [PATCH 7/7] use unsafe-perm on arm64 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8b1286f7..f059f8cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -168,7 +168,7 @@ jobs: with: python-version: ${{ matrix.python_version }} - name: Install npm dependencies - run: npm ci + run: npm ci --unsafe-perm - name: Test run: npm run test