mirror of
https://github.com/kjuulh/dagger-rs.git
synced 2024-11-22 23:32:12 +01:00
feat: with original cross
This commit is contained in:
parent
9d6c68be39
commit
98f23fa2a2
56
.github/workflows/ci-multiplatform.yml
vendored
56
.github/workflows/ci-multiplatform.yml
vendored
@ -87,35 +87,39 @@ jobs:
|
|||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2.0.0
|
uses: docker/setup-buildx-action@v2.0.0
|
||||||
- uses: actions-rs/toolchain@v1
|
- name: Install Rust
|
||||||
if: matrix.target == ''
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.rust }}
|
toolchain: ${{ matrix.rust }}
|
||||||
- uses: actions-rs/toolchain@v1
|
- name: Use Cross
|
||||||
if: matrix.target != ''
|
if: matrix.target != ''
|
||||||
with:
|
run: |
|
||||||
toolchain: ${{ matrix.rust }}
|
cargo install cross
|
||||||
target: ${{ matrix.target }}
|
echo "CARGO=cross" >> $GITHUB_ENV
|
||||||
use-cross: true
|
echo "TARGET_FLAGS=--target ${{ matrix.target }}" >> $GITHUB_ENV
|
||||||
- uses: actions-rs/cargo@v1
|
echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV
|
||||||
if: matrix.target != ''
|
- name: Show command used for Cargo
|
||||||
with:
|
run: |
|
||||||
use-cross: true
|
echo "cargo command is: ${{ env.CARGO }}"
|
||||||
command: build
|
echo "target flag is: ${{ env.TARGET_FLAGS }}"
|
||||||
args: --workspace --verbose --target ${{ matrix.target }}
|
- name: Build ripgrep and all crates
|
||||||
- uses: actions-rs/cargo@v1
|
run: ${{ env.CARGO }} build --verbose --workspace ${{ env.TARGET_FLAGS }}
|
||||||
|
- name: Run tests (without cross)
|
||||||
if: matrix.target == ''
|
if: matrix.target == ''
|
||||||
with:
|
run: ${{ env.CARGO }} test --verbose --workspace ${{ env.TARGET_FLAGS }}
|
||||||
command: build
|
- name: Run tests (with cross)
|
||||||
args: --workspace --verbose
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
if: matrix.target != ''
|
if: matrix.target != ''
|
||||||
|
run: ${{ env.CARGO }} test --verbose --workspace ${{ env.TARGET_FLAGS }}
|
||||||
|
rustfmt:
|
||||||
|
name: rustfmt
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Install Rust
|
||||||
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
use-cross: true
|
toolchain: stable
|
||||||
command: test
|
components: rustfmt
|
||||||
args: --all --verbose --target ${{ matrix.target }}
|
- name: Check formatting
|
||||||
- uses: actions-rs/cargo@v1
|
run: cargo fmt --all --check
|
||||||
if: matrix.target == ''
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --all --verbose
|
|
||||||
|
Loading…
Reference in New Issue
Block a user