generated from napi-rs/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
89dd09e
commit a175cf7
Showing
7 changed files
with
633 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Cargo test | ||
|
||
env: | ||
DEBUG: 'napi:*' | ||
APP_NAME: 'skia' | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags-ignore: | ||
- '**' | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
if: "!contains(github.event.head_commit.message, 'skip ci')" | ||
name: stable - Linux - cargo - test | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Install | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
|
||
- name: Generate Cargo.lock | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: generate-lockfile | ||
|
||
- name: Cache cargo registry | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cargo/registry | ||
key: stable-${{ matrix.os }}-node@14-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Cache cargo index | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cargo/git | ||
key: stable-${{ matrix.os }}-node@14-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Cache NPM dependencies | ||
uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: npm-cache-${{ matrix.os }}-node@14-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
npm-cache- | ||
- name: 'Install dependencies' | ||
run: yarn install --frozen-lockfile --registry https://registry.npmjs.org --network-timeout 300000 | ||
|
||
- name: Download skia binary | ||
run: node ./scripts/release-skia-binary.js --download | ||
|
||
- name: Test | ||
run: cargo test -- --nocapture | ||
|
||
- name: Clear the cargo caches | ||
run: | | ||
cargo install cargo-cache --no-default-features --features ci-autoclean | ||
cargo-cache |
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
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
Oops, something went wrong.
a175cf7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
Draw house#@napi-rs/skia
27
ops/sec (±0.46%
)25
ops/sec (±1.22%
)0.93
Draw house#node-canvas
23
ops/sec (±0.91%
)24
ops/sec (±1.44%
)1.04
Draw gradient#@napi-rs/skia
27
ops/sec (±0.05%
)24
ops/sec (±1.16%
)0.89
Draw gradient#node-canvas
23
ops/sec (±0.26%
)23
ops/sec (±1.15%
)1
This comment was automatically generated by workflow using github-action-benchmark.