Skip to content

Commit 1c7b80e

Browse files
committed
ci: restore apple x86_64 target
In [1], we migrated macos builds from x86_64 to aarch64. There are still plenty of x86_64 macs running around, and our CI binaries should support them if we can. Ensure we cross-compile for x86_64 as well. [1]: 46a0222
1 parent fc50ae3 commit 1c7b80e

File tree

3 files changed

+33
-7
lines changed

3 files changed

+33
-7
lines changed

Diff for: .github/workflows/rust_release.yml

+10-3
Original file line numberDiff line numberDiff line change
@@ -221,19 +221,25 @@ jobs:
221221
file: ${{ env.samedec_target_exe }}
222222
overwrite: true
223223

224-
# MacOS build, on whatever machine github has available
224+
# MacOS build, aarch64
225225
release_macos:
226226
runs-on: macos-latest
227227

228228
needs: vendor_sources
229229

230+
strategy:
231+
matrix:
232+
include:
233+
- target: aarch64-apple-darwin
234+
- target: x86_64-apple-darwin
235+
230236
env:
231-
CARGO_BUILD_TARGET: aarch64-apple-darwin
237+
CARGO_BUILD_TARGET: ${{ matrix.target }}
232238
CARGO_NET_OFFLINE: "true"
233239
CARGO_INSTALL_ROOT: "install/"
234240
RUSTFLAGS: '-C strip=symbols'
235241
samedec_exe: 'install/bin/samedec'
236-
samedec_target_exe: install/bin/samedec-aarch64-apple-darwin
242+
samedec_target_exe: install/bin/samedec-${{ matrix.target }}
237243

238244
steps:
239245
- uses: actions/checkout@v3
@@ -254,6 +260,7 @@ jobs:
254260
- name: Build
255261
run: |
256262
mkdir -p 'install' &&
263+
rustup target add "$CARGO_BUILD_TARGET" &&
257264
cargo fetch --locked &&
258265
cargo build --offline --tests --frozen --release --workspace
259266

Diff for: .github/workflows/rust_test.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,14 @@ jobs:
165165
- name: Run integration tests
166166
shell: bash
167167
run: |
168-
pushd sample
169-
./test.sh
170-
popd
168+
pushd sample && ./test.sh && popd
169+
170+
- name: Cross-compile macOS target for x86_64 (apple only)
171+
shell: bash
172+
if: ${{ matrix.os == 'macos-latest' }}
173+
run: |
174+
rustup target add x86_64-apple-darwin && \
175+
cargo test --frozen -p samedec --verbose --target=x86_64-apple-darwin
171176
172177
# Linux builds within our containerized release environment
173178
test_samedec_containerized:

Diff for: README.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,28 @@ alerts.
4444

4545
Binary builds are available on the
4646
[releases](https://github.com/cbs228/sameold/releases) page for a variety of
47-
platforms. Linux binaries are currently built against glibc 2.28 and should be
47+
platforms, including:
48+
49+
* `aarch64-apple-darwin`
50+
* `aarch64-unknown-linux-gnu`
51+
* `armv7-unknown-linux-gnueabihf`
52+
* `i686-unknown-linux-gnu`
53+
* `x86_64-pc-windows-msvc`
54+
* `x86_64-unknown-linux-gnu`
55+
56+
GNU/Linux binaries are currently built for glibc 2.28 and should be
4857
portable to most distros.
4958

5059
### Building
5160

5261
You will need a working
5362
[rust toolchain](https://www.rust-lang.org/learn/get-started).
5463

64+
```bash
65+
cargo install samedec
66+
samedec --help
67+
```
68+
5569
To build and install binaries from this repository, run
5670

5771
```bash

0 commit comments

Comments
 (0)