1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

ci: update to Ubuntu-22.04-XL runners (#18181)

Updates CI to use ubuntu-22.04-xl runners. A change to sysroot setup
was necessary that links `libdl.so.2` and `libdl.a` that are no longer
present on ubuntu-22.04.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
Divy Srivastava 2023-03-14 22:12:33 +05:30 committed by GitHub
parent 96b1ede254
commit 485e12062c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 21 deletions

23
.github/workflows/ci.generate.ts vendored Normal file → Executable file
View file

@ -6,7 +6,7 @@ const windowsRunnerCondition =
"github.repository == 'denoland/deno' && 'windows-2022-xl' || 'windows-2022'";
const Runners = {
linux:
"${{ github.repository == 'denoland/deno' && 'ubuntu-20.04-xl' || 'ubuntu-20.04' }}",
"${{ github.repository == 'denoland/deno' && 'ubuntu-22.04-xl' || 'ubuntu-22.04' }}",
macos: "macos-12",
windows: `\${{ ${windowsRunnerCondition} }}`,
};
@ -20,8 +20,8 @@ const sysRootStep = {
sudo apt-get remove --purge -y man-db
# Install clang-15, lld-15, and debootstrap.
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main" |
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-focal-15.list
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" |
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-jammy-15.list
curl https://apt.llvm.org/llvm-snapshot.gpg.key |
gpg --dearmor |
sudo dd of=/etc/apt/trusted.gpg.d/llvm-snapshot.gpg
@ -43,6 +43,12 @@ sudo mount --rbind /sys /sysroot/sys
sudo mount --rbind /home /sysroot/home
sudo mount -t proc /proc /sysroot/proc
cp third_party/prebuilt/linux64/libdl/libdl.so.2 .
cp third_party/prebuilt/linux64/libdl/libdl.a .
sudo ln -s libdl.so.2 /sysroot/lib/x86_64-linux-gnu/libdl.so
sudo ln -s libdl.a /sysroot/lib/x86_64-linux-gnu/libdl.a
# Configure the build environment. Both Rust and Clang will produce
# llvm bitcode only, so we can use lld's incremental LTO support.
cat >> $GITHUB_ENV << __0
@ -55,6 +61,7 @@ RUSTFLAGS<<__1
-C linker=clang-15
-C link-arg=-fuse-ld=lld-15
-C link-arg=--sysroot=/sysroot
-C link-arg=-ldl
-C link-arg=-Wl,--allow-shlib-undefined
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
-C link-arg=-Wl,--thinlto-cache-policy,cache_size_bytes=700m
@ -65,6 +72,7 @@ RUSTDOCFLAGS<<__1
-C linker=clang-15
-C link-arg=-fuse-ld=lld-15
-C link-arg=--sysroot=/sysroot
-C link-arg=-ldl
-C link-arg=-Wl,--allow-shlib-undefined
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
-C link-arg=-Wl,--thinlto-cache-policy,cache_size_bytes=700m
@ -296,14 +304,11 @@ const ci = {
},
...cancelEarlyIfDraftPr([
submoduleStep("./test_util/std"),
submoduleStep("./third_party"),
{
...submoduleStep("./test_util/wpt"),
if: "matrix.wpt",
},
{
...submoduleStep("./third_party"),
if: "matrix.job == 'lint' || matrix.job == 'bench'",
},
{
name: "Create source tarballs (release, linux)",
if: [
@ -420,7 +425,7 @@ const ci = {
"~/.cargo/git/db",
].join("\n"),
key:
"18-cargo-home-${{ matrix.os }}-${{ hashFiles('Cargo.lock') }}",
"20-cargo-home-${{ matrix.os }}-${{ hashFiles('Cargo.lock') }}",
},
},
{
@ -859,7 +864,7 @@ const ci = {
},
"publish-canary": {
name: "publish canary",
"runs-on": "ubuntu-20.04",
"runs-on": "ubuntu-22.04",
needs: ["build"],
if:
"github.repository == 'denoland/deno' && github.ref == 'refs/heads/main'",

View file

@ -39,22 +39,22 @@ jobs:
job: test
profile: release
skip_pr: true
- os: '${{ github.repository == ''denoland/deno'' && ''ubuntu-20.04-xl'' || ''ubuntu-20.04'' }}'
- os: '${{ github.repository == ''denoland/deno'' && ''ubuntu-22.04-xl'' || ''ubuntu-22.04'' }}'
job: test
profile: release
use_sysroot: true
wpt: '${{ !startsWith(github.ref, ''refs/tags/'') }}'
- os: '${{ github.repository == ''denoland/deno'' && ''ubuntu-20.04-xl'' || ''ubuntu-20.04'' }}'
- os: '${{ github.repository == ''denoland/deno'' && ''ubuntu-22.04-xl'' || ''ubuntu-22.04'' }}'
job: bench
profile: release
use_sysroot: true
skip_pr: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-bench'') }}'
- os: '${{ github.repository == ''denoland/deno'' && ''ubuntu-20.04-xl'' || ''ubuntu-20.04'' }}'
- os: '${{ github.repository == ''denoland/deno'' && ''ubuntu-22.04-xl'' || ''ubuntu-22.04'' }}'
job: test
profile: debug
use_sysroot: true
wpt: '${{ github.ref == ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'') }}'
- os: '${{ github.repository == ''denoland/deno'' && ''ubuntu-20.04-xl'' || ''ubuntu-20.04'' }}'
- os: '${{ github.repository == ''denoland/deno'' && ''ubuntu-22.04-xl'' || ''ubuntu-22.04'' }}'
job: lint
profile: debug
fail-fast: '${{ github.event_name == ''pull_request'' || (github.ref != ''refs/heads/main'' && !startsWith(github.ref, ''refs/tags/'')) }}'
@ -84,12 +84,12 @@ jobs:
- name: Clone submodule ./test_util/std
run: git submodule update --init --recursive --depth=1 -- ./test_util/std
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'')'
- name: Clone submodule ./third_party
run: git submodule update --init --recursive --depth=1 -- ./third_party
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'')'
- name: Clone submodule ./test_util/wpt
run: git submodule update --init --recursive --depth=1 -- ./test_util/wpt
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.wpt))'
- name: Clone submodule ./third_party
run: git submodule update --init --recursive --depth=1 -- ./third_party
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'' && (matrix.job == ''lint'' || matrix.job == ''bench''))'
- name: 'Create source tarballs (release, linux)'
if: |-
!(github.event_name == 'pull_request' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != 'true' && (startsWith(matrix.os, 'ubuntu') &&
@ -179,8 +179,8 @@ jobs:
sudo apt-get remove --purge -y man-db
# Install clang-15, lld-15, and debootstrap.
echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main" |
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-focal-15.list
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main" |
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-jammy-15.list
curl https://apt.llvm.org/llvm-snapshot.gpg.key |
gpg --dearmor |
sudo dd of=/etc/apt/trusted.gpg.d/llvm-snapshot.gpg
@ -202,6 +202,12 @@ jobs:
sudo mount --rbind /home /sysroot/home
sudo mount -t proc /proc /sysroot/proc
cp third_party/prebuilt/linux64/libdl/libdl.so.2 .
cp third_party/prebuilt/linux64/libdl/libdl.a .
sudo ln -s libdl.so.2 /sysroot/lib/x86_64-linux-gnu/libdl.so
sudo ln -s libdl.a /sysroot/lib/x86_64-linux-gnu/libdl.a
# Configure the build environment. Both Rust and Clang will produce
# llvm bitcode only, so we can use lld's incremental LTO support.
cat >> $GITHUB_ENV << __0
@ -214,6 +220,7 @@ jobs:
-C linker=clang-15
-C link-arg=-fuse-ld=lld-15
-C link-arg=--sysroot=/sysroot
-C link-arg=-ldl
-C link-arg=-Wl,--allow-shlib-undefined
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
-C link-arg=-Wl,--thinlto-cache-policy,cache_size_bytes=700m
@ -224,6 +231,7 @@ jobs:
-C linker=clang-15
-C link-arg=-fuse-ld=lld-15
-C link-arg=--sysroot=/sysroot
-C link-arg=-ldl
-C link-arg=-Wl,--allow-shlib-undefined
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
-C link-arg=-Wl,--thinlto-cache-policy,cache_size_bytes=700m
@ -254,7 +262,7 @@ jobs:
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
key: '18-cargo-home-${{ matrix.os }}-${{ hashFiles(''Cargo.lock'') }}'
key: '20-cargo-home-${{ matrix.os }}-${{ hashFiles(''Cargo.lock'') }}'
if: '!(github.event_name == ''pull_request'' && matrix.skip_pr) && (steps.exit_early.outputs.EXIT_EARLY != ''true'')'
- name: Restore cache build output (PR)
uses: actions/cache/restore@v3
@ -548,7 +556,7 @@ jobs:
key: '18-cargo-target-${{ matrix.os }}-${{ matrix.profile }}-${{ github.sha }}'
publish-canary:
name: publish canary
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs:
- build
if: github.repository == 'denoland/deno' && github.ref == 'refs/heads/main'

@ -1 +1 @@
Subproject commit ff2ffb4fd917cabe4441fdb1d8f5e842ce58be9a
Subproject commit 1f35d27cf6a9dc1136569fa0674cec026a5f2b07