name: Continuous integration on: [push, pull_request] jobs: build: runs-on: ${{ matrix.os }} continue-on-error: ${{ matrix.rust == 'nightly' || matrix.rust == 'beta' || matrix.os == 'windows-latest' }} strategy: matrix: rust: [stable, beta, nightly] os: [ubuntu-latest, macos-latest, windows-latest] steps: - name: Install Dependencies (Linux) run: sudo apt-get update && sudo apt-get install libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev squashfs-tools if: matrix.os == 'ubuntu-latest' - name: Check out repository code uses: actions/checkout@v2 - name: Install rust toolchain uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: ${{ matrix.rust }} override: true components: rustfmt, clippy - name: Build all binaries uses: actions-rs/cargo@v1 with: command: build args: --all - name: Run all tests uses: actions-rs/cargo@v1 with: command: test args: --all - name: Check formatting uses: actions-rs/cargo@v1 with: command: fmt args: --all -- --check - name: Run clippy uses: actions-rs/cargo@v1 if: ${{ matrix.rust != 'nightly' }} with: command: clippy args: -- -D warnings # COCONUT stuff - name: Reclaim some disk space (because Windows is being annoying) uses: actions-rs/cargo@v1 if: ${{ matrix.os == 'windows-latest' }} with: command: clean # BUILD - name: Build gateway with coconut feature uses: actions-rs/cargo@v1 with: command: build args: --bin nym-gateway --features=coconut - name: Build native client with coconut feature uses: actions-rs/cargo@v1 with: command: build args: --bin nym-client --features=coconut - name: Build socks5 client with coconut feature uses: actions-rs/cargo@v1 with: command: build args: --bin nym-socks5-client --features=coconut - name: Build validator-api with coconut feature uses: actions-rs/cargo@v1 with: command: build args: --bin nym-validator-api --features=coconut # TEST - name: Test gateway with coconut feature uses: actions-rs/cargo@v1 with: command: test args: --bin nym-gateway --features=coconut - name: Test native client with coconut feature uses: actions-rs/cargo@v1 with: command: test args: --bin nym-client --features=coconut - name: Test socks5 client with coconut feature uses: actions-rs/cargo@v1 with: command: test args: --bin nym-socks5-client --features=coconut - name: Test validator-api with coconut feature uses: actions-rs/cargo@v1 with: command: test args: --bin nym-validator-api --features=coconut # CLIPPY - name: Run clippy on gateway with coconut feature uses: actions-rs/cargo@v1 with: command: clippy args: --bin nym-gateway --features=coconut -- -D warnings - name: Run clippy on native client with coconut feature uses: actions-rs/cargo@v1 with: command: clippy args: --bin nym-client --features=coconut -- -D warnings - name: Run clippy on socks5 client with coconut feature uses: actions-rs/cargo@v1 with: command: clippy args: --bin nym-socks5-client --features=coconut -- -D warnings - name: Run clippy on validator-api with coconut feature uses: actions-rs/cargo@v1 with: command: clippy args: --bin nym-validator-api --features=coconut -- -D warnings