summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2022-07-16 00:34:18 -0400
committerGitHub <noreply@github.com>2022-07-16 00:34:18 -0400
commit510aa5c4042d9933310d24da38f08ff4647875d9 (patch)
tree35b5a259f4cb5e4d10598862d5a5f7f1a9b4f6b2 /.github
parente33603d8ee4e5035eaf4c14981d724e0faf1e4ef (diff)
ci: try simpler cross/cargo action for builds and tests (#767)
Uses a personal action for simpler invocations of cargo/cross commands.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build_releases.yml16
-rw-r--r--.github/workflows/ci.yml22
2 files changed, 12 insertions, 26 deletions
diff --git a/.github/workflows/build_releases.yml b/.github/workflows/build_releases.yml
index e424059b..a761a1a1 100644
--- a/.github/workflows/build_releases.yml
+++ b/.github/workflows/build_releases.yml
@@ -132,17 +132,13 @@ jobs:
with:
key: ${{ matrix.info.target }}
- - name: Install cross if needed
- if: matrix.info.cross == true
- run: |
- cargo install cross --locked --version=0.2.4
-
- name: Build
- uses: actions-rs/cargo@v1
+ uses: ClementTsang/cargo-action@v0.0.2
with:
command: build
args: --release --verbose --locked --target=${{ matrix.info.target }} --features deploy
use-cross: ${{ matrix.info.cross }}
+ cross-version: 0.2.4
- name: Bundle release and completion (Windows)
if: matrix.info.os == 'windows-2019'
@@ -278,17 +274,13 @@ jobs:
- name: Enable Rust cache
uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # 1.4.0
- - name: Install cross if needed
- if: matrix.info.cross == true
- run: |
- cargo install cross --locked --version=0.2.4
-
- name: Build
- uses: actions-rs/cargo@v1
+ uses: ClementTsang/cargo-action@v0.0.2
with:
command: build
args: --release --locked --verbose --features deploy --target ${{ matrix.info.target }}
use-cross: ${{ matrix.info.cross }}
+ cross-version: 0.2.4
- name: Zip manpage
run: |
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index fa054b34..44cc2824 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -84,38 +84,36 @@ jobs:
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
run: cargo fmt --all -- --check
- - name: Install cross if needed
- if: matrix.info.cross == true
- run: |
- cargo install cross --locked --version=0.2.4
-
- name: Build tests
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
- uses: actions-rs/cargo@v1
+ uses: ClementTsang/cargo-action@v0.0.2
with:
command: test
args: --no-run --locked ${{ matrix.features }} --target=${{ matrix.info.target }}
use-cross: ${{ matrix.info.cross }}
+ cross-version: 0.2.4
env:
RUST_BACKTRACE: full
- name: Run tests
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
- uses: actions-rs/cargo@v1
+ uses: ClementTsang/cargo-action@v0.0.2
with:
command: test
args: --no-fail-fast ${{ matrix.features }} --target=${{ matrix.info.target }} -- --nocapture --quiet
use-cross: ${{ matrix.info.cross }}
+ cross-version: 0.2.4
env:
RUST_BACKTRACE: full
- name: Run clippy
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
- uses: actions-rs/cargo@v1
+ uses: ClementTsang/cargo-action@v0.0.2
with:
command: clippy
args: ${{ matrix.features }} --all-targets --workspace --target=${{ matrix.info.target }} -- -D warnings
use-cross: ${{ matrix.info.cross }}
+ cross-version: 0.2.4
env:
RUST_BACKTRACE: full
@@ -246,15 +244,11 @@ jobs:
with:
key: ${{ matrix.info.target }}
- - name: Install cross if needed
- if: matrix.info.cross == true
- run: |
- cargo install cross --locked --version=0.2.4
-
- name: Check
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
- uses: actions-rs/cargo@v1
+ uses: ClementTsang/cargo-action@v0.0.2
with:
command: check
args: --all-targets --verbose --target=${{ matrix.info.target }} --locked
use-cross: ${{ matrix.info.cross }}
+ cross-version: 0.2.4