From 86d41d6515465f8a12d46fe6dea8ed7dd461e4c0 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 25 May 2025 07:50:55 +0000 Subject: [PATCH 1/2] I've made some changes to address OpenSSL dependency issues in the release workflow. This update to the GitHub Actions release workflow should better handle OpenSSL dependencies, which were causing build failures on certain platforms. Here's a summary of the key changes: - **macOS (x86_64 & ARM64):** - I'll now install OpenSSL (openssl@3) using Homebrew. - I've set up the environment so that Rust's `openssl-sys` crate can find the OpenSSL installation. - **Linux ARM64 (aarch64-unknown-linux-gnu):** - I've added `libssl-dev` and `pkg-config` to the list of installed packages. This will help when `openssl-sys` needs to compile OpenSSL from source or find system libraries during cross-compilation. - **Windows (x86_64-pc-windows-msvc):** - I've added a step to install Strawberry Perl using Chocolatey. Perl is often required by the OpenSSL build scripts if the `openssl-sys` crate builds OpenSSL from source. These changes should resolve the previously encountered OpenSSL-related build errors and improve the reliability of the release binary compilation process. --- .github/workflows/release.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d5e99d8..975c403 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,11 +51,34 @@ jobs: target: ${{ matrix.platform.target }} override: true + - name: Install Perl (Windows for vendored OpenSSL) + if: runner.os == 'Windows' + run: choco install strawberryperl --no-progress + - name: Install dependencies for Linux ARM64 cross-compilation if: matrix.platform.target == 'aarch64-unknown-linux-gnu' run: | sudo apt-get update - sudo apt-get install -y gcc-aarch64-linux-gnu + sudo apt-get install -y gcc-aarch64-linux-gnu libssl-dev pkg-config + + - name: Install OpenSSL (macOS) + if: runner.os == 'macOS' + run: | + brew install openssl@3 + echo "OPENSSL_ROOT_DIR=$(brew --prefix openssl@3)" >> $GITHUB_ENV + echo "OPENSSL_LIB_DIR=$(brew --prefix openssl@3)/lib" >> $GITHUB_ENV + echo "LDFLAGS=-L$(brew --prefix openssl@3)/lib" >> $GITHUB_ENV + echo "CPPFLAGS=-I$(brew --prefix openssl@3)/include" >> $GITHUB_ENV + echo "PKG_CONFIG_PATH=$(brew --prefix openssl@3)/lib/pkgconfig" >> $GITHUB_ENV + + - name: Verify OpenSSL Env Vars (macOS) + if: runner.os == 'macOS' + run: | + echo "OPENSSL_ROOT_DIR is: $OPENSSL_ROOT_DIR" + echo "OPENSSL_LIB_DIR is: $OPENSSL_LIB_DIR" + echo "LDFLAGS is: $LDFLAGS" + echo "CPPFLAGS is: $CPPFLAGS" + echo "PKG_CONFIG_PATH is: $PKG_CONFIG_PATH" - name: Build binary run: cargo build --release --locked --target ${{ matrix.platform.target }} From f5bc6401959c2cee6c89dfd4031171dbc72ea23e Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 25 May 2025 07:53:54 +0000 Subject: [PATCH 2/2] fix: Enable core.longpaths for Git on Windows runners This commit updates the GitHub Actions release workflow to address an "invalid path" error encountered during the checkout process on Windows runners. The fix involves adding a step to execute `git config --system core.longpaths true` before the `actions/checkout` step for jobs running on Windows. This Git configuration allows handling of long file paths, which can otherwise cause issues on this platform. --- .github/workflows/release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 975c403..7f5f6e9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,6 +41,10 @@ jobs: binary_ext: ".exe" archive_ext: ".zip" steps: + - name: Configure Git for long paths (Windows) + if: runner.os == 'Windows' + run: git config --system core.longpaths true + - name: Checkout code uses: actions/checkout@v4