Skip to content

Commit

Permalink
Add separate build for remote flag
Browse files Browse the repository at this point in the history
  • Loading branch information
alexliesenfeld committed Oct 15, 2023
1 parent c51d7fa commit f514bf1
Showing 1 changed file with 44 additions and 29 deletions.
73 changes: 44 additions & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,54 +8,31 @@ concurrency:

jobs:
build:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust:
# Default features enabled
- version: stable
- version: beta
- version: nightly
- version: 1.65.0
# Also remote feature enabled
- version: stable
features: remote
- version: beta
features: remote
- version: nightly
features: remote
- version: 1.70.0
features: remote

- stable
- beta
- nightly
- 1.64.0 # MSRV
steps:
- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust.version }}
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy

- name: Set feature arguments
id: set_features
run: |
if [ "${{ matrix.rust.features }}" == "remote" ]; then
echo "::set-output name=FEATURES_ARGS::--features remote"
else
echo "::set-output name=FEATURES_ARGS::"
fi
- uses: actions-rs/cargo@v1
with:
command: build
args: ${{ steps.set_features.outputs.FEATURES_ARGS }}

- uses: actions-rs/cargo@v1
with:
command: test
args: ${{ steps.set_features.outputs.FEATURES_ARGS }}

- uses: actions-rs/cargo@v1
with:
Expand All @@ -67,6 +44,44 @@ jobs:
command: clippy
args: -- -D warnings

build-remote:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
- 1.70.0 # MSRV
steps:
- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy

- uses: actions-rs/cargo@v1
with:
command: build --features remote

- uses: actions-rs/cargo@v1
with:
command: test --features remote

- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings


docker:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit f514bf1

Please sign in to comment.