Skip to content

Commit b2193e9

Browse files
author
Andrew J Westlake
committed
Using new GitHub actions syntax, hopefully works the same on windows
1 parent 8c82800 commit b2193e9

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,22 +92,23 @@ jobs:
9292
- name: Build (no features)
9393
run: cargo build --no-default-features --verbose --target ${{ matrix.platform.rust-target }}
9494

95-
- name: Set variables
96-
id: setvars
97-
run: |
98-
if [[ "${{matrix.rust}}" == "1.45.0" ]]; then
99-
echo "::set-env name=features::testing,attributes,tokio-runtime"
100-
else
101-
echo "::set-env name=features::testing,attributes,tokio-runtime,async-std-runtime"
102-
fi
95+
# Omit async-std-runtime feature for MSRV 1.45.0
96+
- if: matrix.rust == '1.45.0'
97+
name: Prepare 1.45.0 features
98+
run: echo features=testing,attributes,tokio-runtime >> $GITHUB_ENV
99+
100+
# Use all features for MSRV 1.46.0 and above
101+
- if: matrix.rust != '1.45.0'
102+
name: Prepare all features
103+
run: echo features=testing,attributes,tokio-runtime,async-std-runtime >> $GITHUB_ENV
103104

104-
- name: Build (all additive features)
105-
run: cargo build --features=$features --verbose --target ${{ matrix.platform.rust-target }}
105+
- name: Build
106+
run: cargo build --features=${{env.features}} --verbose --target ${{ matrix.platform.rust-target }}
106107

107108
# Run tests (except on PyPy, because no embedding API).
108109
- if: matrix.python-version != 'pypy-3.6'
109110
name: Test
110-
run: cargo test --features=$features --target ${{ matrix.platform.rust-target }}
111+
run: cargo test --features=${{env.features}} --target ${{ matrix.platform.rust-target }}
111112

112113
- name: Install python test dependencies
113114
run: |

0 commit comments

Comments
 (0)