Skip to content

Commit f0c60fe

Browse files
committed
ci: fix ci
1 parent 984178b commit f0c60fe

File tree

3 files changed

+35
-8
lines changed

3 files changed

+35
-8
lines changed

.github/workflows/test_upload.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,36 @@ jobs:
3737
# Native builds
3838
- target: x86_64-unknown-linux-gnu
3939
os: ubuntu-latest
40+
build_tool: cargo
4041
- target: x86_64-pc-windows-msvc
4142
os: windows-latest
43+
build_tool: cargo
4244
- target: i686-pc-windows-msvc
4345
os: windows-latest
46+
build_tool: cargo
47+
# - target: aarch64-apple-darwin
48+
# os: macos-latest
49+
# build_tool: cargo
50+
# - target: x86_64-apple-darwin
51+
# os: macos-latest
52+
# build_tool: cargo
4453
- target: universal-apple-darwin
4554
os: macos-latest
46-
- target: aarch64-apple-darwin
47-
os: macos-latest
48-
- target: x86_64-apple-darwin
49-
os: macos-latest
55+
build_tool: cargo
5056

5157
# Builds using cross
52-
- target: x86_64-unknown-linux-musl
53-
os: ubuntu-latest
5458
- target: aarch64-unknown-linux-gnu
5559
os: ubuntu-latest
60+
build_tool: cross
61+
- target: x86_64-unknown-linux-musl
62+
os: ubuntu-latest
63+
build_tool: cross
5664
- target: x86_64-unknown-freebsd
5765
os: ubuntu-latest
66+
build_tool: cross
5867
- target: x86_64-unknown-illumos
5968
os: ubuntu-latest
69+
build_tool: cross
6070
runs-on: ${{ matrix.os }}
6171
steps:
6272
- uses: actions/checkout@v3
@@ -66,7 +76,7 @@ jobs:
6676
uses: taiki-e/setup-cross-toolchain-action@v1
6777
with:
6878
target: ${{ matrix.target }}
69-
if: startsWith(matrix.os, 'ubuntu')
79+
if: startsWith(matrix.os, 'ubuntu') && !contains(fromJSON('["x86_64-unknown-illumos", "x86_64-unknown-linux-musl"]'), matrix.target)
7080
- name: Get tag
7181
if: github.event.inputs.tags == ''
7282
id: tag
@@ -80,6 +90,7 @@ jobs:
8090
bin: git-semver-tags
8191
archive: $bin-${{github.event.inputs.tags || steps.tag.outputs.tag}}-$target
8292
target: ${{ matrix.target }}
93+
build_tool: ${{ matrix.build_tool }}
8394
tar: all
8495
zip: windows
8596
token: ${{ secrets.GITHUB_TOKEN }}

Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,11 @@ rustdoc-args = ["--cfg", "docsrs"]
4040
pkg-url = "{ repo }/releases/download/v{ version }/{ name }-{ version }-{ target }.tar.gz"
4141
bin-dir = "{ bin }{ binary-ext }"
4242
pkg-fmt = "tgz"
43+
44+
# Mac x86_64 and aarch64 use the same universal binary.
45+
[package.metadata.binstall.overrides.x86_64-apple-darwin]
46+
pkg-url = "{ repo }/releases/download/v{ version }/{ name }-{ version }-universal-apple-darwin.tar.gz"
47+
48+
[package.metadata.binstall.overrides.aarch64-apple-darwin]
49+
pkg-url = "{ repo }/releases/download/v{ version }/{ name }-{ version }-universal-apple-darwin.tar.gz"
50+

Cross.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[build.env]
2+
passthrough = ["CARGO_PROFILE_RELEASE_LTO"]
3+
14
# [target.x86_64-unknown-linux-musl]
25
# pre-build = [
36
# "dpkg --add-architecture $CROSS_DEB_ARCH",
@@ -8,4 +11,9 @@
811
# pre-build = [
912
# "dpkg --add-architecture $CROSS_DEB_ARCH",
1013
# "apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH"
11-
# ]
14+
# ]
15+
16+
# [target.x86_64-unknown-freebsd]
17+
# # The current cross 0.2.4 docker image doesn't have the memstat library on FreeBSD.
18+
# # https://github.com/cross-rs/cross/pull/1166
19+
# image = "ghcr.io/cross-rs/x86_64-unknown-freebsd:edge"

0 commit comments

Comments
 (0)