From 62741889bc286f3a2377f757c7195641c8d1373f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Thu, 19 Jan 2023 11:04:12 +0100 Subject: [PATCH] ci: build rust examples (#2871) --- .github/workflows/build.yml | 6 ++++++ .github/workflows/nightly_build.yml | 26 +++++++++++++++++++------- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8f0aebab7e..67d28d826f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,6 +41,12 @@ jobs: command: build args: --workspace + - name: Build all examples + uses: actions-rs/cargo@v1 + with: + command: build + args: --workspace --examples + - name: Run all tests uses: actions-rs/cargo@v1 with: diff --git a/.github/workflows/nightly_build.yml b/.github/workflows/nightly_build.yml index 97aeda077a..6c43cd180f 100644 --- a/.github/workflows/nightly_build.yml +++ b/.github/workflows/nightly_build.yml @@ -38,6 +38,12 @@ jobs: override: true components: rustfmt, clippy + - name: Check formatting + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + - name: Build all binaries uses: actions-rs/cargo@v1 with: @@ -50,6 +56,18 @@ jobs: with: command: clean + - name: Build all examples + uses: actions-rs/cargo@v1 + with: + command: build + args: --workspace --examples + + - name: Reclaim some disk space (because Windows is being annoying) + uses: actions-rs/cargo@v1 + if: ${{ matrix.os == 'windows-latest' }} + with: + command: clean + - name: Run all tests uses: actions-rs/cargo@v1 with: @@ -69,12 +87,6 @@ jobs: command: test args: --workspace --all-features -- --ignored - - name: Check formatting - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - name: Reclaim some disk space (because Windows is being annoying) uses: actions-rs/cargo@v1 if: ${{ matrix.os == 'windows-latest' }} @@ -93,7 +105,7 @@ jobs: if: ${{ matrix.rust != 'nightly' }} with: command: clippy - args: --workspace --all-targets -- -D warnings + args: --workspace --all-targets --all-features -- -D warnings - name: Reclaim some disk space uses: actions-rs/cargo@v1