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
cba7e7b
commit e089f8d
Showing
1 changed file
with
58 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,58 @@ | ||
name: Test CNCLI compatibility | ||
|
||
on: | ||
push: | ||
release: | ||
types: [created] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
name: Build Rust with Cargo | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, macos-11] | ||
rust: [stable, nightly] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: AndrewWestberg/cncli | ||
- name: Setup Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
- name: Update CNCLI dependency | ||
run: cargo build --verbose | ||
- name: Build | ||
run: cargo build --verbose | ||
- name: Build examples | ||
run: cargo build --examples --verbose | ||
- name: Run tests | ||
run: cargo test --verbose | ||
|
||
build_success: | ||
name: Build Rust with Cargo - All environments | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- run: echo Done! | ||
|
||
publish: | ||
name: Publish tagged release on crates.io | ||
if: github.event_name == 'release' && github.event.action == 'created' | ||
needs: | ||
- build_success | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: katyo/publish-crates@v1 | ||
with: | ||
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} |