From 2380f9aa117ab661d033b9aa294fe44670104a06 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Wed, 22 May 2024 09:49:51 -0700 Subject: [PATCH] Upgrade node from v16.20.0 to v18.20.3 Node v18 is that current LTS release of node and v18.20.3 is the latest release of v18. This change means that emsdk is no longer installable on Ubuntu/Bionic 18.04, and we now require Ubuntu/Focal 20.04. See: #1183 Fixes: #1173 --- .circleci/config.yml | 40 +++++++++++++++------------ emsdk_manifest.json | 62 +++++++++++++++++++++++++++++++++++++----- scripts/update_node.py | 4 +-- 3 files changed, 79 insertions(+), 27 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cea7e0e37b..30c4b871f8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,9 +4,9 @@ orbs: win: circleci/windows@5.0 executors: - bionic: + focal: docker: - - image: buildpack-deps:bionic + - image: buildpack-deps:focal mac: environment: EMSDK_NOTTY: "1" @@ -50,7 +50,7 @@ commands: jobs: flake8: - executor: bionic + executor: focal steps: - checkout - run: @@ -58,21 +58,13 @@ jobs: command: | apt-get update -q apt-get install -q -y python-pip python3-pip - - run: python2 -m pip install --upgrade pip - run: python3 -m pip install --upgrade pip - - run: python2 -m pip install flake8==3.9.2 - run: python3 -m pip install flake8==3.9.2 - - run: python2 -m flake8 --show-source --statistics --extend-exclude=./scripts - run: python3 -m flake8 --show-source --statistics test-linux: - executor: bionic + executor: focal environment: EMSDK_NOTTY: "1" - # This is needed because the old gcc-7 that is installed on debian/bionic - # generates warnings about unused variables when doing C++17 - # destructuring: - # https://github.com/WebAssembly/binaryen/issues/4353 - CXXFLAGS: "-Wno-unused-variable" # I don't know why circleci VMs pretent to have 36 cores but its a lie. EMSDK_NUM_CORES: "4" steps: @@ -174,12 +166,18 @@ jobs: test/test_path_preservation.ps1 build-docker-image-x64: - executor: bionic + executor: focal steps: - checkout - run: name: install docker - command: apt-get update -q && apt-get install -q -y docker.io + apt-get update -q + apt-get install -q -y ca-certificates curl gnupg lsb-release + mkdir -p /etc/apt/keyrings + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null + apt-get update -q + apt-get install -q -y docker-ce docker-ce-cli containerd.io docker-compose-plugin - setup_remote_docker # Build the `latest` version of EMSDK as docker image - run: @@ -190,12 +188,18 @@ jobs: command: make -C ./docker version=latest test publish-docker-image-x64: - executor: bionic + executor: focal steps: - checkout - run: name: install docker - command: apt-get update -q && apt-get install -q -y docker.io + apt-get update -q + apt-get install -q -y ca-certificates curl gnupg lsb-release + mkdir -p /etc/apt/keyrings + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null + apt-get update -q + apt-get install -q -y docker-ce docker-ce-cli containerd.io docker-compose-plugin - setup_remote_docker - run: name: build @@ -226,7 +230,7 @@ jobs: make -C ./docker version=${CIRCLE_TAG} alias=${CIRCLE_TAG}-arm64 only_alias=true push test-bazel-linux: - executor: bionic + executor: focal steps: - checkout - run: apt-get install -q -y curl gnupg @@ -237,7 +241,7 @@ jobs: name: install pip command: | apt-get update -q - apt-get install -q -y python3-pip + apt-get install -q -y python-pip - run: pip3 install absl-py - run: name: install bazel diff --git a/emsdk_manifest.json b/emsdk_manifest.json index 89f0582b09..6af26c2c7f 100644 --- a/emsdk_manifest.json +++ b/emsdk_manifest.json @@ -346,6 +346,54 @@ "activated_env": "EMSDK_NODE=%installation_dir%/bin/node%.exe%" }, + { + "id": "node", + "version": "18.20.3", + "bitness": 32, + "arch": "x86", + "windows_url": "node-v18.20.3-win-x86.zip", + "activated_path": "%installation_dir%/bin", + "activated_path_skip": "node", + "activated_cfg": "NODE_JS='%installation_dir%/bin/node%.exe%'", + "activated_env": "EMSDK_NODE=%installation_dir%/bin/node%.exe%" + }, + { + "id": "node", + "version": "18.20.3", + "arch": "arm", + "bitness": 32, + "linux_url": "node-v18.20.3-linux-armv7l.tar.xz", + "activated_path": "%installation_dir%/bin", + "activated_path_skip": "node", + "activated_cfg": "NODE_JS='%installation_dir%/bin/node%.exe%'", + "activated_env": "EMSDK_NODE=%installation_dir%/bin/node%.exe%" + }, + { + "id": "node", + "version": "18.20.3", + "bitness": 64, + "arch": "x86_64", + "macos_url": "node-v18.20.3-darwin-x64.tar.gz", + "windows_url": "node-v18.20.3-win-x64.zip", + "linux_url": "node-v18.20.3-linux-x64.tar.xz", + "activated_path": "%installation_dir%/bin", + "activated_path_skip": "node", + "activated_cfg": "NODE_JS='%installation_dir%/bin/node%.exe%'", + "activated_env": "EMSDK_NODE=%installation_dir%/bin/node%.exe%" + }, + { + "id": "node", + "version": "18.20.3", + "arch": "arm64", + "bitness": 64, + "macos_url": "node-v18.20.3-darwin-arm64.tar.gz", + "linux_url": "node-v18.20.3-linux-arm64.tar.xz", + "activated_path": "%installation_dir%/bin", + "activated_path_skip": "node", + "activated_cfg": "NODE_JS='%installation_dir%/bin/node%.exe%'", + "activated_env": "EMSDK_NODE=%installation_dir%/bin/node%.exe%" + }, + { "id": "python", @@ -644,19 +692,19 @@ { "version": "main", "bitness": 64, - "uses": ["python-3.9.2-nuget-64bit", "llvm-git-main-64bit", "node-16.20.0-64bit", "emscripten-main-64bit", "binaryen-main-64bit"], + "uses": ["python-3.9.2-nuget-64bit", "llvm-git-main-64bit", "node-18.20.3-64bit", "emscripten-main-64bit", "binaryen-main-64bit"], "os": "win" }, { "version": "main", "bitness": 64, - "uses": ["python-3.9.2-64bit", "llvm-git-main-64bit", "node-16.20.0-64bit", "emscripten-main-64bit", "binaryen-main-64bit"], + "uses": ["python-3.9.2-64bit", "llvm-git-main-64bit", "node-18.20.3-64bit", "emscripten-main-64bit", "binaryen-main-64bit"], "os": "macos" }, { "version": "main", "bitness": 64, - "uses": ["llvm-git-main-64bit", "node-16.20.0-64bit", "emscripten-main-64bit", "binaryen-main-64bit"], + "uses": ["llvm-git-main-64bit", "node-18.20.3-64bit", "emscripten-main-64bit", "binaryen-main-64bit"], "os": "linux" }, { @@ -668,14 +716,14 @@ { "version": "releases-%releases-tag%", "bitness": 64, - "uses": ["node-16.20.0-64bit", "releases-%releases-tag%-64bit"], + "uses": ["node-18.20.3-64bit", "releases-%releases-tag%-64bit"], "os": "linux", "custom_install_script": "emscripten_npm_install" }, { "version": "releases-%releases-tag%", "bitness": 64, - "uses": ["node-16.20.0-64bit", "python-3.9.2-64bit", "releases-%releases-tag%-64bit"], + "uses": ["node-18.20.3-64bit", "python-3.9.2-64bit", "releases-%releases-tag%-64bit"], "os": "macos", "arch": "x86_64", "custom_install_script": "emscripten_npm_install" @@ -683,7 +731,7 @@ { "version": "releases-%releases-tag%", "bitness": 64, - "uses": ["node-16.20.0-64bit", "python-3.9.2-64bit", "releases-%releases-tag%-64bit"], + "uses": ["node-18.20.3-64bit", "python-3.9.2-64bit", "releases-%releases-tag%-64bit"], "os": "macos", "arch": "arm64", "custom_install_script": "emscripten_npm_install" @@ -691,7 +739,7 @@ { "version": "releases-%releases-tag%", "bitness": 64, - "uses": ["node-16.20.0-64bit", "python-3.9.2-nuget-64bit", "java-8.152-64bit", "releases-%releases-tag%-64bit"], + "uses": ["node-18.20.3-64bit", "python-3.9.2-nuget-64bit", "java-8.152-64bit", "releases-%releases-tag%-64bit"], "os": "win", "custom_install_script": "emscripten_npm_install" } diff --git a/scripts/update_node.py b/scripts/update_node.py index 2c3a786d33..b16d3e5b1f 100755 --- a/scripts/update_node.py +++ b/scripts/update_node.py @@ -16,8 +16,8 @@ import os import shutil -version = '16.20.0' -base = 'https://nodejs.org/dist/latest-v16.x/' +version = '18.20.3' +base = 'https://nodejs.org/dist/latest-v18.x/' upload_base = 'gs://webassembly/emscripten-releases-builds/deps/' suffixes = [