Skip to content

Commit

Permalink
ci: Use setup-cross-toolchain-action for linux-musl
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Jul 10, 2023
1 parent b336b45 commit 7109a2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,14 @@ jobs:
- name: Install Rust
run: rustup update stable --no-self-update
- run: rustup target add ${{ matrix.target }}
- uses: taiki-e/setup-cross-toolchain-action@v1
- uses: taiki-e/setup-cross-toolchain-action@musl
with:
target: ${{ matrix.target }}
if: (matrix.os == '' || startsWith(matrix.os, 'ubuntu')) && !contains(matrix.target, '-musl')
- uses: taiki-e/install-action@cross
if: contains(matrix.target, '-musl')
if: matrix.os == '' || startsWith(matrix.os, 'ubuntu')
- run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >>"${GITHUB_ENV}"
if: endsWith(matrix.target, 'windows-msvc')
- run: echo "cargo=cross" >>"${GITHUB_ENV}"
if: contains(matrix.target, '-musl')
- run: $cargo build --target ${{ matrix.target }}
- run: $cargo build --target ${{ matrix.target }} --release
- run: cargo build --target ${{ matrix.target }}
- run: cargo build --target ${{ matrix.target }} --release
# For debugging
- uses: actions/upload-artifact@v3
with:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ jobs:
- uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}
if: (matrix.os == '' || startsWith(matrix.os, 'ubuntu')) && !contains(matrix.target, '-musl')
- uses: taiki-e/install-action@cross
if: contains(matrix.target, '-musl')
if: matrix.os == '' || startsWith(matrix.os, 'ubuntu')
- run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >>"${GITHUB_ENV}"
if: endsWith(matrix.target, 'windows-msvc')
- uses: taiki-e/upload-rust-binary-action@v1
Expand Down

0 comments on commit 7109a2d

Please sign in to comment.