From c81a47a692494fb36c3e169e07f34ef6686612fc Mon Sep 17 00:00:00 2001 From: Badlop Date: Mon, 5 Feb 2024 18:49:07 +0100 Subject: [PATCH] Container: Update make-binaries to support setup-beam v1.17.2 With setup-beam v1.17.2, make-binaries failed in the Container action with: * ERROR: No usable Erlang/OTP system for the build machine found! Cannot * cross compile without such a system. * * Either build a bootstrap system for the build machine, or provide * an Erlang/OTP-26 system in the $PATH, and try again. For more * information on cross compiling Erlang/OTP-26, see the * $ERL_TOP/xcomp/README file. The problematic commit is: https://github.com/erlef/setup-beam/commit/cf854bf14995e965ed7a4f7ec68e426278929376 more concretely this change: - core.exportVariable(installDirForVarName, cachePath) + core.exportVariable(installDirForVarName, catchPathBin) Up until setup-beam@v1.17.1, the INSTALL_DIR_FOR_OTP was something like /opt/hostedtoolcache/otp/ubuntu-22.04/OTP-26.1.1/x64 but starting in v1.17.2, the path contains /bin, for example: /opt/hostedtoolcache/otp/ubuntu-22.04/OTP-26.1.1/x64/bin --- .github/workflows/container.yml | 2 +- tools/make-binaries | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index a1962fe82..b9c655ffa 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -49,7 +49,7 @@ jobs: sudo apt-get -qq install python3-dev texinfo unzip - name: Install erlang/OTP - uses: erlef/setup-beam@v1 + uses: erlef/setup-beam@v1.17.2 with: otp-version: ${{ env.OTP_VSN }} elixir-version: ${{ env.ELIXIR_VSN }} diff --git a/tools/make-binaries b/tools/make-binaries index 51d2261e7..30165290c 100755 --- a/tools/make-binaries +++ b/tools/make-binaries @@ -350,8 +350,8 @@ add_otp_path() then # For github runners to build for non-native systems: # https://github.com/erlef/setup-beam#environment-variables - native_otp_bin="$INSTALL_DIR_FOR_OTP/bin" - native_elixir_bin="$INSTALL_DIR_FOR_ELIXIR/bin" + native_otp_bin="$INSTALL_DIR_FOR_OTP" + native_elixir_bin="$INSTALL_DIR_FOR_ELIXIR" export PATH="$native_elixir_bin:$PATH" fi export PATH="$native_otp_bin:$PATH"