Skip to content

Commit

Permalink
Fix xtask musl build error (#198)
Browse files Browse the repository at this point in the history
The rust compiler segfaults when building xtask without explicit
--target flag on musl platforms.
  • Loading branch information
boxdot authored Nov 2, 2022
1 parent 4ab0f59 commit 48bf12d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
- name: Build and run xtask
uses: actions-rs/cargo@v1
with:
command: xtask

build-x86_64-unknown-linux-musl:
name: build (x86_64-unknown-linux-musl)
Expand All @@ -98,6 +102,12 @@ jobs:
with:
command: build
args: --target x86_64-unknown-linux-musl
- name: Build and run xtask
uses: actions-rs/cargo@v1
# xtask miscompiles on musl platform without explicit target flag
with:
command: build
args: -p xtask --target x86_64-unknown-linux-musl

build-aarch64-unknown-linux-gnu:
name: build (aarch64-unknown-linux-gnu)
Expand All @@ -121,6 +131,10 @@ jobs:
with:
command: build
args: --target aarch64-unknown-linux-gnu
- name: Build and run xtask
uses: actions-rs/cargo@v1
with:
command: xtask

build-aarch64-unknown-linux-musl:
name: build (aarch64-unknown-linux-musl)
Expand All @@ -145,9 +159,10 @@ jobs:
override: true
- name: Build
uses: actions-rs/cargo@v1
# xtask miscompiles on musl platform without explicit target flag
with:
command: build
args: --target x86_64-unknown-linux-musl
command: run
args: -p xtask --target x86_64-unknown-linux-musl

build-test-x86_64-apple-darwin:
name: build and test (x86_64-apple-darwin)
Expand Down Expand Up @@ -175,6 +190,10 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
- name: Build and run xtask
uses: actions-rs/cargo@v1
with:
command: xtask

build-aarch64-apple-darwin:
name: build (aarch64-apple-darwin)
Expand All @@ -200,3 +219,7 @@ jobs:
with:
command: build
args: --target aarch64-apple-darwin
- name: Build and run xtask
uses: actions-rs/cargo@v1
with:
command: xtask
6 changes: 4 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ jobs:
target: x86_64-unknown-linux-musl
override: true
- name: Dist
run: cargo xtask dist
# FIXME: building xtask without explicit target segfaults rustc
run: cargo run -p xtask --target x86_64-unknown-linux-musl -- dist
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
Expand Down Expand Up @@ -137,7 +138,8 @@ jobs:
target: aarch64-unknown-linux-musl
override: true
- name: Dist
run: cargo xtask dist
# FIXME: building xtask without explicit target segfaults rustc
run: cargo run -p xtask --target x86_64-unknown-linux-musl -- dist
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
Expand Down

0 comments on commit 48bf12d

Please sign in to comment.