diff --git a/.github/workflows/build-raspberry.yml b/.github/workflows/build-raspberry.yml index 42bee37..b51ab4a 100644 --- a/.github/workflows/build-raspberry.yml +++ b/.github/workflows/build-raspberry.yml @@ -4,6 +4,8 @@ on: push: branches: - main + pull_request: + types: [opened, synchronize, reopened] jobs: build: @@ -23,7 +25,7 @@ jobs: - name: Install cross-build dependencies run: | sudo apt update -y - sudo apt install -y pkg-config-arm-linux-gnueabihf gcc-arm-linux-gnueabihf + sudo apt install -y gcc-arm-linux-gnueabihf - name: Install armhf build dependencies uses: ryankurte/action-apt@v0.3.0 diff --git a/Cargo.lock b/Cargo.lock index 180e73c..5988d27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -70,9 +70,9 @@ checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" [[package]] name = "cc" -version = "1.0.66" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" [[package]] name = "cfg-if" @@ -138,6 +138,7 @@ dependencies = [ "config", "log", "openssl", + "openssl-src 300.1.2+3.1.1", "reqwest", "serialport", "simplelog", @@ -617,6 +618,24 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" +[[package]] +name = "openssl-src" +version = "111.25.0+1.1.1t" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3173cd3626c43e3854b1b727422a276e568d9ec5fe8cec197822cf52cfb743d6" +dependencies = [ + "cc", +] + +[[package]] +name = "openssl-src" +version = "300.1.2+3.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94773a6131a4d91f737a31debb0b3258964a47d923ef539c8be1d496dfb5145d" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.88" @@ -625,6 +644,7 @@ checksum = "c2ce0f250f34a308dcfdbb351f511359857d4ed2134ba715a4eadd46e1ffd617" dependencies = [ "cc", "libc", + "openssl-src 111.25.0+1.1.1t", "pkg-config", "vcpkg", ] diff --git a/Cargo.toml b/Cargo.toml index b93dc6e..da410db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,4 +20,10 @@ version = "0.11.9" features = [ "blocking" ] [dependencies.openssl] -version = "0.10.54" \ No newline at end of file +version = "0.10.54" +# Build OpenSSL as part of building this crate +features = [ "vendored" ] + +# Ensure we select OpenSSL 3.x +[dependencies.openssl-src] +version = "300.1.2+3.1.1" diff --git a/cross-compile-armv7.sh b/cross-compile-armv7.sh index d5acecb..0b564e5 100755 --- a/cross-compile-armv7.sh +++ b/cross-compile-armv7.sh @@ -1,12 +1,6 @@ #!/bin/bash set -euo pipefail -# echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal main" > /etc/apt/sources.list.d/ubuntu-ports.list -# echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-security main" > /etc/apt/sources.list.d/ubuntu-ports.list -# echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-updates main" > /etc/apt/sources.list.d/ubuntu-ports.list -# sudo aptitude update -# sudo aptitude install pkg-config-arm-linux-gnueabihf libssl-dev:armhf libudev-dev:armhf - rustup target add armv7-unknown-linux-gnueabihf ls -hl $ARMHF_TOOLCHAIN_PATH/bin