-
Notifications
You must be signed in to change notification settings - Fork 100
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
Support llvm dev releases #433
Open
trxcllnt
wants to merge
8
commits into
nodejs:main
Choose a base branch
from
trxcllnt:fix/use-llvm-dev-branch
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
41f395d
expand the number of possible future LLVM versions to 99
trxcllnt 3b6dd74
check to see if the LLVM version is the current dev release
trxcllnt 2f7f284
update github workflow to test more LLVM versions, including the curr…
trxcllnt 460472d
update linter job to use lldb-11
trxcllnt c924ad9
parse the python version from the python3 binary
trxcllnt e030df1
add llvm libs to ld config and regenerate ld cache
trxcllnt 2348ceb
remove ubuntu18.04 because that runner type was removed by github, ad…
trxcllnt 1d965d1
add concurrency key
trxcllnt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -28,11 +28,15 @@ jobs: | |
# Temporarily disable MacOS until | ||
# https://github.com/nodejs/node/issues/32981 is fixed | ||
# TODO(mmarchini): test on 20.04 (need different lldb version) | ||
os: [ubuntu-18.04, ubuntu-20.04] | ||
llvm: [8, 9, 10, 11, 12, 13, 14] | ||
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04] | ||
llvm: [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] | ||
exclude: | ||
# This errors due to a glibc incompatibility. | ||
- {os: ubuntu-18.04, node: {version: 18.x}} | ||
# Neither LLVM nor Canonical package these versions for Jammy | ||
- {os: ubuntu-22.04, llvm: 8} | ||
- {os: ubuntu-22.04, llvm: 9} | ||
- {os: ubuntu-22.04, llvm: 10} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node.version }} ${{ matrix.node.mirror }} | ||
|
@@ -44,25 +48,59 @@ jobs: | |
- name: install dependencies Linux | ||
if: startsWith(matrix.os, 'ubuntu-') | ||
run: | | ||
use_llvm_repos=0 | ||
use_llvm_repos=1 | ||
|
||
case "${{ matrix.os }}-${{ matrix.llvm }}" in | ||
ubuntu-18.04-10) use_llvm_repos=1;; | ||
ubuntu-18.04-11) use_llvm_repos=1;; | ||
ubuntu-18.04-12) use_llvm_repos=1;; | ||
ubuntu-18.04-13) use_llvm_repos=1;; | ||
ubuntu-18.04-14) use_llvm_repos=1;; | ||
ubuntu-20.04-13) use_llvm_repos=1;; | ||
ubuntu-20.04-14) use_llvm_repos=1;; | ||
*) use_llvm_repos=0;; | ||
case "${{ matrix.os }}" in | ||
ubuntu-18.04) | ||
case "${{ matrix.llvm }}" in | ||
8) use_llvm_repos=0;; | ||
9) use_llvm_repos=0;; | ||
10) use_llvm_repos=0;; | ||
*) use_llvm_repos=1;; | ||
esac | ||
;; | ||
ubuntu-20.04) | ||
case "${{ matrix.llvm }}" in | ||
8) use_llvm_repos=0;; | ||
9) use_llvm_repos=0;; | ||
10) use_llvm_repos=0;; | ||
11) use_llvm_repos=0;; | ||
12) use_llvm_repos=0;; | ||
*) use_llvm_repos=1;; | ||
esac | ||
;; | ||
ubuntu-22.04) | ||
case "${{ matrix.llvm }}" in | ||
11) use_llvm_repos=0;; | ||
12) use_llvm_repos=0;; | ||
13) use_llvm_repos=0;; | ||
14) use_llvm_repos=0;; | ||
15) use_llvm_repos=0;; | ||
*) use_llvm_repos=1;; | ||
esac | ||
;; | ||
*) use_llvm_repos=1;; | ||
esac | ||
|
||
if [[ ${use_llvm_repos} == 1 ]]; then | ||
llvm_suffix="-${{ matrix.llvm }}"; | ||
# If there's no `release/XY.x` branch, check if this is current dev release | ||
if ! git ls-remote --exit-code --heads \ | ||
https://github.com/llvm/llvm-project.git \ | ||
refs/heads/release/${{ matrix.llvm }}.x >/dev/null 2>&1; then | ||
# If there's an `llvmorg-XY-init` tag, this is the current dev release | ||
if git ls-remote --exit-code --tags \ | ||
https://github.com/llvm/llvm-project.git \ | ||
refs/tags/llvmorg-${{ matrix.llvm }}-init >/dev/null 2>&1; then | ||
# The dev release doesn't use a version suffix | ||
llvm_suffix=""; | ||
fi | ||
fi | ||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -; | ||
release="$(lsb_release -cs)" | ||
cat << EOF | sudo tee /etc/apt/sources.list.d/llvm-${{ matrix.llvm }}.list | ||
deb http://apt.llvm.org/${release}/ llvm-toolchain-${release}-${{ matrix.llvm }} main | ||
deb-src http://apt.llvm.org/${release}/ llvm-toolchain-${release}-${{ matrix.llvm }} main | ||
cat << EOF | sudo tee /etc/apt/sources.list.d/llvm${llvm_suffix}.list | ||
deb http://apt.llvm.org/${release}/ llvm-toolchain-${release}${llvm_suffix} main | ||
deb-src http://apt.llvm.org/${release}/ llvm-toolchain-${release}${llvm_suffix} main | ||
EOF | ||
fi | ||
|
||
|
@@ -74,8 +112,10 @@ jobs: | |
|
||
if [[ -n "$(which lldb-${{ matrix.llvm }})" ]]; then | ||
sudo ln -s "$(which lldb-${{ matrix.llvm }})" /usr/bin/lldb | ||
sudo mkdir -p /usr/lib/lib/python3.8 | ||
sudo ln -s /usr/lib/llvm-${{ matrix.llvm }}/lib/python3.8/site-packages /usr/lib/lib/python3.8/site-packages | ||
python_version="$(python3 --version 2>&1 | cut -d' ' -f2 | cut -d'.' -f3 --complement)"; | ||
# Is `/usr/lib/lib` here correct? | ||
sudo mkdir -p /usr/lib/lib/python${python_version} | ||
sudo ln -s /usr/lib/llvm-${{ matrix.llvm }}/lib/python${python_version}/site-packages /usr/lib/lib/python${python_version}/site-packages | ||
Comment on lines
+111
to
+113
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. Left a comment here, not sure what symlinking to |
||
fi | ||
|
||
if [[ -n "$(which llvm-config-${{ matrix.llvm }})" ]]; then | ||
|
@@ -112,7 +152,7 @@ jobs: | |
- name: npm install, build, and test | ||
run: | | ||
sudo apt-get -qq update | ||
sudo apt-get install lldb-6.0 liblldb-6.0-dev lcov -y | ||
sudo ln -s $(which lldb-6.0) /usr/bin/lldb | ||
sudo apt-get install lldb-11 liblldb-11-dev lcov -y | ||
sudo ln -s $(which lldb-11) /usr/bin/lldb | ||
Comment on lines
+153
to
+154
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. Updated these to |
||
npm install | ||
npm run linter |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This defaults to using the LLVM repos unless it's one of the versions packaged by Canonical. This should be a limited set, compared to the previous way which would need exceptions for every version not packaged by Canonical.