Skip to content

Commit f9590db

Browse files
committed
Stop using actions-rs/cargo
It's really just unnecessary boilerplate, and prevents us from easily using dinghy
1 parent 355dfa1 commit f9590db

File tree

1 file changed

+15
-54
lines changed

1 file changed

+15
-54
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ jobs:
2727
steps:
2828
- uses: actions/checkout@v2
2929
- name: Check formatting
30-
uses: actions-rs/cargo@v1
31-
with:
32-
command: fmt
33-
args: -- --check
30+
run: cargo fmt -- --check
3431

3532
test:
3633
name: ${{ matrix.name }}
@@ -318,67 +315,40 @@ jobs:
318315
run: cargo install --git https://github.com/madsmtm/dinghy.git --branch update-cargo --bin cargo-dinghy --root=$HOME/extern --target=x86_64-apple-darwin
319316

320317
- name: Lint
321-
uses: actions-rs/cargo@v1
322-
with:
323-
command: clippy
324-
# Temporarily allow `clippy::let_unit_value`
325-
args: ${{ env.ARGS }} --all-targets -- --deny warnings --allow clippy::let_unit_value
318+
# Temporarily allow `clippy::let_unit_value`
319+
run: cargo clippy ${{ env.ARGS }} --all-targets -- --deny warnings --allow clippy::let_unit_value
326320

327321
- name: Build
328322
if: ${{ !matrix.dinghy }}
329-
uses: actions-rs/cargo@v1
330-
with:
331-
command: build
332-
args: ${{ env.ARGS }}
323+
run: cargo build ${{ env.ARGS }}
333324

334325
- name: Check documentation
335326
if: ${{ !matrix.dinghy }}
336-
uses: actions-rs/cargo@v1
337-
with:
338-
command: doc
339-
args: ${{ env.ARGS }} --no-deps --document-private-items
327+
run: cargo doc ${{ env.ARGS }} --no-deps --document-private-items
340328

341329
- name: Test without features
342330
if: ${{ !matrix.dinghy }}
343-
uses: actions-rs/cargo@v1
344-
with:
345-
command: test
346-
args: ${{ env.ARGS }} ${{ env.TESTARGS }}
331+
run: cargo test ${{ env.ARGS }} ${{ env.TESTARGS }}
347332

348333
- name: Test with some features
349334
if: ${{ !matrix.dinghy }}
350-
uses: actions-rs/cargo@v1
351-
with:
352-
command: test
353-
args: ${{ env.ARGS }} ${{ env.TESTARGS }} --tests --features ${{ env.SOME_FEATURES }}
335+
run: cargo test ${{ env.ARGS }} ${{ env.TESTARGS }} --tests --features ${{ env.SOME_FEATURES }}
354336

355337
- name: Test with features
356338
if: ${{ !matrix.dinghy }}
357-
uses: actions-rs/cargo@v1
358-
with:
359-
command: test
360-
args: ${{ env.ARGS }} ${{ env.TESTARGS }} --features ${{ env.FEATURES }}
339+
run: cargo test ${{ env.ARGS }} ${{ env.TESTARGS }} --features ${{ env.FEATURES }}
361340

362341
- name: Test in release mode without features
363342
if: ${{ !matrix.dinghy }}
364-
uses: actions-rs/cargo@v1
365-
with:
366-
command: test
367-
args: ${{ env.ARGS }} ${{ env.TESTARGS }} --release
343+
run: cargo test ${{ env.ARGS }} ${{ env.TESTARGS }} --release
368344

369345
- name: Test in release mode with features
370346
if: ${{ !matrix.dinghy }}
371-
uses: actions-rs/cargo@v1
372-
with:
373-
command: test
374-
args: ${{ env.ARGS }} ${{ env.TESTARGS }} --features ${{ env.FEATURES }} --release
347+
run: cargo test ${{ env.ARGS }} ${{ env.TESTARGS }} --features ${{ env.FEATURES }} --release
375348

376349
- name: Run UI tests
377350
if: ${{ matrix.ui }}
378-
uses: actions-rs/cargo@v1
379-
with:
380-
command: run
381-
args: --features=run --bin test-ui
351+
run: cargo run --features=run --bin test-ui
382352
env:
383353
# Allow warnings
384354
RUSTFLAGS: "-C debuginfo=0"
@@ -387,25 +357,16 @@ jobs:
387357
# Difficult to install Valgrind on macOS
388358
# See https://github.com/LouisBrunner/valgrind-macos
389359
if: contains(matrix.os, 'ubuntu')
390-
uses: actions-rs/cargo@v1
391-
with:
392-
command: bench
393-
args: ${{ env.ARGS }} ${{ env.TESTARGS }}
360+
run: cargo bench ${{ env.ARGS }} ${{ env.TESTARGS }}
394361

395362
- name: Test with unstable features
396363
if: ${{ !matrix.dinghy && matrix.rust.toolchain == 'nightly' }}
397-
uses: actions-rs/cargo@v1
398-
with:
399-
command: test
400-
# Not using --all-features because that would enable e.g. gnustep
401-
args: ${{ env.ARGS }} ${{ env.TESTARGS }} --features ${{ env.FEATURES }},${{ env.UNSTABLE_FEATURES }}
364+
# Not using --all-features because that would enable e.g. gnustep
365+
run: cargo test ${{ env.ARGS }} ${{ env.TESTARGS }} --features ${{ env.FEATURES }},${{ env.UNSTABLE_FEATURES }}
402366

403367
- name: Test static class and selectors
404368
if: ${{ !matrix.dinghy && (matrix.runtime || 'apple') == 'apple' }}
405-
uses: actions-rs/cargo@v1
406-
with:
407-
command: test
408-
args: ${{ env.ARGS }} ${{ env.TESTARGS }} --features foundation,unstable-static-sel,unstable-static-class
369+
run: cargo test ${{ env.ARGS }} ${{ env.TESTARGS }} --features foundation,unstable-static-sel,unstable-static-class
409370

410371
- name: Run assembly tests
411372
if: ${{ !contains(matrix.runtime, 'compiler-rt') }}

0 commit comments

Comments
 (0)