Rust编写的JavaScript引擎,该项目是一个试验性质的项目。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

58 lines
1.8 KiB

name: Master workflows
on:
push:
branches:
- master
jobs:
benchmark:
name: Upload docs and run benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Generate documentation
uses: actions-rs/cargo@v1
with:
command: doc
args: -v --document-private-items
- run: echo "<meta http-equiv=refresh content=0;url=boa/index.html>" > target/doc/index.html
- run: mkdir target/doc_upload && mv target/doc target/doc_upload/doc
- name: Upload documentation
uses: crazy-max/ghaction-github-pages@v1
with:
target_branch: gh-pages
keep_history: true
build_dir: target/doc_upload
env:
GITHUB_PAT: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
- name: Run benchmark
run: cargo bench -p Boa | tee output.txt
- name: Store benchmark result
uses: jasonwilliams/github-action-benchmark@v1
with:
name: Boa Benchmarks
tool: "criterion"
output-file-path: output.txt
auto-push: true
github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}