-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Use apt-get to install Clang on CI #6345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 18 commits
7e846c8
8d87fd8
a3a5e38
d34e490
8dafd57
a028757
c52073d
f39b33a
84c96bb
469c1e1
9a9b1f0
7618b1d
397052c
c349518
b0ecc57
87821c4
e768fb9
f82796b
bc521ab
a54221a
ddeb733
31fbbed
58a5592
3f5b19b
6bea064
61eb847
2790ed0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,7 +138,7 @@ jobs: | |
runs-on: ubuntu-20.04 | ||
BUILD_TOOLS: ON | ||
BUILD_TYPE: Debug | ||
CLANG_VERSION: 6.0.0 | ||
CLANG_VERSION: 6 | ||
CUCUMBER_TIMEOUT: 60000 | ||
|
||
- name: clang-11.0-debug-clang-tidy | ||
|
@@ -147,7 +147,7 @@ jobs: | |
runs-on: ubuntu-20.04 | ||
BUILD_TOOLS: ON | ||
BUILD_TYPE: Debug | ||
CLANG_VERSION: 11.0.0 | ||
CLANG_VERSION: 11 | ||
CUCUMBER_TIMEOUT: 60000 | ||
ENABLE_CLANG_TIDY: ON | ||
|
||
|
@@ -157,7 +157,7 @@ jobs: | |
runs-on: ubuntu-20.04 | ||
BUILD_TOOLS: ON | ||
BUILD_TYPE: Release | ||
CLANG_VERSION: 11.0.0 | ||
CLANG_VERSION: 11 | ||
|
||
ENABLE_CONAN: ON | ||
ENABLE_SANITIZER: ON | ||
|
||
|
@@ -167,7 +167,7 @@ jobs: | |
runs-on: ubuntu-20.04 | ||
BUILD_TOOLS: ON | ||
BUILD_TYPE: Release | ||
CLANG_VERSION: 6.0.0 | ||
CLANG_VERSION: 6 | ||
ENABLE_CONAN: ON | ||
|
||
- name: gcc-11-release | ||
|
@@ -285,7 +285,7 @@ jobs: | |
node: 12 | ||
runs-on: ubuntu-20.04 | ||
BUILD_TYPE: Release | ||
CLANG_VERSION: 6.0.0 | ||
CLANG_VERSION: 6 | ||
ENABLE_GLIBC_WORKAROUND: ON | ||
ENABLE_CONAN: ON | ||
NODE_PACKAGE_TESTS_ONLY: ON | ||
|
@@ -296,7 +296,7 @@ jobs: | |
node: 12 | ||
runs-on: ubuntu-20.04 | ||
BUILD_TYPE: Debug | ||
CLANG_VERSION: 6.0.0 | ||
CLANG_VERSION: 6 | ||
ENABLE_GLIBC_WORKAROUND: ON | ||
ENABLE_CONAN: ON | ||
NODE_PACKAGE_TESTS_ONLY: ON | ||
|
@@ -307,7 +307,7 @@ jobs: | |
node: 14 | ||
runs-on: ubuntu-20.04 | ||
BUILD_TYPE: Release | ||
CLANG_VERSION: 6.0.0 | ||
CLANG_VERSION: 6 | ||
ENABLE_GLIBC_WORKAROUND: ON | ||
ENABLE_CONAN: ON | ||
NODE_PACKAGE_TESTS_ONLY: ON | ||
|
@@ -318,7 +318,7 @@ jobs: | |
node: 14 | ||
runs-on: ubuntu-20.04 | ||
BUILD_TYPE: Debug | ||
CLANG_VERSION: 6.0.0 | ||
CLANG_VERSION: 6 | ||
ENABLE_GLIBC_WORKAROUND: ON | ||
ENABLE_CONAN: ON | ||
NODE_PACKAGE_TESTS_ONLY: ON | ||
|
@@ -330,7 +330,7 @@ jobs: | |
node: 16 | ||
runs-on: ubuntu-20.04 | ||
BUILD_TYPE: Release | ||
CLANG_VERSION: 6.0.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think all references to |
||
CLANG_VERSION: 6 | ||
ENABLE_GLIBC_WORKAROUND: ON | ||
ENABLE_CONAN: ON | ||
NODE_PACKAGE_TESTS_ONLY: ON | ||
|
@@ -341,7 +341,7 @@ jobs: | |
node: 16 | ||
runs-on: ubuntu-20.04 | ||
BUILD_TYPE: Debug | ||
CLANG_VERSION: 6.0.0 | ||
CLANG_VERSION: 6 | ||
ENABLE_GLIBC_WORKAROUND: ON | ||
ENABLE_CONAN: ON | ||
NODE_PACKAGE_TESTS_ONLY: ON | ||
|
@@ -364,7 +364,7 @@ jobs: | |
node: latest | ||
runs-on: ubuntu-20.04 | ||
BUILD_TYPE: Release | ||
CLANG_VERSION: 6.0.0 | ||
CLANG_VERSION: 6 | ||
ENABLE_GLIBC_WORKAROUND: ON | ||
ENABLE_CONAN: ON | ||
NODE_PACKAGE_TESTS_ONLY: ON | ||
|
@@ -375,7 +375,7 @@ jobs: | |
node: latest | ||
runs-on: ubuntu-20.04 | ||
BUILD_TYPE: Debug | ||
CLANG_VERSION: 6.0.0 | ||
CLANG_VERSION: 6 | ||
ENABLE_GLIBC_WORKAROUND: ON | ||
ENABLE_CONAN: ON | ||
NODE_PACKAGE_TESTS_ONLY: ON | ||
|
@@ -398,7 +398,7 @@ jobs: | |
node: "lts/*" | ||
runs-on: ubuntu-20.04 | ||
BUILD_TYPE: Release | ||
CLANG_VERSION: 6.0.0 | ||
CLANG_VERSION: 6 | ||
ENABLE_GLIBC_WORKAROUND: ON | ||
ENABLE_CONAN: ON | ||
NODE_PACKAGE_TESTS_ONLY: ON | ||
|
@@ -409,7 +409,7 @@ jobs: | |
node: "lts/*" | ||
runs-on: ubuntu-20.04 | ||
BUILD_TYPE: Debug | ||
CLANG_VERSION: 6.0.0 | ||
CLANG_VERSION: 6 | ||
ENABLE_GLIBC_WORKAROUND: ON | ||
ENABLE_CONAN: ON | ||
NODE_PACKAGE_TESTS_ONLY: ON | ||
|
@@ -518,8 +518,14 @@ jobs: | |
if [[ -n ${CLANG_VERSION} ]]; then | ||
echo "CCOMPILER=clang" >> $GITHUB_ENV | ||
echo "CXXCOMPILER=clang++" >> $GITHUB_ENV | ||
${MASON} install clang++ ${CLANG_VERSION} | ||
echo "$(${MASON} prefix clang++ ${CLANG_VERSION})/bin" >> $GITHUB_PATH | ||
sudo apt-get update -y && sudo apt-get install "clang++-${CLANG_VERSION}" | ||
if [[ "${CLANG_VERSION}" = "6" ]]; then | ||
|
||
sudo update-alternatives --install /usr/bin/clang++ clang++ "/usr/bin/clang++-${CLANG_VERSION}.0" 10000000 | ||
sudo update-alternatives --install /usr/bin/clang clang "/usr/bin/clang-${CLANG_VERSION}.0" 10000000 | ||
else | ||
sudo update-alternatives --install /usr/bin/clang++ clang++ "/usr/bin/clang++-${CLANG_VERSION}" 10000000 | ||
sudo update-alternatives --install /usr/bin/clang clang "/usr/bin/clang-${CLANG_VERSION}" 10000000 | ||
fi | ||
# we only enable lto for release builds | ||
# and therefore don't need to us ld.gold or llvm tools for linking | ||
# for debug builds | ||
|
@@ -528,7 +534,6 @@ jobs: | |
echo "$(${MASON} prefix binutils 2.27)/bin" >> $GITHUB_PATH | ||
fi | ||
fi | ||
|
||
# Linux dev packages | ||
if [ "${TARGET_ARCH}" != "i686" ] && [ "${ENABLE_CONAN}" != "ON" ]; then | ||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y | ||
|
@@ -556,6 +561,12 @@ jobs: | |
tar zxvf onetbb.tgz | ||
sudo cp -a oneapi-tbb-${TBB_VERSION}/lib/. /usr/local/lib/ | ||
sudo cp -a oneapi-tbb-${TBB_VERSION}/include/. /usr/local/include/ | ||
- name: Check clang version | ||
|
||
run: | | ||
if [[ -n ${CLANG_VERSION} ]]; then | ||
clang --version | grep "${CLANG_VERSION}" | ||
clang++ --version | grep "${CLANG_VERSION}" | ||
fi | ||
|
||
- name: Prepare build | ||
run: | | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could just use
CCOMPILER/CXXCOMPILER
to use pre-installed clang, but the lowest pre-installed version is only 10: https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md