-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* github actions * fix check * clean * fix cd
- Loading branch information
Showing
4 changed files
with
120 additions
and
122 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,45 @@ | ||
name: Publish | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
target: wasm32-unknown-unknown | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: generate-lockfile | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
~/.cargo/bin | ||
target | ||
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Install wasm dep | ||
run: cargo install wasm-bindgen-cli || true | ||
- name: Run openssl tests | ||
run: cargo test | ||
- name: Run pure rust tests | ||
run: cargo test --no-default-features --features pure | ||
- name: Run wasm tests | ||
run: cargo test --no-default-features --features pure --target=wasm32-unknown-unknown | ||
- name: Publish cargo package | ||
run: cargo login $CARGO_LOGIN_TOKEN && cargo publish | ||
env: | ||
CARGO_LOGIN_TOKEN: ${{ secrets.CARGO_LOGIN_TOKEN }} |
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,74 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
pull_request: | ||
branches: [master] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
override: true | ||
target: wasm32-unknown-unknown | ||
components: rustfmt, clippy | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: generate-lockfile | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
target | ||
key: ${{ runner.os }}-lint-${{ hashFiles('**/Cargo.lock') }} | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: clippy | ||
|
||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
target: wasm32-unknown-unknown | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: generate-lockfile | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
~/.cargo/bin | ||
target | ||
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Install wasm dep | ||
run: cargo install wasm-bindgen-cli || true | ||
- name: Run openssl tests | ||
run: cargo test | ||
- name: Run pure rust tests | ||
run: cargo test --no-default-features --features pure | ||
- name: Run wasm tests | ||
run: cargo test --no-default-features --features pure --target=wasm32-unknown-unknown | ||
- name: Check cargo package | ||
run: cargo publish --dry-run |
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