CI: OTP and Elixir straight from builds.hex.pm

8c75484 · Gabriel Morell · 2026-10-22 21:33

4 files +30 -24
Message
{commit_body(@commit)}

Files changed

modified .forgejo/workflows/checks.yml
+15 −12
@@ -38,19 +38,22 @@ jobs:
38 38 sudo apt-get install -y -q --no-install-recommends \
39 39 build-essential git pkg-config libssl-dev libclang-dev
40 40
41 − # setup-beam picks its OTP build by ImageOS, which the runner sets to
42 − # "selfhosted"; given on the step itself, ours wins.
43 − - name: Say which Ubuntu this is, for setup-beam
44 − id: os
45 − run: echo "image_os=ubuntu$(. /etc/os-release && echo "${VERSION_ID%%.*}")" >> "$GITHUB_OUTPUT"
46 −
47 − - uses: erlef/setup-beam@v1
41 + # OTP and Elixir from builds.hex.pm, the builds setup-beam would
42 + # fetch — taken directly, since setup-beam chooses one by ImageOS,
43 + # which this runner sets to "selfhosted" over anything a workflow
44 + # says.
45 + - name: OTP and Elixir
48 46 env:
49 − ImageOS: ${{ steps.os.outputs.image_os }}
50 − with:
51 − otp-version: "28.5.0.2"
52 − elixir-version: "1.19.5"
53 − version-type: strict
47 + OTP_VERSION: "28.5.0.2"
48 + ELIXIR_VERSION: "1.19.5"
49 + run: |
50 + ubuntu=$(. /etc/os-release && echo "$VERSION_ID")
51 + curl -sSfL "https://builds.hex.pm/builds/otp/ubuntu-${ubuntu}/OTP-${OTP_VERSION}.tar.gz" | tar xz -C /tmp
52 + (cd "/tmp/OTP-${OTP_VERSION}" && ./Install -minimal /tmp/otp > /dev/null)
53 + curl -sSfL -o /tmp/elixir.zip "https://builds.hex.pm/builds/elixir/v${ELIXIR_VERSION}-otp-${OTP_VERSION%%.*}.zip"
54 + unzip -q -d /tmp/elixir /tmp/elixir.zip
55 + echo /tmp/otp/bin >> "$GITHUB_PATH"
56 + echo /tmp/elixir/bin >> "$GITHUB_PATH"
54 57
55 58 - name: Rust
56 59 run: |
modified .forgejo/workflows/dependency-updates.yml
+15 −12
@@ -30,19 +30,22 @@ jobs:
30 30
31 31 # The same toolchains the Dockerfile builds with: a lockfile is only
32 32 # as good as the resolver that wrote it.
33 − # setup-beam picks its OTP build by ImageOS, which the runner sets to
34 − # "selfhosted"; given on the step itself, ours wins.
35 − - name: Say which Ubuntu this is, for setup-beam
36 − id: os
37 − run: echo "image_os=ubuntu$(. /etc/os-release && echo "${VERSION_ID%%.*}")" >> "$GITHUB_OUTPUT"
38 −
39 − - uses: erlef/setup-beam@v1
33 + # OTP and Elixir from builds.hex.pm, the builds setup-beam would
34 + # fetch — taken directly, since setup-beam chooses one by ImageOS,
35 + # which this runner sets to "selfhosted" over anything a workflow
36 + # says.
37 + - name: OTP and Elixir
40 38 env:
41 − ImageOS: ${{ steps.os.outputs.image_os }}
42 − with:
43 − otp-version: "28.5.0.2"
44 − elixir-version: "1.19.5"
45 − version-type: strict
39 + OTP_VERSION: "28.5.0.2"
40 + ELIXIR_VERSION: "1.19.5"
41 + run: |
42 + ubuntu=$(. /etc/os-release && echo "$VERSION_ID")
43 + curl -sSfL "https://builds.hex.pm/builds/otp/ubuntu-${ubuntu}/OTP-${OTP_VERSION}.tar.gz" | tar xz -C /tmp
44 + (cd "/tmp/OTP-${OTP_VERSION}" && ./Install -minimal /tmp/otp > /dev/null)
45 + curl -sSfL -o /tmp/elixir.zip "https://builds.hex.pm/builds/elixir/v${ELIXIR_VERSION}-otp-${OTP_VERSION%%.*}.zip"
46 + unzip -q -d /tmp/elixir /tmp/elixir.zip
47 + echo /tmp/otp/bin >> "$GITHUB_PATH"
48 + echo /tmp/elixir/bin >> "$GITHUB_PATH"
46 49
47 50 - name: Hex
48 51 run: mix local.hex --force

Parents: 6676b00