From 7bec5b49b511eb829c943051e7a74fcc2c498ab7 Mon Sep 17 00:00:00 2001 From: ClarkXia Date: Thu, 9 May 2024 12:59:12 +0800 Subject: [PATCH] fix: ci --- .github/workflows/CI.yml | 346 +++++++++++++++++++-------------------- 1 file changed, 173 insertions(+), 173 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1dfea46..f5ae1d2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -130,179 +130,179 @@ jobs: name: ${{ env.APP_NAME }}.${{ matrix.settings.name }}.node path: ${{ env.APP_NAME }}.*.node if-no-files-found: error - # test-macOS-windows-binding: - # name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }} - # needs: - # - build - # strategy: - # fail-fast: false - # matrix: - # settings: - # - host: macos-latest - # target: x86_64-apple-darwin - # - host: windows-latest - # target: x86_64-pc-windows-msvc - # node: - # - '16' - # - '18' - # runs-on: ${{ matrix.settings.host }} - # steps: - # - uses: actions/checkout@v3 - # - name: Setup node - # uses: actions/setup-node@v3 - # with: - # node-version: ${{ matrix.node }} - # check-latest: true - # cache: yarn - # - name: Install dependencies - # run: yarn install - # - name: Download artifacts - # uses: actions/download-artifact@v3 - # with: - # name: bindings-${{ matrix.settings.target }} - # path: . - # - name: List packages - # run: ls -R . - # shell: bash - # - name: Test bindings - # run: yarn test - # test-linux-x64-gnu-binding: - # name: Test bindings on Linux-x64-gnu - node@${{ matrix.node }} - # needs: - # - build - # strategy: - # fail-fast: false - # matrix: - # node: - # - '16' - # - '18' - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - name: Setup node - # uses: actions/setup-node@v3 - # with: - # node-version: ${{ matrix.node }} - # check-latest: true - # cache: yarn - # - name: Install dependencies - # run: yarn install - # - name: Download artifacts - # uses: actions/download-artifact@v3 - # with: - # name: bindings-x86_64-unknown-linux-gnu - # path: . - # - name: List packages - # run: ls -R . - # shell: bash - # - name: Test bindings - # run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim yarn test - # test-linux-x64-musl-binding: - # name: Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }} - # needs: - # - build - # strategy: - # fail-fast: false - # matrix: - # node: - # - '16' - # - '18' - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - name: Setup node - # uses: actions/setup-node@v3 - # with: - # node-version: ${{ matrix.node }} - # check-latest: true - # cache: yarn - # - name: Install dependencies - # run: | - # yarn config set supportedArchitectures.libc "musl" - # yarn install - # - name: Download artifacts - # uses: actions/download-artifact@v3 - # with: - # name: bindings-x86_64-unknown-linux-musl - # path: . - # - name: List packages - # run: ls -R . - # shell: bash - # - name: Test bindings - # run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-alpine yarn test - # test-linux-aarch64-gnu-binding: - # name: Test bindings on aarch64-unknown-linux-gnu - node@${{ matrix.node }} - # needs: - # - build - # strategy: - # fail-fast: false - # matrix: - # node: - # - '16' - # - '18' - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - name: Download artifacts - # uses: actions/download-artifact@v3 - # with: - # name: bindings-aarch64-unknown-linux-gnu - # path: . - # - name: List packages - # run: ls -R . - # shell: bash - # - name: Install dependencies - # run: | - # yarn config set supportedArchitectures.cpu "arm64" - # yarn config set supportedArchitectures.libc "glibc" - # yarn install - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v3 - # 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:${{ matrix.node }}-slim - # options: '--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build' - # run: | - # set -e - # yarn test - # ls -la - # test-linux-aarch64-musl-binding: - # name: Test bindings on aarch64-unknown-linux-musl - node@lts - # needs: - # - build - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - name: Download artifacts - # uses: actions/download-artifact@v3 - # with: - # name: bindings-aarch64-unknown-linux-musl - # path: . - # - name: List packages - # run: ls -R . - # shell: bash - # - name: Install dependencies - # run: | - # yarn config set supportedArchitectures.cpu "arm64" - # yarn config set supportedArchitectures.libc "musl" - # yarn install - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v3 - # 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 - # yarn test + test-macOS-windows-binding: + name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }} + needs: + - build + strategy: + fail-fast: false + matrix: + settings: + - host: macos-latest + target: x86_64-apple-darwin + - host: windows-latest + target: x86_64-pc-windows-msvc + node: + - '16' + - '18' + runs-on: ${{ matrix.settings.host }} + steps: + - uses: actions/checkout@v3 + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + check-latest: true + cache: yarn + - name: Install dependencies + run: yarn install + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: bindings-${{ matrix.settings.target }} + path: . + - name: List packages + run: ls -R . + shell: bash + - name: Test bindings + run: yarn test + test-linux-x64-gnu-binding: + name: Test bindings on Linux-x64-gnu - node@${{ matrix.node }} + needs: + - build + strategy: + fail-fast: false + matrix: + node: + - '16' + - '18' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + check-latest: true + cache: yarn + - name: Install dependencies + run: yarn install + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: bindings-x86_64-unknown-linux-gnu + path: . + - name: List packages + run: ls -R . + shell: bash + - name: Test bindings + run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-slim yarn test + test-linux-x64-musl-binding: + name: Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }} + needs: + - build + strategy: + fail-fast: false + matrix: + node: + - '16' + - '18' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + check-latest: true + cache: yarn + - name: Install dependencies + run: | + yarn config set supportedArchitectures.libc "musl" + yarn install + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: bindings-x86_64-unknown-linux-musl + path: . + - name: List packages + run: ls -R . + shell: bash + - name: Test bindings + run: docker run --rm -v $(pwd):/build -w /build node:${{ matrix.node }}-alpine yarn test + test-linux-aarch64-gnu-binding: + name: Test bindings on aarch64-unknown-linux-gnu - node@${{ matrix.node }} + needs: + - build + strategy: + fail-fast: false + matrix: + node: + - '16' + - '18' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: bindings-aarch64-unknown-linux-gnu + path: . + - name: List packages + run: ls -R . + shell: bash + - name: Install dependencies + run: | + yarn config set supportedArchitectures.cpu "arm64" + yarn config set supportedArchitectures.libc "glibc" + yarn install + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + 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:${{ matrix.node }}-slim + options: '--platform linux/arm64 -v ${{ github.workspace }}:/build -w /build' + run: | + set -e + yarn test + ls -la + test-linux-aarch64-musl-binding: + name: Test bindings on aarch64-unknown-linux-musl - node@lts + needs: + - build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: bindings-aarch64-unknown-linux-musl + path: . + - name: List packages + run: ls -R . + shell: bash + - name: Install dependencies + run: | + yarn config set supportedArchitectures.cpu "arm64" + yarn config set supportedArchitectures.libc "musl" + yarn install + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + 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 + yarn test universal-macOS: name: Build universal macOS binary needs: