From 583ba2deaed115cceda2543bda5afc6593efec35 Mon Sep 17 00:00:00 2001 From: Peter Huene Date: Thu, 17 Oct 2024 08:56:07 -0700 Subject: [PATCH] chore: attempt to fix arm64 linux build and non-Windows packaging. (#28) --- .github/workflows/release.yml | 8 ++++---- Cargo.toml | 7 +++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ac1338d..cc15cda 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,15 +51,15 @@ jobs: run: rustup update stable && rustup default stable && rustup target add ${{ matrix.rust-target }} - run: cargo build --release --target ${{ matrix.rust-target }} if: ${{ ! matrix.cross }} - - run: sudo dpkg --add-architecture arm64 && sudo apt-get update && sudo apt-get install -y libssl-dev:arm64 - if: ${{ matrix.cross }} - run: cargo install cross if: ${{ matrix.cross }} - run: cross build --release --target ${{ matrix.rust-target }} if: ${{ matrix.cross }} - - run: tar -czvf sprocket-${{ matrix.rust-target }}.tar.gz -C ./target/${{ matrix.rust-target }}/release sprocket + - run: tar -czvf sprocket-${{ matrix.rust-target }}.tar.gz sprocket + working-directory: ./target/${{ matrix.rust-target }}/release if: matrix.os != 'windows-latest' - - run: cd ./target/${{ matrix.rust-target }}/release && 7z a sprocket-${{ matrix.rust-target }}.zip sprocket.exe + - run: 7z a sprocket-${{ matrix.rust-target }}.zip sprocket.exe + working-directory: ./target/${{ matrix.rust-target }}/release if: matrix.os == 'windows-latest' - name: Update the GH release with the new artifact uses: softprops/action-gh-release@v2 diff --git a/Cargo.toml b/Cargo.toml index 29f49ce..70d6c1e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,3 +27,10 @@ tokio = { version = "1.39.1", features = ["full"] } tracing-log = "0.2.0" indicatif = "0.17.8" clap-verbosity-flag = "2.2.1" + +# Install openssl for the linux arm64 build +[workspace.metadata.cross.target.aarch64-unknown-linux-gnu] +pre-build = [ + "dpkg --add-architecture $CROSS_DEB_ARCH", + "apt-get update && apt-get --assume-yes install libssl-dev:$CROSS_DEB_ARCH" +]