forked from b-fuze/deno-dom
-
Notifications
You must be signed in to change notification settings - Fork 1
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
bbb4f93
commit ecc95a7
Showing
1 changed file
with
86 additions
and
0 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,86 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'Cargo.toml' | ||
- 'html-parser/core/**' | ||
- 'html-parser/plugin/**' | ||
- '.github/workflows/**' | ||
pull_request: | ||
branches-ignore: [master] | ||
paths: | ||
- 'Cargo.toml' | ||
- 'html-parser/core/**' | ||
- 'html-parser/plugin/**' | ||
- '.github/workflows/**' | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.kind }} ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 60 | ||
strategy: | ||
matrix: | ||
os: [macos-latest-xlarge] | ||
|
||
env: | ||
GH_ACTIONS: true | ||
RUST_BACKTRACE: full | ||
DENO_BUILD_MODE: release | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install rust | ||
uses: hecrj/setup-rust-action@v1 | ||
with: | ||
rust-version: '1.60.0' | ||
|
||
- name: Log versions | ||
run: | | ||
rustc --version | ||
cargo --version | ||
- 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: Remove Some Cache | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
rm target/release/gn_root -Recurse -ErrorAction Ignore | ||
rm target/debug/gn_root -Recurse -ErrorAction Ignore | ||
- name: Build | ||
env: | ||
RUST_BACKTRACE: 1 | ||
run: cargo clean && cargo build --release | ||
|
||
- name: Release Plugin | ||
uses: softprops/action-gh-release@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: 'release draft' | ||
draft: true | ||
files: | | ||
target/release/libplugin.dylib | ||
target/release/plugin.dll | ||
target/release/libplugin.so | ||
target/aarch64-unknown-linux-gnu/release/libplugin-linux-aarch64.so |