Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ jobs:
# builds use plain `native-tls` against the SDK's libopenssl.
- target: aarch64-unknown-linux-musl
tls: vendored-openssl
# A target whose `max-atomic-width` is 32, the shape of OpenWrt's
# mpc85xx, ath79 and ramips. A dependency that reaches for
# `AtomicU64` builds on every target above and fails only here.
# OpenSSL again, because ring has no 32-bit PowerPC.
- target: powerpc-unknown-linux-gnu
tls: vendored-openssl
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand All @@ -176,8 +182,25 @@ jobs:
with:
toolchain: stable
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
# One cache per matrix entry. The key otherwise names only the job,
# so an entry restores whatever another one built.
key: ${{ matrix.target }}-${{ matrix.tls }}
- run: cargo install cross@0.2.5 --locked
- run: cross build --release --target ${{ matrix.target }} --no-default-features --features ${{ matrix.tls }}
env:
# 32-bit PowerPC has no 64-bit atomic instruction, so the compiler
# calls into libatomic. Without this the link succeeds and CI stays
# green, but the loader cannot start the binary: __atomic_load_8 and
# five more resolve nowhere.
RUSTFLAGS: ${{ matrix.target == 'powerpc-unknown-linux-gnu' && '-C link-arg=-latomic' || '' }}
# That link is the one that can go wrong without failing, so start the
# artifact under the image's qemu. `--version` only: no network from CI.
- if: matrix.target == 'powerpc-unknown-linux-gnu'
run: |
docker run --rm -v "$PWD/target/${{ matrix.target }}/release:/w" \
ghcr.io/cross-rs/${{ matrix.target }}:0.2.5 \
qemu-ppc-static -L /usr/powerpc-linux-gnu /w/librespeed-cli --version
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: librespeed-cli-${{ matrix.target }}-${{ matrix.tls }}
Expand Down
100 changes: 79 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ serde = { version = "1", features = ["derive"] }
tokio-native-tls = { version = "0.3", optional = true }
serde_json = { version = "1", features = ["raw_value"] }
socket2 = { version = "0.5", features = ["all"] }
surge-ping = "0.9"
# Held on the 0.8 line: 0.9.1 reaches for `AtomicU64`, which does not exist
# where `max-atomic-width` is 32 -- 32-bit PowerPC and MIPS, so mpc85xx,
# ath79 and ramips in OpenWrt. The counter behind it is only ever compared
# for equality, so a 32-bit one would do; until upstream narrows it, this
# crate stays where the ping phase is known to build and run.
surge-ping = "0.8"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "time", "io-util", "sync", "fs", "signal"] }
tower-service = "0.3"
url = "2"
Expand Down
Loading