Skip to content

Commit 076c262

Browse files
committed
Don't use build in the matrix, just use target
They corresponded one-to-one, with `build` holding short names. But the short names were: - Not needed, not having appeared in releases. - Misleading, e.g. by not carrying an architecture, the short name `macos` may have obscured that a major architecture wasn't covered. - Limiting, in that short names are harder to come up with when more architectures on the same operating systems are built for, as will be done soon.
1 parent 9e5a10c commit 076c262

File tree

1 file changed

+28
-24
lines changed

1 file changed

+28
-24
lines changed

.github/workflows/release.yml

+28-24
Original file line numberDiff line numberDiff line change
@@ -69,48 +69,52 @@ jobs:
6969

7070
strategy:
7171
matrix:
72-
build: [ linux, linux-arm, macos, win-msvc, win-gnu, win32-msvc ]
73-
feature: [ small, lean, max, max-pure ]
72+
target:
73+
- x86_64-unknown-linux-musl
74+
- arm-unknown-linux-gnueabihf
75+
- x86_64-apple-darwin
76+
- x86_64-pc-windows-msvc
77+
- x86_64-pc-windows-gnu
78+
- i686-pc-windows-msvc
79+
feature:
80+
- small
81+
- lean
82+
- max
83+
- max-pure
7484
include:
75-
- build: linux
85+
- target: x86_64-unknown-linux-musl
7686
os: ubuntu-latest
7787
rust: stable
78-
target: x86_64-unknown-linux-musl
79-
- build: linux-arm
88+
- target: arm-unknown-linux-gnueabihf
8089
os: ubuntu-latest
8190
rust: nightly
82-
target: arm-unknown-linux-gnueabihf
83-
- build: macos
91+
- target: x86_64-apple-darwin
8492
os: macos-latest
8593
rust: stable
86-
target: x86_64-apple-darwin
87-
- build: win-msvc
94+
- target: x86_64-pc-windows-msvc
8895
os: windows-latest
8996
rust: nightly
90-
target: x86_64-pc-windows-msvc
91-
- build: win-gnu
97+
- target: x86_64-pc-windows-gnu
9298
os: windows-latest
9399
rust: nightly-x86_64-gnu
94-
target: x86_64-pc-windows-gnu
95-
- build: win32-msvc
100+
- target: i686-pc-windows-msvc
96101
os: windows-latest
97102
rust: nightly
98-
target: i686-pc-windows-msvc
99103
# on linux we build with musl which causes trouble with open-ssl. For now, just build max-pure there
100104
# even though we could also build with `--features max-control,http-client-reqwest,gitoxide-core-blocking-client,gix-features/fast-sha1` for fast hashing.
101105
# It's a TODO.
102106
exclude:
103-
- build: linux
107+
- target: x86_64-unknown-linux-musl
104108
feature: small
105-
- build: linux
109+
- target: x86_64-unknown-linux-musl
106110
feature: lean
107-
- build: linux
111+
- target: x86_64-unknown-linux-musl
108112
feature: max
109-
- build: linux-arm
113+
- target: arm-unknown-linux-gnueabihf
110114
feature: small
111-
- build: linux-arm
115+
- target: arm-unknown-linux-gnueabihf
112116
feature: lean
113-
- build: linux-arm
117+
- target: arm-unknown-linux-gnueabihf
114118
feature: max
115119

116120
runs-on: ${{ matrix.os }}
@@ -165,12 +169,12 @@ jobs:
165169
run: |
166170
"$CARGO" build --verbose --release "$TARGET_FLAGS" --no-default-features --features ${{ matrix.feature }}
167171
168-
- name: Strip release binary (linux and macos)
169-
if: matrix.build == 'linux' || matrix.build == 'macos'
172+
- name: Strip release binary (x86-64 Linux, and macOS)
173+
if: matrix.target == 'x86_64-unknown-linux-musl' || matrix.target == 'x86_64-apple-darwin'
170174
run: strip "$TARGET_DIR"/release/{ein,gix}
171175

172-
- name: Strip release binary (arm)
173-
if: matrix.build == 'linux-arm'
176+
- name: Strip release binary (ARM Linux)
177+
if: matrix.target == 'arm-unknown-linux-gnueabihf'
174178
run: |
175179
docker run --rm -v \
176180
"$PWD/target:/target:Z" \

0 commit comments

Comments
 (0)