mirror of
https://github.com/ClementTsang/bottom
synced 2024-11-25 21:50:20 +00:00
ci: try simpler cross/cargo action for builds and tests (#767)
Uses a personal action for simpler invocations of cargo/cross commands.
This commit is contained in:
parent
e33603d8ee
commit
510aa5c404
2 changed files with 12 additions and 26 deletions
16
.github/workflows/build_releases.yml
vendored
16
.github/workflows/build_releases.yml
vendored
|
@ -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: |
|
||||
|
|
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue