chore: use Node.js >=18.17.0

remove `msvs_version` npm config on win32
Ref: nodejs/node-gyp#2822

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
Akos Kitta 2023-08-24 15:42:19 +02:00 committed by Akos Kitta
parent 8a5dee9307
commit bb4b1450e3
8 changed files with 21 additions and 92 deletions

View File

@ -85,10 +85,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js 16.14
- name: Install Node.js 18.17
uses: actions/setup-node@v3
with:
node-version: '16.14'
node-version: '18.17'
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
@ -131,10 +131,6 @@ jobs:
export CSC_FOR_PULL_REQUEST=true
fi
if [ "${{ runner.OS }}" = "Windows" ]; then
npm config set msvs_version 2017 --global
fi
npx node-gyp install
yarn install --immutable

View File

@ -58,10 +58,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Node.js 16.14
- name: Install Node.js 18.17
uses: actions/setup-node@v3
with:
node-version: '16.14'
node-version: '18.17'
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

View File

@ -8,7 +8,7 @@ on:
env:
CHANGELOG_ARTIFACTS: changelog
# See: https://github.com/actions/setup-node/#readme
NODE_VERSION: 16.x
NODE_VERSION: '18.17'
jobs:
create-changelog:

View File

@ -16,10 +16,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js 16.14
- name: Install Node.js 18.17
uses: actions/setup-node@v3
with:
node-version: '16.14'
node-version: '18.17'
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

View File

@ -16,10 +16,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js 16.14
- name: Install Node.js 18.17
uses: actions/setup-node@v3
with:
node-version: '16.14'
node-version: '18.17'
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'

View File

@ -1,71 +0,0 @@
### Building from the sources on Linux ARM
Building the Pro IDE on Linux `armv7l` (aka `armhf`) and `aarch64` (aka `arm64`):
1. Install Node.js 16.x with [nvm](https://github.com/nvm-sh/nvm#install--update-script):
```
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
```
Restart your shell then:
```
nvm install 16
nvm use 16
```
Verify:
```
node -v
```
2. Install [Yarn](https://classic.yarnpkg.com/en/docs/install/#debian-stable):
Configure the Debian package repository; otherwise, you will pull a different `yarn`.
```
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
```
Install:
```
sudo apt update && sudo apt install --no-install-recommends yarn
```
Verify:
```
yarn -v
1.22.4
```
3. Other native [dependencies](https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#prerequisites):
- `make`,
- `gcc`,
- `pkg-config`,
- `build-essential`,
- `libx11-dev`, and
- `libxkbfile-dev`
4. [Build it](../development.md#build-from-source) from the source:
```
git clone https://github.com/arduino/arduino-ide.git \
&& cd arduino-ide \
&& yarn \
&& yarn rebuild:electron \
&& yarn --cwd ./electron-app start
```
5. Troubleshoot
If you see [`ENOSPC` errors](https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#linux) at runtime, increase the default `inotify` watches:
```
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
```

View File

@ -1,6 +1,8 @@
### Building and start the app from the sources on Ubuntu Linux
Tested and verified on Ubuntu 18.04.4. The source will be checked out to `~/dev/git/arduino-ide`.
Tested and verified on Ubuntu 22.04. The source will be checked out to `~/dev/git/arduino-ide`.
> ❗ This is an all-in-one script to create production-ready, minified code; you will need ~16GB of RAM to run it. This script will install libraries you might already have on your system and change the default Node.js version you do not want. If you look for documentation on development, please reference [this](../development.md#prerequisites) section instead.
```
#!/bin/bash -i
@ -11,16 +13,17 @@ sudo apt update \
gcc \
curl \
make \
python \
python3 \
pkg-config \
libx11-dev \
libxkbfile-dev \
build-essential \
libsecret-1-dev \
&& wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash \
&& source ~/.bashrc \
&& nvm install 16 \
&& nvm use 16 \
&& nvm alias default 16 \
&& nvm install 18.17 \
&& nvm use 18.17 \
&& nvm alias default 18.17 \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list \
&& sudo apt update && sudo apt install --no-install-recommends yarn \
@ -28,6 +31,7 @@ sudo apt update \
&& rm -rf ~/dev/git/arduino-ide \
&& git clone --depth 1 https://github.com/arduino/arduino-ide.git ~/dev/git/arduino-ide \
&& yarn --cwd ~/dev/git/arduino-ide \
&& yarn --cwd ~/dev/git/arduino-ide rebuild:electron \
&& yarn --cwd ~/dev/git/arduino-ide/electron-app start
&& yarn --cwd ~/dev/git/arduino-ide/electron-app rebuild \
&& yarn --cwd ~/dev/git/arduino-ide build \
&& yarn --cwd ~/dev/git/arduino-ide start
```

View File

@ -7,7 +7,7 @@
"license": "AGPL-3.0-or-later",
"private": true,
"engines": {
"node": ">=16.14.0 <17"
"node": ">=18.17.0 <21"
},
"devDependencies": {
"@theia/cli": "1.39.0",