From 0519c0ceaa7b0c5c84ef8c757042031022c68a2c Mon Sep 17 00:00:00 2001 From: Rob Date: Thu, 31 Aug 2023 15:05:00 -0400 Subject: [PATCH] fix ci for use with RUSTFLAGS (#68) --- .github/workflows/build.yml | 16 ++++++++-------- .github/workflows/build_nix.yml | 17 +++++++++-------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2da23cd..18c18b7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,11 +17,11 @@ jobs: build: strategy: matrix: - features: - - "async-std-executor,channel-async-std,logging-utils" - - "async-std-executor,channel-flume,logging-utils" - - "tokio-executor,channel-tokio,logging-utils" - - "tokio-executor,channel-flume,logging-utils" + flags: + - --cfg async_executor_impl="async-std" --cfg async_channel_impl="async-std" + - --cfg async_executor_impl="async-std" --cfg async_channel_impl="flume" + - --cfg async_executor_impl="tokio" --cfg async_channel_impl="tokio" + - --cfg async_executor_impl="tokio" --cfg async_channel_impl="flume" runs-on: ubuntu-latest timeout-minutes: 60 steps: @@ -37,12 +37,12 @@ jobs: - name: Build run: | - cargo build --all-targets --workspace --features "${{ matrix.features }}" --release + RUSTFLAGS="${{ matrix.flags }}" cargo build --all-targets --workspace --features logging-utils --release - name: Test run: | - cargo test --release --all-targets --workspace --features "${{ matrix.features }}" + RUSTFLAGS="${{ matrix.flags }}" cargo test --all-targets --workspace --features logging-utils --release - name: Lint run: | - cargo clippy --workspace --all-targets --features "${{ matrix.features }}" --bins --tests --examples -- -D warnings + RUSTFLAGS="${{ matrix.flags }}" cargo clippy --workspace --all-targets --features logging-utils --bins --tests --examples -- -D warnings diff --git a/.github/workflows/build_nix.yml b/.github/workflows/build_nix.yml index 4cc62d9..ad6ca46 100644 --- a/.github/workflows/build_nix.yml +++ b/.github/workflows/build_nix.yml @@ -9,11 +9,11 @@ jobs: build: strategy: matrix: - features: - - "async-std-executor,channel-async-std,logging-utils" - - "async-std-executor,channel-flume,logging-utils" - - "tokio-executor,channel-tokio,logging-utils" - - "tokio-executor,channel-flume,logging-utils" + flags: + - --cfg async_executor_impl="async-std" --cfg async_channel_impl="async-std" + - --cfg async_executor_impl="async-std" --cfg async_channel_impl="flume" + - --cfg async_executor_impl="tokio" --cfg async_channel_impl="tokio" + - --cfg async_executor_impl="tokio" --cfg async_channel_impl="flume" runs-on: ubuntu-latest timeout-minutes: 60 if: ${{ github.actor != 'dependabot[bot]' }} @@ -36,12 +36,13 @@ jobs: - name: Build run: | - nix develop -c cargo build --all-targets --workspace --features "${{ matrix.features }}" --release + nix develop -c RUSTFLAGS="${{ matrix.flags }}" cargo build --all-targets --workspace --features logging-utils --release - name: Test run: | - nix develop -c cargo test --release --all-targets --workspace --features "${{ matrix.features }}" + nix develop -c RUSTFLAGS="${{ matrix.flags }}" cargo test --all-targets --workspace --features logging-utils --release - name: Lint run: | - nix develop -c cargo clippy --workspace --all-targets --features "${{ matrix.features }}" --bins --tests --examples -- -D warnings + nix develop -c RUSTFLAGS="${{ matrix.flags }}" cargo clippy --all-targets --workspace --features logging-utils --release --bins --tests --examples -- -D warnings +