giving up if this doesn't work
This commit is contained in:
@@ -9,8 +9,6 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
name: Build ${{ matrix.target }}
|
name: Build ${{ matrix.target }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
# A matrix lets us run the job twice in parallel: once for x86, once for arm.
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
@@ -23,21 +21,21 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# Sets up Rust correctly and caches it
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
targets: ${{ matrix.target }}
|
targets: ${{ matrix.target }}
|
||||||
|
|
||||||
# Downloads pre-compiled `cross` binary instantly (saves ~3 mins vs cargo install)
|
|
||||||
- name: Install cross
|
- name: Install cross
|
||||||
if: matrix.use-cross == true
|
if: matrix.use-cross == true
|
||||||
uses: taiki-e/install-action@v2
|
uses: taiki-e/install-action@v2
|
||||||
with:
|
with:
|
||||||
tool: cross
|
tool: cross
|
||||||
|
|
||||||
# Builds using cargo for x86, and cross for ARM
|
|
||||||
- name: Build binary
|
- name: Build binary
|
||||||
|
env:
|
||||||
|
# This is the magic fix for 'act' and Docker-in-Docker
|
||||||
|
CROSS_CONTAINER_IN_CONTAINER: true
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ matrix.use-cross }}" == "true" ]; then
|
if [ "${{ matrix.use-cross }}" == "true" ]; then
|
||||||
cross build --release --target ${{ matrix.target }}
|
cross build --release --target ${{ matrix.target }}
|
||||||
@@ -45,7 +43,6 @@ jobs:
|
|||||||
cargo build --release --target ${{ matrix.target }}
|
cargo build --release --target ${{ matrix.target }}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Uploads the artifact. They will be separated by target name.
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user