mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-07-23 13:45:12 +02: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
16
.github/workflows/build_releases.yml
vendored
16
.github/workflows/build_releases.yml
vendored
@ -132,17 +132,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
key: ${{ matrix.info.target }}
|
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
|
- name: Build
|
||||||
uses: actions-rs/cargo@v1
|
uses: ClementTsang/cargo-action@v0.0.2
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
args: --release --verbose --locked --target=${{ matrix.info.target }} --features deploy
|
args: --release --verbose --locked --target=${{ matrix.info.target }} --features deploy
|
||||||
use-cross: ${{ matrix.info.cross }}
|
use-cross: ${{ matrix.info.cross }}
|
||||||
|
cross-version: 0.2.4
|
||||||
|
|
||||||
- name: Bundle release and completion (Windows)
|
- name: Bundle release and completion (Windows)
|
||||||
if: matrix.info.os == 'windows-2019'
|
if: matrix.info.os == 'windows-2019'
|
||||||
@ -278,17 +274,13 @@ jobs:
|
|||||||
- name: Enable Rust cache
|
- name: Enable Rust cache
|
||||||
uses: Swatinem/rust-cache@cb2cf0cc7c5198d3364b9630e2c3d457f160790c # 1.4.0
|
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
|
- name: Build
|
||||||
uses: actions-rs/cargo@v1
|
uses: ClementTsang/cargo-action@v0.0.2
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
args: --release --locked --verbose --features deploy --target ${{ matrix.info.target }}
|
args: --release --locked --verbose --features deploy --target ${{ matrix.info.target }}
|
||||||
use-cross: ${{ matrix.info.cross }}
|
use-cross: ${{ matrix.info.cross }}
|
||||||
|
cross-version: 0.2.4
|
||||||
|
|
||||||
- name: Zip manpage
|
- name: Zip manpage
|
||||||
run: |
|
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' }}
|
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
||||||
run: cargo fmt --all -- --check
|
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
|
- name: Build tests
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
||||||
uses: actions-rs/cargo@v1
|
uses: ClementTsang/cargo-action@v0.0.2
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
args: --no-run --locked ${{ matrix.features }} --target=${{ matrix.info.target }}
|
args: --no-run --locked ${{ matrix.features }} --target=${{ matrix.info.target }}
|
||||||
use-cross: ${{ matrix.info.cross }}
|
use-cross: ${{ matrix.info.cross }}
|
||||||
|
cross-version: 0.2.4
|
||||||
env:
|
env:
|
||||||
RUST_BACKTRACE: full
|
RUST_BACKTRACE: full
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
||||||
uses: actions-rs/cargo@v1
|
uses: ClementTsang/cargo-action@v0.0.2
|
||||||
with:
|
with:
|
||||||
command: test
|
command: test
|
||||||
args: --no-fail-fast ${{ matrix.features }} --target=${{ matrix.info.target }} -- --nocapture --quiet
|
args: --no-fail-fast ${{ matrix.features }} --target=${{ matrix.info.target }} -- --nocapture --quiet
|
||||||
use-cross: ${{ matrix.info.cross }}
|
use-cross: ${{ matrix.info.cross }}
|
||||||
|
cross-version: 0.2.4
|
||||||
env:
|
env:
|
||||||
RUST_BACKTRACE: full
|
RUST_BACKTRACE: full
|
||||||
|
|
||||||
- name: Run clippy
|
- name: Run clippy
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
||||||
uses: actions-rs/cargo@v1
|
uses: ClementTsang/cargo-action@v0.0.2
|
||||||
with:
|
with:
|
||||||
command: clippy
|
command: clippy
|
||||||
args: ${{ matrix.features }} --all-targets --workspace --target=${{ matrix.info.target }} -- -D warnings
|
args: ${{ matrix.features }} --all-targets --workspace --target=${{ matrix.info.target }} -- -D warnings
|
||||||
use-cross: ${{ matrix.info.cross }}
|
use-cross: ${{ matrix.info.cross }}
|
||||||
|
cross-version: 0.2.4
|
||||||
env:
|
env:
|
||||||
RUST_BACKTRACE: full
|
RUST_BACKTRACE: full
|
||||||
|
|
||||||
@ -246,15 +244,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
key: ${{ matrix.info.target }}
|
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
|
- name: Check
|
||||||
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
|
||||||
uses: actions-rs/cargo@v1
|
uses: ClementTsang/cargo-action@v0.0.2
|
||||||
with:
|
with:
|
||||||
command: check
|
command: check
|
||||||
args: --all-targets --verbose --target=${{ matrix.info.target }} --locked
|
args: --all-targets --verbose --target=${{ matrix.info.target }} --locked
|
||||||
use-cross: ${{ matrix.info.cross }}
|
use-cross: ${{ matrix.info.cross }}
|
||||||
|
cross-version: 0.2.4
|
||||||
|
Loading…
x
Reference in New Issue
Block a user