From cdfd4c85e42e912767893d1f3c1ed5d4867a51af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Thu, 4 Jul 2024 12:24:05 +0900 Subject: [PATCH] fix(ci): Restore disabled CI checks (#9002) --- .github/workflows/publish-core.yml | 97 +++++++++++++++--------------- 1 file changed, 50 insertions(+), 47 deletions(-) diff --git a/.github/workflows/publish-core.yml b/.github/workflows/publish-core.yml index ea0d44db7a3a..a5b85eb737ef 100644 --- a/.github/workflows/publish-core.yml +++ b/.github/workflows/publish-core.yml @@ -2,7 +2,7 @@ name: Publish (core) concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.event_name != 'push' }} + cancel-in-progress: true env: DEBUG: napi:* @@ -202,6 +202,7 @@ jobs: options: -v ${{ env.HOME }}/.cargo/git:/root/.cargo/git -v ${{ env.HOME }}/.cargo/registry:/root/.cargo/registry -v ${{ github.workspace }}:/build -w /build run: >- cd ./packages/core && + npm install -f -g yarn@1.22.19 && corepack enable && npm i -g wasm-pack && ${{ matrix.settings.build }} @@ -232,7 +233,7 @@ jobs: target: x86_64-apple-darwin node: - "18" - # - "20" + - "20" runs-on: ${{ matrix.settings.host }} steps: - uses: actions/checkout@v4 @@ -270,7 +271,7 @@ jobs: matrix: node: - "18" - # - "20" + - "20" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -294,7 +295,7 @@ jobs: - name: Build TypeScript run: yarn build:ts - name: Test bindings - run: docker run --rm -v $(pwd):/swc -w /swc node:${{ matrix.node }}-slim env DISABLE_PLUGIN_E2E_TESTS=true yarn test + run: docker run --rm -v $(pwd):/swc -w /swc node:${{ matrix.node }}-slim sh -c 'npm install -f -g yarn@1.22.19 && env DISABLE_PLUGIN_E2E_TESTS=true yarn test' test-linux-x64-musl-binding: if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/ci') }} name: Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }} @@ -305,7 +306,7 @@ jobs: matrix: node: - "18" - # - "20" + - "20" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -332,46 +333,47 @@ jobs: - name: Build TypeScript run: yarn build:ts - name: Test bindings - run: docker run --rm -v $(pwd):/swc -w /swc node:${{ matrix.node }}-alpine env DISABLE_PLUGIN_E2E_TESTS=true yarn test - # test-linux-aarch64-musl-binding: - # if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/ci') }} - # name: Test bindings on aarch64-unknown-linux-musl - node@lts - # needs: - # - build - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # - name: Corepack - # run: corepack enable - # - name: Download artifacts - # uses: actions/download-artifact@v3 - # with: - # name: bindings-aarch64-unknown-linux-musl - # path: ./packages/core - # - name: List packages - # run: ls -R . - # shell: bash - # - name: Install dependencies - # run: | - # corepack enable - # yarn config set supportedArchitectures.cpu "arm64" - # yarn config set supportedArchitectures.libc "musl" - # yarn install - # - name: Build TypeScript - # run: yarn build:ts - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v2 - # with: - # platforms: arm64 - # - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - # - name: Setup and run tests - # uses: addnab/docker-run-action@v3 - # with: - # image: node:lts-alpine - # options: "--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build" - # run: >- - # set -e && - # DISABLE_PLUGIN_E2E_TESTS=true yarn test + run: docker run --rm -v $(pwd):/swc -w /swc node:${{ matrix.node }}-alpine sh -c 'npm install -f -g yarn@1.22.19 && env DISABLE_PLUGIN_E2E_TESTS=true yarn test' + test-linux-aarch64-musl-binding: + if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/ci') }} + name: Test bindings on aarch64-unknown-linux-musl - node@lts + needs: + - build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Corepack + run: corepack enable + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: bindings-aarch64-unknown-linux-musl + path: ./packages/core + - name: List packages + run: ls -R . + shell: bash + - name: Install dependencies + run: | + corepack enable + yarn config set supportedArchitectures.cpu "arm64" + yarn config set supportedArchitectures.libc "musl" + yarn install + - name: Build TypeScript + run: yarn build:ts + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: arm64 + - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + - name: Setup and run tests + uses: addnab/docker-run-action@v3 + with: + image: node:lts-alpine + options: "--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build" + run: >- + set -e && + npm install -f -g yarn@1.22.19 && + DISABLE_PLUGIN_E2E_TESTS=true yarn test test-linux-arm-gnueabihf-binding: if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/ci') }} @@ -383,7 +385,7 @@ jobs: matrix: node: - "18" - # - "20" + - "20" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -416,6 +418,7 @@ jobs: options: "--platform linux/arm/v7 -v ${{ github.workspace }}:/build -w /build" run: >- set -e && + npm install -f -g yarn@1.22.19 && DISABLE_PLUGIN_E2E_TESTS=true yarn test && ls -la publish: @@ -426,7 +429,7 @@ jobs: - test-linux-x64-musl-binding - test-linux-arm-gnueabihf-binding - test-macOS-windows-binding - # - test-linux-aarch64-musl-binding + - test-linux-aarch64-musl-binding steps: - uses: actions/checkout@v4