-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test multiple Linux distributions for the stdlib
The compiler tests can just run on the GitHub runner directly, as these don't involve platform specifics. However, the standard library tests may run into platform specific bits, such as certain distributions requiring additional linker arguments. In addition, standard library tests now only run using Rust 1.68, instead of also testing against Rust stable. As the compiler tests already run against Rust stable, also running the standard library tests using this version is redundant. This commit also includes some fixes for the linker to handle older platforms (e.g. Debian 11) requiring extra libraries to be linked in. Changelog: fixed
- Loading branch information
1 parent
f2a9370
commit 9cc1131
Showing
8 changed files
with
198 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,6 @@ jobs: | |
matrix: | ||
version: | ||
- '1.68' | ||
- stable | ||
runs-on: macos-latest | ||
needs: | ||
- compiler | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
LLVM_VERSION='15' | ||
|
||
function apt_install_llvm { | ||
curl \ | ||
--retry 10 --retry-connrefused --silent --show-error --fail --location \ | ||
https://apt.llvm.org/llvm-snapshot.gpg.key | \ | ||
tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc | ||
|
||
add-apt-repository \ | ||
"deb http://apt.llvm.org/${1}/ llvm-toolchain-${1}-${LLVM_VERSION} main" | ||
apt-get update --yes | ||
apt-get install --yes llvm-${LLVM_VERSION} llvm-${LLVM_VERSION}-dev \ | ||
libclang-common-${LLVM_VERSION}-dev libpolly-${LLVM_VERSION}-dev | ||
} | ||
|
||
echo "::group::Installing dependencies" | ||
|
||
if [ "${1}" = "ubuntu:latest" ] | ||
then | ||
apt-get update --yes | ||
apt-get install --yes llvm-${LLVM_VERSION} llvm-${LLVM_VERSION}-dev \ | ||
libstdc++-11-dev libclang-common-${LLVM_VERSION}-dev zlib1g-dev curl \ | ||
build-essential git | ||
|
||
elif [ "${1}" = "ubuntu:20.04" ] | ||
then | ||
apt-get update --yes | ||
apt-get install --yes libstdc++-10-dev zlib1g-dev curl build-essential \ | ||
software-properties-common git | ||
apt_install_llvm focal | ||
|
||
elif [ "${1}" = "debian:latest" ] | ||
then | ||
apt-get update --yes | ||
apt-get install --yes llvm-${LLVM_VERSION} llvm-${LLVM_VERSION}-dev \ | ||
libstdc++-11-dev libclang-common-${LLVM_VERSION}-dev zlib1g-dev curl \ | ||
build-essential git | ||
|
||
elif [ "${1}" = "debian:11" ] | ||
then | ||
apt-get update --yes | ||
apt-get install --yes libstdc++-10-dev zlib1g-dev curl build-essential \ | ||
software-properties-common git | ||
apt_install_llvm bullseye | ||
|
||
elif [ "${1}" = "fedora:37" ] | ||
then | ||
dnf install --assumeyes gcc make tar git \ | ||
llvm llvm-devel llvm-static libstdc++-devel libstdc++-static \ | ||
libffi-devel zlib-devel | ||
|
||
elif [ "${1}" = "fedora:latest" ] | ||
then | ||
dnf install --assumeyes gcc make tar git \ | ||
llvm${LLVM_VERSION} llvm${LLVM_VERSION}-devel \ | ||
llvm${LLVM_VERSION}-static libstdc++-devel libstdc++-static \ | ||
libffi-devel zlib-devel | ||
|
||
elif [ "${1}" = "archlinux:latest" ] | ||
then | ||
pacman -Syu --noconfirm llvm git base-devel curl | ||
|
||
elif [ "${1}" = "mac" ] | ||
then | ||
brew install llvm@${LLVM_VERSION} | ||
echo "$(brew --prefix llvm@${LLVM_VERSION})/bin" >> $GITHUB_PATH | ||
else | ||
echo 'An OS to install dependencies for must be specified' | ||
exit 1 | ||
fi | ||
|
||
echo "::endgroup::" |
Oops, something went wrong.