generated from napi-rs/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-create-canvas-width-height-zero
- Loading branch information
Showing
42 changed files
with
1,507 additions
and
1,621 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: 'Setup rust' | ||
description: 'Rust setup, including cache configuration' | ||
inputs: | ||
targets: | ||
description: 'Cargo target' | ||
required: true | ||
components: | ||
description: 'Rustup components' | ||
required: false | ||
default: '' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Print rustup toolchain version | ||
shell: bash | ||
id: rustup-version | ||
run: | | ||
export RUST_TOOLCHAIN_VERSION="$(grep 'channel' rust-toolchain.toml | head -1 | awk -F '"' '{print $2}')" | ||
echo "Rust toolchain version: $RUST_TOOLCHAIN_VERSION" | ||
echo "RUST_TOOLCHAIN_VERSION=$RUST_TOOLCHAIN_VERSION" >> "$GITHUB_OUTPUT" | ||
- name: Setup Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: '${{ steps.rustup-version.outputs.RUST_TOOLCHAIN_VERSION }}' | ||
targets: ${{ inputs.targets }} | ||
components: ${{ inputs.components }} | ||
env: | ||
CARGO_INCREMENTAL: '1' | ||
|
||
- name: Cache cargo | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/registry/ | ||
~/.cargo/git/db/ | ||
~/.napi-rs | ||
target/${{ inputs.target }} | ||
key: ${{ steps.rustup-version.outputs.RUST_TOOLCHAIN_VERSION }}-${{ inputs.target }}-cargo-cache |
Oops, something went wrong.