Skip to content

Commit

Permalink
fix: update toolchain in ci workflow (#17)
Browse files Browse the repository at this point in the history
* fix: update toolchain in ci workflow

* fix: cache target

* chore: test publish

* fix: remove universal build

* fix: ci
  • Loading branch information
ClarkXia authored Nov 30, 2023
1 parent bd5a592 commit 555c734
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
- name: Install Rust Toolchain
uses: ./.github/actions/rustup
with:
save-cache: ${{ github.ref_name == 'main' }}
save-cache: ${{ github.ref_name == 'master' }}
shared-key: check

# Compile test without debug info for reducing the CI cache size
Expand Down
31 changes: 2 additions & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable
if: ${{ !matrix.settings.docker }}
with:
toolchain: nightly-2023-06-02
toolchain: nightly-2023-10-24
targets: ${{ matrix.settings.target }}

- name: Cache cargo
Expand Down Expand Up @@ -105,38 +105,11 @@ jobs:
name: bindings-${{ matrix.settings.target }}
path: crates/node_binding/${{ env.APP_NAME }}.*.node
if-no-files-found: error
universal-macOS:
name: Build universal macOS binary
needs:
- build
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Pnpm Cache # Required by some tests
uses: ./.github/actions/pnpm-cache
- name: Download macOS x64 artifact
uses: actions/download-artifact@v3
with:
name: bindings-x86_64-apple-darwin
path: crates/node_binding/
- name: Download macOS arm64 artifact
uses: actions/download-artifact@v3
with:
name: bindings-aarch64-apple-darwin
path: crates/node_binding/
- name: Combine binaries
run: cd crates/node_binding && pnpm universal
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: bindings-universal-apple-darwin
path: crates/node_binding/${{ env.APP_NAME }}.*.node
if-no-files-found: error
publish:
name: Publish
runs-on: ubuntu-latest
needs:
- universal-macOS
- build
steps:
- uses: actions/checkout@v4
- name: Pnpm Cache # Required by some tests
Expand Down
1 change: 0 additions & 1 deletion crates/node_binding/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"build:debug": "napi build --platform",
"build:debug:aarch64": "napi build --platform --target aarch64-apple-darwin",
"prepublishOnly": "napi prepublish -t npm",
"universal": "napi universal",
"version": "napi version"
}
}

0 comments on commit 555c734

Please sign in to comment.