From 6dcd8f78dfa4f356d9b3076eb820240fc58f02d4 Mon Sep 17 00:00:00 2001 From: Jonas Termansen Date: Fri, 9 Feb 2024 13:06:47 +0000 Subject: [PATCH] [infra] Document how to self service update javascript engines. Bug: b/324389547 Change-Id: I2da77aa390d780b151f5b6fbbc8ef8b24fc34bad Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351142 Reviewed-by: William Hesse Commit-Queue: Jonas Termansen --- DEPS | 7 +++-- third_party/d8/README.google | 4 +-- third_party/d8/update.sh | 41 --------------------------- third_party/firefox_jsshell/update.sh | 38 ------------------------- third_party/jsc/update.sh | 34 ---------------------- 5 files changed, 5 insertions(+), 119 deletions(-) delete mode 100755 third_party/d8/update.sh delete mode 100755 third_party/firefox_jsshell/update.sh delete mode 100755 third_party/jsc/update.sh diff --git a/DEPS b/DEPS index f529cd73699..6e683b89207 100644 --- a/DEPS +++ b/DEPS @@ -67,8 +67,9 @@ vars = { "download_android_deps": "host_os == mac or (host_os == linux and host_cpu == x64)", - # Checkout extra javascript engines for testing or benchmarking. - # d8, the V8 shell, is always checked out. + # Checkout extra javascript engines for testing or benchmarking. You can + # self-service update these by following the go/dart-engprod/browsers.md + # instructions. d8, the V8 shell, is always checked out. "checkout_javascript_engines": False, "d8_tag": "version:12.1.131", "jsshell_tag": "version:120.0", @@ -254,7 +255,7 @@ deps = { }, Var("dart_root") + "/third_party/jsc": { "packages": [{ - "package": "dart/third_party/jsc/linux-amd64", + "package": "dart/third_party/jsc/${{platform}}", "version": Var("jsc_tag"), }], "condition": "checkout_javascript_engines and host_os == 'linux' and host_cpu == 'x64'", diff --git a/third_party/d8/README.google b/third_party/d8/README.google index 303e812c21a..2bc3cc54c5d 100644 --- a/third_party/d8/README.google +++ b/third_party/d8/README.google @@ -7,8 +7,6 @@ Date: March 31 2019 License: BSD Description: -In a synced checkout, this directory contains the d8 binaries for Windows, Mac and Linux. -The binaries are downloaded as a CIPD package and unpacked in this directory. -To upload a new version of the package run: ./update.sh +This directory contains the d8 binaries for Windows, Mac and Linux. The binaries are used for testing dart code compiled to javascript. diff --git a/third_party/d8/update.sh b/third_party/d8/update.sh deleted file mode 100755 index f3b9f4314a3..00000000000 --- a/third_party/d8/update.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -# Uploads a new version of d8 CIPD package -set -e -set -x - -if [ -z "$1" ]; then - echo "Usage: update.sh version" - exit 1 -fi - -version=$1 -major=$(echo "$version" | cut -d'.' -f1) -minor=$(echo "$version" | cut -d'.' -f2) -patch=$(echo "$version" | cut -d'.' -f3) - -tmpdir=$(mktemp -d) -cleanup() { - rm -rf "$tmpdir" -} -trap cleanup EXIT HUP INT QUIT TERM PIPE -cd "$tmpdir" - -arch=("linux64" "linux-arm64" "mac64" "mac-arm64" "win64") -path=("linux/x64" "linux/arm64" "macos/x64" "macos/arm64" "windows/x64") - -for i in "${!arch[@]}" -do - filename="v8-${arch[$i]}-rel-$version.zip" - gsutil.py cp "gs://chromium-v8/official/canary/$filename" . - mkdir -p d8/${path[$i]} - unzip -q $filename -d d8/${path[$i]} - rm $filename -done - -cipd create \ - -name dart/d8 \ - -in d8 \ - -install-mode copy \ - -tag version:$version \ - -tag version:$major.$minor.$patch \ - -tag version:$major.$minor diff --git a/third_party/firefox_jsshell/update.sh b/third_party/firefox_jsshell/update.sh deleted file mode 100755 index 443a01f1d1c..00000000000 --- a/third_party/firefox_jsshell/update.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash -# Uploads a new version of the checked in JSShell CIPD packages -set -ex - -if [ -z "$1" ]; then - echo "Usage: update.sh version" - exit 1 -fi - -tmpdir=$(mktemp -d) -cleanup() { - rm -rf "$tmpdir" -} -trap cleanup EXIT HUP INT QUIT TERM PIPE -pushd "$tmpdir" - -ARCH=("linux-amd64" "mac-amd64" "windows-amd64") -URL=https://archive.mozilla.org/pub/firefox/releases/$1/jsshell -curl $URL/jsshell-linux-x86_64.zip --output jsshell-linux-amd64.zip -curl $URL/jsshell-mac.zip --output jsshell-mac-amd64.zip -curl $URL/jsshell-win64.zip --output jsshell-windows-amd64.zip - -for a in "${ARCH[@]}" -do - filename="jsshell-$a.zip" - unzip -qj $filename -d jsshell - cipd create \ - -name dart/third_party/jsshell/$a \ - -in jsshell \ - -install-mode copy \ - -tag version:$1 - rm $filename - rm -rf jsshell -done - -popd - -gclient setdep --var="jsshell_tag=version:$1" diff --git a/third_party/jsc/update.sh b/third_party/jsc/update.sh deleted file mode 100755 index 31c2a66f94a..00000000000 --- a/third_party/jsc/update.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash -# Uploads a new version of the checked in jsc CIPD packages -# jsc is the JavaScriptCore shell from WebKit. -# -# Only the latest builds for the last few days are available -# for download. They are indexed by build number. -# This script only downloads the latest build, and uploads -# it to CIPD with the build number as the version tag. -# It updates DEPS to download that version of jsc from CIPD. -set -ex - -tmpdir=$(mktemp -d) -cleanup() { - rm -rf "$tmpdir" -} -trap cleanup EXIT HUP INT QUIT TERM PIPE -pushd "$tmpdir" - -URL=https://webkitgtk.org/jsc-built-products/x86_64/release -LATEST=$(curl $URL/LAST-IS) -VERSION=${LATEST%@main.zip} -curl $URL/$LATEST --output main.zip -filename="main.zip" -unzip -q $filename -d jsc -cipd create \ - -name dart/third_party/jsc/linux-amd64 \ - -in jsc \ - -install-mode copy \ - -tag version:$VERSION -rm $filename -rm -rf jsc -popd - -gclient setdep --var="jsc_tag=version:$VERSION"