Skip to content

Commit

Permalink
Merge #176
Browse files Browse the repository at this point in the history
176: Use setup-cross-toolchain-action for linux-gnu and freebsd r=taiki-e a=taiki-e

Fixes #174 

Co-authored-by: Taiki Endo <te316e89@gmail.com>
  • Loading branch information
bors[bot] and taiki-e committed Dec 4, 2022
2 parents 1f5732d + 72a9fc9 commit 67dcfe9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,25 +93,23 @@ 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
with:
target: ${{ matrix.target }}
if: (matrix.os == '' || startsWith(matrix.os, 'ubuntu')) && !contains(matrix.target, '-musl')
- uses: taiki-e/install-action@cross
if: matrix.os == '' || startsWith(matrix.os, 'ubuntu')
if: contains(matrix.target, '-musl')
- run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >> "${GITHUB_ENV}"
if: endsWith(matrix.target, 'windows-msvc')
- run: echo "cargo=cross" >>"${GITHUB_ENV}"
if: matrix.target != 'x86_64-unknown-linux-gnu' && (matrix.os == '' || startsWith(matrix.os, 'ubuntu'))
if: contains(matrix.target, '-musl')
- run: $cargo build --target ${{ matrix.target }}
- run: $cargo build --target ${{ matrix.target }} --release
# For debugging
# - uses: actions/upload-artifact@v3
# with:
# name: ${{ matrix.target }}
# path: target/${{ matrix.target }}/release/cargo-hack.exe
# if: startsWith(matrix.os, 'windows')
# - uses: actions/upload-artifact@v3
# with:
# name: ${{ matrix.target }}
# path: target/${{ matrix.target }}/release/cargo-hack
# if: "!startsWith(matrix.os, 'windows')"
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.target }}
path: target/${{ matrix.target }}/release/cargo-hack*

test-compat:
name: test (1.${{ matrix.rust }})
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,12 @@ jobs:
persist-credentials: false
- name: Install Rust
run: rustup update stable --no-self-update
- 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: matrix.os == '' || startsWith(matrix.os, 'ubuntu')
if: contains(matrix.target, '-musl')
- 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
2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ slab = "0.4.4"
termcolor = "1.1"
toml_edit = "0.15"

libc = "=0.2.137" # https://github.com/taiki-e/cargo-hack/issues/174

[dev-dependencies]
build-info = { path = "tests/auxiliary/build-info" }
easy-ext = "1"
Expand Down

0 comments on commit 67dcfe9

Please sign in to comment.