ci(linux): install dependencies from devtool images [skip ci]

This commit is contained in:
Baptiste Augrain 2024-02-19 14:45:13 +01:00
parent b0e8397279
commit 0b4117ed49
4 changed files with 35 additions and 22 deletions

View file

@ -42,8 +42,8 @@ jobs:
npm_arch: arm64
- vscode_arch: armhf
npm_arch: arm
# - vscode_arch: ppc64le
# npm_arch: ppc64
- vscode_arch: ppc64le
npm_arch: ppc64
env:
DISABLE_UPDATE: 'yes'
VSCODE_ARCH: ${{ matrix.vscode_arch }}
@ -118,6 +118,13 @@ jobs:
run: ./update_version.sh
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
- name: Upload assets
uses: actions/upload-artifact@v4
with:
name: assets
path: assets/
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true'
aur:
needs:
- build

View file

@ -1,16 +0,0 @@
diff --git a/build/npm/postinstall.js b/build/npm/postinstall.js
index 72dd74f..e409a33 100644
--- a/build/npm/postinstall.js
+++ b/build/npm/postinstall.js
@@ -58,7 +58,7 @@ function yarnInstall(dir, opts) {
}
- if (process.env['npm_config_arch'] === 'arm') {
- run('sudo', ['docker', 'run', '-e', 'GITHUB_TOKEN', '-e', 'npm_config_arch', '-v', `${process.env['VSCODE_HOST_MOUNT']}:/home/builduser`, '-v', `${process.env['VSCODE_HOST_MOUNT']}/.build/.netrc:/home/builduser/.netrc`, process.env['VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME'], 'yarn', '--cwd', dir, ...args], opts);
- } else {
+ // if (process.env['npm_config_arch'] === 'arm') {
+ // run('sudo', ['docker', 'run', '-e', 'GITHUB_TOKEN', '-e', 'npm_config_arch', '-v', `${process.env['VSCODE_HOST_MOUNT']}:/home/builduser`, '-v', `${process.env['VSCODE_HOST_MOUNT']}/.build/.netrc:/home/builduser/.netrc`, process.env['VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME'], 'yarn', '--cwd', dir, ...args], opts);
+ // } else {
run('sudo', ['docker', 'run', '-e', 'GITHUB_TOKEN', '-e', 'npm_config_arch', '-v', `${process.env['VSCODE_HOST_MOUNT']}:/root/vscode`, '-v', `${process.env['VSCODE_HOST_MOUNT']}/.build/.netrc:/root/.netrc`, process.env['VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME'], 'yarn', '--cwd', dir, ...args], opts);
- }
+ // }
run('sudo', ['chown', '-R', `${userinfo.uid}:${userinfo.gid}`, `${dir}/node_modules`], opts);

View file

@ -0,0 +1,22 @@
diff --git a/build/npm/postinstall.js b/build/npm/postinstall.js
index 72dd74f..0f70d8c 100644
--- a/build/npm/postinstall.js
+++ b/build/npm/postinstall.js
@@ -50,3 +50,3 @@ function yarnInstall(dir, opts) {
- if (process.env['VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME'] && /^(.build\/distro\/npm\/)?remote$/.test(dir)) {
+ if (process.env['VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME']) {
const userinfo = os.userInfo();
@@ -55,10 +55,6 @@ function yarnInstall(dir, opts) {
opts.cwd = root;
- if (process.env['npm_config_arch'] === 'arm64' || process.env['npm_config_arch'] === 'arm') {
+ if (process.env['npm_config_arch'] === 'arm64' || process.env['npm_config_arch'] === 'arm' || process.env['npm_config_arch'] === 'ppc64') {
run('sudo', ['docker', 'run', '--rm', '--privileged', 'multiarch/qemu-user-static', '--reset', '-p', 'yes'], opts);
}
- if (process.env['npm_config_arch'] === 'arm') {
- run('sudo', ['docker', 'run', '-e', 'GITHUB_TOKEN', '-e', 'npm_config_arch', '-v', `${process.env['VSCODE_HOST_MOUNT']}:/home/builduser`, '-v', `${process.env['VSCODE_HOST_MOUNT']}/.build/.netrc:/home/builduser/.netrc`, process.env['VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME'], 'yarn', '--cwd', dir, ...args], opts);
- } else {
- run('sudo', ['docker', 'run', '-e', 'GITHUB_TOKEN', '-e', 'npm_config_arch', '-v', `${process.env['VSCODE_HOST_MOUNT']}:/root/vscode`, '-v', `${process.env['VSCODE_HOST_MOUNT']}/.build/.netrc:/root/.netrc`, process.env['VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME'], 'yarn', '--cwd', dir, ...args], opts);
- }
+ run('sudo', ['docker', 'run', '-e', 'GITHUB_TOKEN', '-e', 'npm_config_arch', '-v', `${process.env['VSCODE_HOST_MOUNT']}:/root/vscode`, '-v', `${process.env['VSCODE_HOST_MOUNT']}/.build/.netrc:/root/.netrc`, process.env['VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME'], 'yarn', '--cwd', dir, ...args], opts);
run('sudo', ['chown', '-R', `${userinfo.uid}:${userinfo.gid}`, `${dir}/node_modules`], opts);

View file

@ -95,12 +95,12 @@ if [[ "${OS_NAME}" == "linux" ]]; then
if [[ "${VSCODE_ARCH}" == "x64" || "${VSCODE_ARCH}" == "arm64" ]]; then
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:centos7-devtoolset8-${VSCODE_ARCH}"
export VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME
elif [[ "${VSCODE_ARCH}" == "armhf" ]]; then
export VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:bionic-armhf"
else
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:bionic-devtoolset-${VSCODE_ARCH}"
fi
export VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME
./build/azure-pipelines/linux/install.sh
EXPECTED_GLIBC_VERSION="2.17" EXPECTED_GLIBCXX_VERSION="3.4.19" ./build/azure-pipelines/linux/verify-glibc-requirements.sh