about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-09-11 11:34:25 +0000
committerbors <bors@rust-lang.org>2022-09-11 11:34:25 +0000
commit2e9f1204ca01c3e20898d4a67c8b84899d394a88 (patch)
treef05b722eaaea627a1097d86790a7884e8a2c873d
parentb7e8b9a6b8f25f269bc141f2749555418ab0f370 (diff)
parent73d759955f7f0e9a104346ac89174e15467c67bb (diff)
downloadrust-2e9f1204ca01c3e20898d4a67c8b84899d394a88.tar.gz
rust-2e9f1204ca01c3e20898d4a67c8b84899d394a88.zip
Auto merge of #13214 - SpencerSharkey:ubuntu-container-build, r=lnicola
Build release artifact against older Glibc

When GitHub [deprecated Ubuntu 18.04](https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/) runners, rust-analyzer was forced to bump runners to 20.04 which includes an updated Glib. This renders RA incompatible with the still popular Ubuntu 18.04 and other slightly older distro versions.

Until a deprecation plan is announced on RA's side, I propose binaries shall be built against older glibc to maintain compatibility.

This PR changes the Release CI workflow to build the `linux-x64/x86_64-unknown-linux-gnu` release in an Ubuntu 18.04 container.

Fixes #13081 and #13085
-rw-r--r--.github/workflows/release.yaml10
1 files changed, 10 insertions, 0 deletions
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 303a10615bb..f4d472e3d5c 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -34,6 +34,7 @@ jobs:
           - os: ubuntu-20.04
             target: x86_64-unknown-linux-gnu
             code-target: linux-x64
+            container: ubuntu:18.04
           - os: ubuntu-20.04
             target: aarch64-unknown-linux-gnu
             code-target: linux-arm64
@@ -49,6 +50,7 @@ jobs:
 
     name: dist (${{ matrix.target }})
     runs-on: ${{ matrix.os }}
+    container: ${{ matrix.container }}
 
     env:
       RA_TARGET: ${{ matrix.target }}
@@ -59,6 +61,14 @@ jobs:
         with:
           fetch-depth: ${{ env.FETCH_DEPTH }}
 
+      - name: Install toolchain dependencies
+        if: matrix.container == 'ubuntu:18.04'
+        shell: bash
+        run: |
+          apt-get update && apt-get install -y build-essential curl
+          curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --profile minimal --default-toolchain none -y
+          echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
+
       - name: Install Rust toolchain
         run: |
           rustup update --no-self-update stable