2db79de722
* Adding build script * Added build dependencies * Cleaned up build.rs * Restored validator-api to default workspace * Removed split for validator-api build in github ations * Don't build validator API on Windows * Remove validator-api Cargo.lock * Remove fmt from the conditional steps Co-authored-by: Dave Hrycyszyn <futurechimp@users.noreply.github.com> Co-authored-by: Bogdan-Ștefan Neacșu <bogdan@nymtech.net>
67 lines
1.8 KiB
YAML
67 lines
1.8 KiB
YAML
name: Continuous integration
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ${{ matrix.os }}
|
|
continue-on-error: ${{ matrix.rust == 'nightly' || matrix.rust == 'beta' }}
|
|
strategy:
|
|
matrix:
|
|
rust: [stable, beta, nightly]
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: ${{ matrix.rust }}
|
|
override: true
|
|
components: rustfmt, clippy
|
|
|
|
# Exclude validator API on Windows
|
|
- uses: actions-rs/cargo@v1
|
|
if: ${{ matrix.os == 'windows-latest' }}
|
|
with:
|
|
command: build
|
|
args: --all --exclude nym-validator-api
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
if: ${{ matrix.os != 'windows-latest' }}
|
|
with:
|
|
command: build
|
|
args: --all
|
|
|
|
# Exclude validator API on Windows
|
|
- uses: actions-rs/cargo@v1
|
|
if: ${{ matrix.os == 'windows-latest' }}
|
|
with:
|
|
command: test
|
|
args: --all --exclude nym-validator-api
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
if: ${{ matrix.os != 'windows-latest' }}
|
|
with:
|
|
command: test
|
|
args: --all
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: --all -- --check
|
|
|
|
# Exclude validator API on Windows
|
|
- uses: actions-rs/cargo@v1
|
|
if: ${{ matrix.rust != 'nightly' && matrix.os == 'windows-latest' }}
|
|
with:
|
|
command: clippy
|
|
args: --all --exclude nym-validator-api -- -D warnings
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
if: ${{ matrix.rust != 'nightly' && matrix.os != 'windows-latest' }}
|
|
with:
|
|
command: clippy
|
|
args: -- -D warnings
|