mirror of
https://github.com/denoland/deno.git
synced 2024-12-21 23:04:45 -05:00
chore: upgrade to rust 1.82 and LLVM 19 (#26615)
Upgrade to rust 1.82 and LLVM 19 . Removes one webusb test because `requestAdapter` not working on new ubuntu 24 runners
This commit is contained in:
parent
04ae1a5517
commit
4774eab64d
9 changed files with 40 additions and 48 deletions
10
.github/workflows/ci.generate.ts
vendored
10
.github/workflows/ci.generate.ts
vendored
|
@ -7,8 +7,8 @@ import { stringify } from "jsr:@std/yaml@^0.221/stringify";
|
|||
// automatically via regex, so ensure that this line maintains this format.
|
||||
const cacheVersion = 23;
|
||||
|
||||
const ubuntuX86Runner = "ubuntu-22.04";
|
||||
const ubuntuX86XlRunner = "ubuntu-22.04-xl";
|
||||
const ubuntuX86Runner = "ubuntu-24.04";
|
||||
const ubuntuX86XlRunner = "ubuntu-24.04-xl";
|
||||
const ubuntuARMRunner = "ubicloud-standard-16-arm";
|
||||
const windowsX86Runner = "windows-2022";
|
||||
const windowsX86XlRunner = "windows-2022-xl";
|
||||
|
@ -59,7 +59,7 @@ const prCacheKeyPrefix =
|
|||
`${cacheVersion}-cargo-target-\${{ matrix.os }}-\${{ matrix.arch }}-\${{ matrix.profile }}-\${{ matrix.job }}-`;
|
||||
|
||||
// Note that you may need to add more version to the `apt-get remove` line below if you change this
|
||||
const llvmVersion = 18;
|
||||
const llvmVersion = 19;
|
||||
const installPkgsCommand =
|
||||
`sudo apt-get install --no-install-recommends clang-${llvmVersion} lld-${llvmVersion} clang-tools-${llvmVersion} clang-format-${llvmVersion} clang-tidy-${llvmVersion}`;
|
||||
const sysRootStep = {
|
||||
|
@ -71,7 +71,7 @@ export DEBIAN_FRONTEND=noninteractive
|
|||
sudo apt-get -qq remove --purge -y man-db > /dev/null 2> /dev/null
|
||||
# Remove older clang before we install
|
||||
sudo apt-get -qq remove \
|
||||
'clang-12*' 'clang-13*' 'clang-14*' 'clang-15*' 'clang-16*' 'llvm-12*' 'llvm-13*' 'llvm-14*' 'llvm-15*' 'llvm-16*' 'lld-12*' 'lld-13*' 'lld-14*' 'lld-15*' 'lld-16*' > /dev/null 2> /dev/null
|
||||
'clang-12*' 'clang-13*' 'clang-14*' 'clang-15*' 'clang-16*' 'clang-17*' 'clang-18*' 'llvm-12*' 'llvm-13*' 'llvm-14*' 'llvm-15*' 'llvm-16*' 'lld-12*' 'lld-13*' 'lld-14*' 'lld-15*' 'lld-16*' 'lld-17*' 'lld-18*' > /dev/null 2> /dev/null
|
||||
|
||||
# Install clang-XXX, lld-XXX, and debootstrap.
|
||||
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${llvmVersion} main" |
|
||||
|
@ -86,7 +86,7 @@ ${installPkgsCommand} || echo 'Failed. Trying again.' && sudo apt-get clean && s
|
|||
(yes '' | sudo update-alternatives --force --all) > /dev/null 2> /dev/null || true
|
||||
|
||||
echo "Decompressing sysroot..."
|
||||
wget -q https://github.com/denoland/deno_sysroot_build/releases/download/sysroot-20240528/sysroot-\`uname -m\`.tar.xz -O /tmp/sysroot.tar.xz
|
||||
wget -q https://github.com/denoland/deno_sysroot_build/releases/download/sysroot-20241030/sysroot-\`uname -m\`.tar.xz -O /tmp/sysroot.tar.xz
|
||||
cd /
|
||||
xzcat /tmp/sysroot.tar.xz | sudo tar -x
|
||||
sudo mount --rbind /dev /sysroot/dev
|
||||
|
|
36
.github/workflows/ci.yml
vendored
36
.github/workflows/ci.yml
vendored
|
@ -62,7 +62,7 @@ jobs:
|
|||
profile: debug
|
||||
- os: macos
|
||||
arch: x86_64
|
||||
runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'')) && ''ubuntu-22.04'' || ''macos-13'' }}'
|
||||
runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'')) && ''ubuntu-24.04'' || ''macos-13'' }}'
|
||||
job: test
|
||||
profile: release
|
||||
skip: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'') }}'
|
||||
|
@ -73,7 +73,7 @@ jobs:
|
|||
profile: debug
|
||||
- os: macos
|
||||
arch: aarch64
|
||||
runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'')) && ''ubuntu-22.04'' || ''macos-14'' }}'
|
||||
runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'')) && ''ubuntu-24.04'' || ''macos-14'' }}'
|
||||
job: test
|
||||
profile: release
|
||||
skip: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'') }}'
|
||||
|
@ -84,33 +84,33 @@ jobs:
|
|||
profile: debug
|
||||
- os: windows
|
||||
arch: x86_64
|
||||
runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'')) && ''ubuntu-22.04'' || github.repository == ''denoland/deno'' && ''windows-2022-xl'' || ''windows-2022'' }}'
|
||||
runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'')) && ''ubuntu-24.04'' || github.repository == ''denoland/deno'' && ''windows-2022-xl'' || ''windows-2022'' }}'
|
||||
job: test
|
||||
profile: release
|
||||
skip: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'') }}'
|
||||
- os: linux
|
||||
arch: x86_64
|
||||
runner: '${{ github.repository == ''denoland/deno'' && ''ubuntu-22.04-xl'' || ''ubuntu-22.04'' }}'
|
||||
runner: '${{ github.repository == ''denoland/deno'' && ''ubuntu-24.04-xl'' || ''ubuntu-24.04'' }}'
|
||||
job: test
|
||||
profile: release
|
||||
use_sysroot: true
|
||||
wpt: '${{ !startsWith(github.ref, ''refs/tags/'') }}'
|
||||
- os: linux
|
||||
arch: x86_64
|
||||
runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'' && !contains(github.event.pull_request.labels.*.name, ''ci-bench''))) && ''ubuntu-22.04'' || github.repository == ''denoland/deno'' && ''ubuntu-22.04-xl'' || ''ubuntu-22.04'' }}'
|
||||
runner: '${{ (!contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'' && !contains(github.event.pull_request.labels.*.name, ''ci-bench''))) && ''ubuntu-24.04'' || github.repository == ''denoland/deno'' && ''ubuntu-24.04-xl'' || ''ubuntu-24.04'' }}'
|
||||
job: bench
|
||||
profile: release
|
||||
use_sysroot: true
|
||||
skip: '${{ !contains(github.event.pull_request.labels.*.name, ''ci-full'') && (github.event_name == ''pull_request'' && !contains(github.event.pull_request.labels.*.name, ''ci-bench'')) }}'
|
||||
- os: linux
|
||||
arch: x86_64
|
||||
runner: ubuntu-22.04
|
||||
runner: ubuntu-24.04
|
||||
job: test
|
||||
profile: debug
|
||||
use_sysroot: true
|
||||
- os: linux
|
||||
arch: x86_64
|
||||
runner: ubuntu-22.04
|
||||
runner: ubuntu-24.04
|
||||
job: lint
|
||||
profile: debug
|
||||
- os: linux
|
||||
|
@ -252,22 +252,22 @@ jobs:
|
|||
# to complete.
|
||||
sudo apt-get -qq remove --purge -y man-db > /dev/null 2> /dev/null
|
||||
# Remove older clang before we install
|
||||
sudo apt-get -qq remove 'clang-12*' 'clang-13*' 'clang-14*' 'clang-15*' 'clang-16*' 'llvm-12*' 'llvm-13*' 'llvm-14*' 'llvm-15*' 'llvm-16*' 'lld-12*' 'lld-13*' 'lld-14*' 'lld-15*' 'lld-16*' > /dev/null 2> /dev/null
|
||||
sudo apt-get -qq remove 'clang-12*' 'clang-13*' 'clang-14*' 'clang-15*' 'clang-16*' 'clang-17*' 'clang-18*' 'llvm-12*' 'llvm-13*' 'llvm-14*' 'llvm-15*' 'llvm-16*' 'lld-12*' 'lld-13*' 'lld-14*' 'lld-15*' 'lld-16*' 'lld-17*' 'lld-18*' > /dev/null 2> /dev/null
|
||||
|
||||
# Install clang-XXX, lld-XXX, and debootstrap.
|
||||
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main" |
|
||||
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-jammy-18.list
|
||||
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main" |
|
||||
sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-jammy-19.list
|
||||
curl https://apt.llvm.org/llvm-snapshot.gpg.key |
|
||||
gpg --dearmor |
|
||||
sudo dd of=/etc/apt/trusted.gpg.d/llvm-snapshot.gpg
|
||||
sudo apt-get update
|
||||
# this was unreliable sometimes, so try again if it fails
|
||||
sudo apt-get install --no-install-recommends clang-18 lld-18 clang-tools-18 clang-format-18 clang-tidy-18 || echo 'Failed. Trying again.' && sudo apt-get clean && sudo apt-get update && sudo apt-get install --no-install-recommends clang-18 lld-18 clang-tools-18 clang-format-18 clang-tidy-18
|
||||
sudo apt-get install --no-install-recommends clang-19 lld-19 clang-tools-19 clang-format-19 clang-tidy-19 || echo 'Failed. Trying again.' && sudo apt-get clean && sudo apt-get update && sudo apt-get install --no-install-recommends clang-19 lld-19 clang-tools-19 clang-format-19 clang-tidy-19
|
||||
# Fix alternatives
|
||||
(yes '' | sudo update-alternatives --force --all) > /dev/null 2> /dev/null || true
|
||||
|
||||
echo "Decompressing sysroot..."
|
||||
wget -q https://github.com/denoland/deno_sysroot_build/releases/download/sysroot-20240528/sysroot-`uname -m`.tar.xz -O /tmp/sysroot.tar.xz
|
||||
wget -q https://github.com/denoland/deno_sysroot_build/releases/download/sysroot-20241030/sysroot-`uname -m`.tar.xz -O /tmp/sysroot.tar.xz
|
||||
cd /
|
||||
xzcat /tmp/sysroot.tar.xz | sudo tar -x
|
||||
sudo mount --rbind /dev /sysroot/dev
|
||||
|
@ -299,8 +299,8 @@ jobs:
|
|||
CARGO_PROFILE_RELEASE_LTO=false
|
||||
RUSTFLAGS<<__1
|
||||
-C linker-plugin-lto=true
|
||||
-C linker=clang-18
|
||||
-C link-arg=-fuse-ld=lld-18
|
||||
-C linker=clang-19
|
||||
-C link-arg=-fuse-ld=lld-19
|
||||
-C link-arg=-ldl
|
||||
-C link-arg=-Wl,--allow-shlib-undefined
|
||||
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
|
||||
|
@ -310,8 +310,8 @@ jobs:
|
|||
__1
|
||||
RUSTDOCFLAGS<<__1
|
||||
-C linker-plugin-lto=true
|
||||
-C linker=clang-18
|
||||
-C link-arg=-fuse-ld=lld-18
|
||||
-C linker=clang-19
|
||||
-C link-arg=-fuse-ld=lld-19
|
||||
-C link-arg=-ldl
|
||||
-C link-arg=-Wl,--allow-shlib-undefined
|
||||
-C link-arg=-Wl,--thinlto-cache-dir=$(pwd)/target/release/lto-cache
|
||||
|
@ -319,7 +319,7 @@ jobs:
|
|||
--cfg tokio_unstable
|
||||
$RUSTFLAGS
|
||||
__1
|
||||
CC=/usr/bin/clang-18
|
||||
CC=/usr/bin/clang-19
|
||||
CFLAGS=-flto=thin $CFLAGS
|
||||
" > $GITHUB_ENV
|
||||
- name: Remove macOS cURL --ipv4 flag
|
||||
|
@ -688,7 +688,7 @@ jobs:
|
|||
key: '23-cargo-target-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.profile }}-${{ matrix.job }}-${{ github.sha }}'
|
||||
publish-canary:
|
||||
name: publish canary
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
needs:
|
||||
- build
|
||||
if: github.repository == 'denoland/deno' && github.ref == 'refs/heads/main'
|
||||
|
|
|
@ -530,7 +530,7 @@ impl<'a> GraphDisplayContext<'a> {
|
|||
|
||||
fn build_module_info(&mut self, module: &Module, type_dep: bool) -> TreeNode {
|
||||
enum PackageOrSpecifier {
|
||||
Package(NpmResolutionPackage),
|
||||
Package(Box<NpmResolutionPackage>),
|
||||
Specifier(ModuleSpecifier),
|
||||
}
|
||||
|
||||
|
@ -538,7 +538,7 @@ impl<'a> GraphDisplayContext<'a> {
|
|||
|
||||
let package_or_specifier = match module.npm() {
|
||||
Some(npm) => match self.npm_info.resolve_package(npm.nv_reference.nv()) {
|
||||
Some(package) => Package(package.clone()),
|
||||
Some(package) => Package(Box::new(package.clone())),
|
||||
None => Specifier(module.specifier().clone()), // should never happen
|
||||
},
|
||||
None => Specifier(module.specifier().clone()),
|
||||
|
|
|
@ -79,18 +79,15 @@ impl KeyObjectHandle {
|
|||
AsymmetricPrivateKey::RsaPss(key) => {
|
||||
let mut hash_algorithm = None;
|
||||
let mut salt_length = None;
|
||||
match &key.details {
|
||||
Some(details) => {
|
||||
if details.hash_algorithm != details.mf1_hash_algorithm {
|
||||
return Err(type_error(
|
||||
if let Some(details) = &key.details {
|
||||
if details.hash_algorithm != details.mf1_hash_algorithm {
|
||||
return Err(type_error(
|
||||
"rsa-pss with different mf1 hash algorithm and hash algorithm is not supported",
|
||||
));
|
||||
}
|
||||
hash_algorithm = Some(details.hash_algorithm);
|
||||
salt_length = Some(details.salt_length as usize);
|
||||
}
|
||||
None => {}
|
||||
};
|
||||
hash_algorithm = Some(details.hash_algorithm);
|
||||
salt_length = Some(details.salt_length as usize);
|
||||
}
|
||||
if let Some(s) = pss_salt_length {
|
||||
salt_length = Some(s as usize);
|
||||
}
|
||||
|
@ -215,18 +212,15 @@ impl KeyObjectHandle {
|
|||
AsymmetricPublicKey::RsaPss(key) => {
|
||||
let mut hash_algorithm = None;
|
||||
let mut salt_length = None;
|
||||
match &key.details {
|
||||
Some(details) => {
|
||||
if details.hash_algorithm != details.mf1_hash_algorithm {
|
||||
return Err(type_error(
|
||||
if let Some(details) = &key.details {
|
||||
if details.hash_algorithm != details.mf1_hash_algorithm {
|
||||
return Err(type_error(
|
||||
"rsa-pss with different mf1 hash algorithm and hash algorithm is not supported",
|
||||
));
|
||||
}
|
||||
hash_algorithm = Some(details.hash_algorithm);
|
||||
salt_length = Some(details.salt_length as usize);
|
||||
}
|
||||
None => {}
|
||||
};
|
||||
hash_algorithm = Some(details.hash_algorithm);
|
||||
salt_length = Some(details.salt_length as usize);
|
||||
}
|
||||
if let Some(s) = pss_salt_length {
|
||||
salt_length = Some(s as usize);
|
||||
}
|
||||
|
|
|
@ -269,7 +269,7 @@ fn get_stdin_metadata() -> std::io::Result<std::fs::Metadata> {
|
|||
unsafe {
|
||||
let stdin = std::fs::File::from_raw_fd(0);
|
||||
let metadata = stdin.metadata().unwrap();
|
||||
stdin.into_raw_fd();
|
||||
let _ = stdin.into_raw_fd();
|
||||
Ok(metadata)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
[toolchain]
|
||||
channel = "1.81.0"
|
||||
channel = "1.82.0"
|
||||
components = ["rustfmt", "clippy"]
|
||||
|
|
|
@ -95,7 +95,7 @@ extern "C" fn test_async_work(
|
|||
));
|
||||
let mut baton = unsafe { Box::from_raw(baton_ptr as *mut Baton) };
|
||||
baton.task = async_work;
|
||||
Box::into_raw(baton);
|
||||
let _ = Box::into_raw(baton);
|
||||
assert_napi_ok!(napi_queue_async_work(env, async_work));
|
||||
|
||||
ptr::null_mut()
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
console.log(typeof await navigator.gpu.requestAdapter() === "object"); // Throws without `--unstable-gpu`
|
||||
console.log(typeof Deno.dlopen === "function"); // Undefined without `--unstable-ffi`
|
||||
console.log(
|
||||
// Undefined without `--unstable-fs`
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
true
|
||||
true
|
||||
true
|
||||
|
|
Loading…
Reference in a new issue