Skip to content

Commit 2e9f120

Browse files
committed
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
2 parents b7e8b9a + 73d7599 commit 2e9f120

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/release.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
- os: ubuntu-20.04
3535
target: x86_64-unknown-linux-gnu
3636
code-target: linux-x64
37+
container: ubuntu:18.04
3738
- os: ubuntu-20.04
3839
target: aarch64-unknown-linux-gnu
3940
code-target: linux-arm64
@@ -49,6 +50,7 @@ jobs:
4950

5051
name: dist (${{ matrix.target }})
5152
runs-on: ${{ matrix.os }}
53+
container: ${{ matrix.container }}
5254

5355
env:
5456
RA_TARGET: ${{ matrix.target }}
@@ -59,6 +61,14 @@ jobs:
5961
with:
6062
fetch-depth: ${{ env.FETCH_DEPTH }}
6163

64+
- name: Install toolchain dependencies
65+
if: matrix.container == 'ubuntu:18.04'
66+
shell: bash
67+
run: |
68+
apt-get update && apt-get install -y build-essential curl
69+
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --profile minimal --default-toolchain none -y
70+
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
71+
6272
- name: Install Rust toolchain
6373
run: |
6474
rustup update --no-self-update stable

0 commit comments

Comments
 (0)