chore(cli): update ci template (#1771)

This commit is contained in:
LongYinan 2023-11-01 18:02:55 +08:00 committed by GitHub
parent b0fd67fae4
commit 0c6656d192
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,10 +111,10 @@ jobs:
runs-on: \${{ matrix.settings.host }} runs-on: \${{ matrix.settings.host }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup node - name: Setup node
uses: actions/setup-node@v3 uses: actions/setup-node@v4
if: \${{ !matrix.settings.docker }} if: \${{ !matrix.settings.docker }}
with: with:
node-version: 18 node-version: 18
@ -141,7 +141,7 @@ jobs:
- uses: goto-bus-stop/setup-zig@v2 - uses: goto-bus-stop/setup-zig@v2
if: \${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' }} if: \${{ matrix.settings.target == 'armv7-unknown-linux-gnueabihf' }}
with: with:
version: 0.10.1 version: 0.11.0
- name: Setup toolchain - name: Setup toolchain
run: \${{ matrix.settings.setup }} run: \${{ matrix.settings.setup }}
@ -157,7 +157,7 @@ jobs:
run: yarn install run: yarn install
- name: Setup node x86 - name: Setup node x86
uses: actions/setup-node@v3 uses: actions/setup-node@v4
if: matrix.settings.target == 'i686-pc-windows-msvc' if: matrix.settings.target == 'i686-pc-windows-msvc'
with: with:
node-version: 18 node-version: 18
@ -188,32 +188,32 @@ jobs:
runs-on: macos-12 runs-on: macos-12
name: Build FreeBSD name: Build FreeBSD
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Build - name: Build
id: build id: build
uses: vmactions/freebsd-vm@v0 uses: cross-platform-actions/action@v0.21.0
env: env:
DEBUG: 'napi:*' DEBUG: 'napi:*'
RUSTUP_HOME: /usr/local/rustup
CARGO_HOME: /usr/local/cargo
RUSTUP_IO_THREADS: 1 RUSTUP_IO_THREADS: 1
with: with:
envs: 'DEBUG RUSTUP_HOME CARGO_HOME RUSTUP_IO_THREADS' operating_system: freebsd
usesh: true version: '13.2'
mem: 3000 memory: 13G
cpu_count: 3
environment_variables: 'DEBUG RUSTUP_IO_THREADS'
shell: bash
prepare: | prepare: |
pkg install -y -f curl node libnghttp2 npm yarn sudo pkg install -y -f curl node libnghttp2 npm
sudo npm install -g yarn --ignore-scripts
curl https://sh.rustup.rs -sSf --output rustup.sh curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain beta sh rustup.sh -y --profile minimal --default-toolchain stable
export PATH="/usr/local/cargo/bin:$PATH" source "$HOME/.cargo/env"
echo "~~~~ rustc --version ~~~~" echo "~~~~ rustc --version ~~~~"
rustc --version rustc --version
echo "~~~~ node -v ~~~~" echo "~~~~ node -v ~~~~"
node -v node -v
echo "~~~~ yarn --version ~~~~" echo "~~~~ yarn --version ~~~~"
yarn --version yarn --version
run: |
export PATH="/usr/local/cargo/bin:$PATH"
pwd pwd
ls -lah ls -lah
whoami whoami
@ -246,13 +246,14 @@ jobs:
- host: windows-latest - host: windows-latest
target: 'x86_64-pc-windows-msvc' target: 'x86_64-pc-windows-msvc'
node: ['16', '18'] node: ['16', '18']
node: ['18', '20']
runs-on: \${{ matrix.settings.host }} runs-on: \${{ matrix.settings.host }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup node - name: Setup node
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: \${{ matrix.node }} node-version: \${{ matrix.node }}
cache: 'yarn' cache: 'yarn'
@ -281,13 +282,14 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
node: ['16', '18'] node: ['16', '18']
node: ['18', '20']
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup node - name: Setup node
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: \${{ matrix.node }} node-version: \${{ matrix.node }}
cache: 'yarn' cache: 'yarn'
@ -316,13 +318,14 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
node: ['16', '18'] node: ['16', '18']
node: ['18', '20']
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup node - name: Setup node
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: \${{ matrix.node }} node-version: \${{ matrix.node }}
cache: 'yarn' cache: 'yarn'
@ -353,10 +356,11 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
node: ['16', '18'] node: ['16', '18']
node: ['18', '20']
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Download artifacts - name: Download artifacts
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
@ -375,7 +379,7 @@ jobs:
yarn install yarn install
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v3
with: with:
platforms: arm64 platforms: arm64
- run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
@ -402,7 +406,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Download artifacts - name: Download artifacts
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
@ -421,7 +425,7 @@ jobs:
yarn install yarn install
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v3
with: with:
platforms: arm64 platforms: arm64
- run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
@ -443,10 +447,11 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
node: ['16', '18'] node: ['16', '18']
node: ['18', '20']
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Download artifacts - name: Download artifacts
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
@ -464,7 +469,7 @@ jobs:
yarn install yarn install
- name: Set up QEMU - name: Set up QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v3
with: with:
platforms: arm platforms: arm
- run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
@ -486,10 +491,10 @@ jobs:
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup node - name: Setup node
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: 18 node-version: 18
cache: yarn cache: yarn
@ -531,10 +536,10 @@ jobs:
- build-freebsd - build-freebsd
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup node - name: Setup node
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: 18 node-version: 18
cache: 'yarn' cache: 'yarn'