From 6ae57cec4fc36360a36374eb3d9085e2afb95bc6 Mon Sep 17 00:00:00 2001 From: ClarkXia Date: Wed, 1 Nov 2023 18:04:49 +0800 Subject: [PATCH] chore: remove comment --- .github/workflows/ci.yml | 86 +++++++++++++++++------------------ .github/workflows/release.yml | 44 +++++++++--------- 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95aef42..7deca7c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,56 +48,56 @@ jobs: - 'Cargo.toml' - 'rust-toolchain.toml' - # rust_check: - # name: Rust check - # needs: rust_changes - # if: ${{ needs.rust_changes.outputs.changed == 'true' }} - # runs-on: ${{ fromJSON(vars.LINUX_RUNNER_LABELS || '"ubuntu-latest"') }} - # steps: - # - uses: actions/checkout@v4 + rust_check: + name: Rust check + needs: rust_changes + if: ${{ needs.rust_changes.outputs.changed == 'true' }} + runs-on: ${{ fromJSON(vars.LINUX_RUNNER_LABELS || '"ubuntu-latest"') }} + steps: + - uses: actions/checkout@v4 - # - name: Pnpm Cache # Required by some tests - # uses: ./.github/actions/pnpm-cache + - name: Pnpm Cache # Required by some tests + uses: ./.github/actions/pnpm-cache - # - name: Clone Crates - # uses: ./.github/actions/clone-crates + - name: Clone Crates + uses: ./.github/actions/clone-crates - # - name: Install Rust Toolchain - # uses: ./.github/actions/rustup - # with: - # clippy: true - # fmt: true - # shared-key: check + - name: Install Rust Toolchain + uses: ./.github/actions/rustup + with: + clippy: true + fmt: true + shared-key: check - # - name: Run Cargo Check - # run: cargo check --workspace --all-targets # Not using --release because it uses too much cache, and is also slow. + - name: Run Cargo Check + run: cargo check --workspace --all-targets # Not using --release because it uses too much cache, and is also slow. - # rust_test: - # name: Rust test - # needs: rust_changes - # if: ${{ needs.rust_changes.outputs.changed == 'true' }} - # runs-on: ${{ fromJSON(vars.LINUX_RUNNER_LABELS || '"ubuntu-latest"') }} - # steps: - # - uses: actions/checkout@v4 + rust_test: + name: Rust test + needs: rust_changes + if: ${{ needs.rust_changes.outputs.changed == 'true' }} + runs-on: ${{ fromJSON(vars.LINUX_RUNNER_LABELS || '"ubuntu-latest"') }} + steps: + - uses: actions/checkout@v4 - # - name: Pnpm Cache # Required by some tests - # uses: ./.github/actions/pnpm-cache + - name: Pnpm Cache # Required by some tests + uses: ./.github/actions/pnpm-cache - # - name: Clone Crates - # uses: ./.github/actions/clone-crates + - name: Clone Crates + uses: ./.github/actions/clone-crates - # - name: Install Rust Toolchain - # uses: ./.github/actions/rustup - # with: - # save-cache: ${{ github.ref_name == 'main' }} - # shared-key: check + - name: Install Rust Toolchain + uses: ./.github/actions/rustup + with: + save-cache: ${{ github.ref_name == 'main' }} + shared-key: check - # # Compile test without debug info for reducing the CI cache size - # - name: Change profile.test - # shell: bash - # run: | - # echo '[profile.test]' >> Cargo.toml - # echo 'debug = false' >> Cargo.toml + # Compile test without debug info for reducing the CI cache size + - name: Change profile.test + shell: bash + run: | + echo '[profile.test]' >> Cargo.toml + echo 'debug = false' >> Cargo.toml - # - name: Run test - # run: pnpm test + - name: Run test + run: pnpm test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e6221ae..334198f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,15 +25,15 @@ jobs: fail-fast: false matrix: settings: - # - host: macos-latest - # target: x86_64-apple-darwin - # build: | - # cd crates/node_binding - # pnpm build - # strip -x *.node - # - host: windows-latest - # build: cd crates/node_binding && pnpm build - # target: x86_64-pc-windows-msvc + - host: macos-latest + target: x86_64-apple-darwin + build: | + cd crates/node_binding + pnpm build + strip -x *.node + - host: windows-latest + build: cd crates/node_binding && pnpm build + target: x86_64-pc-windows-msvc - host: ubuntu-latest target: x86_64-unknown-linux-gnu docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian @@ -43,19 +43,19 @@ jobs: unset CC_x86_64_unknown_linux_gnu && unset CC && pnpm build --target x86_64-unknown-linux-gnu && strip *.node - # - host: ubuntu-latest - # target: x86_64-unknown-linux-musl - # docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine - # build: cd crates/node_binding && set -e && pnpm build && strip *.node - # - host: macos-latest - # target: aarch64-apple-darwin - # build: | - # cd crates/node_binding - # pnpm build --target aarch64-apple-darwin - # strip -x *.node - # - host: windows-latest - # target: aarch64-pc-windows-msvc - # build: cd crates/node_binding && pnpm build --target aarch64-pc-windows-msvc + - host: ubuntu-latest + target: x86_64-unknown-linux-musl + docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine + build: cd crates/node_binding && set -e && pnpm build && strip *.node + - host: macos-latest + target: aarch64-apple-darwin + build: | + cd crates/node_binding + pnpm build --target aarch64-apple-darwin + strip -x *.node + - host: windows-latest + target: aarch64-pc-windows-msvc + build: cd crates/node_binding && pnpm build --target aarch64-pc-windows-msvc name: stable - ${{ matrix.settings.target }} - node@18 runs-on: ${{ matrix.settings.host }} steps: