ci(linux): use devtoolset images to build [skip ci]

This commit is contained in:
Baptiste Augrain 2024-02-20 11:17:07 +01:00
parent fb5f9a59e4
commit a3a8234ce8
3 changed files with 13 additions and 16 deletions

View file

@ -50,13 +50,13 @@ jobs:
include:
- vscode_arch: x64
npm_arch: x64
image: vscodium/vscodium-linux-build-agent:bionic-x64
image: vscodium/vscodium-linux-build-agent:centos7-devtoolset8-x64
- vscode_arch: arm64
npm_arch: arm64
image: vscodium/vscodium-linux-build-agent:bionic-arm64
image: vscodium/vscodium-linux-build-agent:centos7-devtoolset8-arm64
- vscode_arch: armhf
npm_arch: arm
image: vscodium/vscodium-linux-build-agent:bionic-armhf
image: vscodium/vscodium-linux-build-agent:bionic-devtoolset-arm32v7
# - vscode_arch: ppc64le
# npm_arch: ppc64
# image: vscodium/vscodium-linux-build-agent:bionic-ppc64le

View file

@ -2,7 +2,7 @@ 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
@@ -55,10 +55,7 @@ function yarnInstall(dir, opts) {
@@ -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') {
@ -13,6 +13,5 @@ index 72dd74f..0f70d8c 100644
- } 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'], 'pwd'], 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'], 'ls', '-la'], 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

@ -107,17 +107,15 @@ if [[ "${OS_NAME}" == "linux" ]]; then
export VSCODE_HOST_MOUNT
ls "${VSCODE_HOST_MOUNT}"
# if [[ "${VSCODE_ARCH}" == "x64" || "${VSCODE_ARCH}" == "arm64" ]]; then
# VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:centos7-devtoolset8-${VSCODE_ARCH}"
# elif [[ "${VSCODE_ARCH}" == "armhf" ]]; then
# VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:bionic-devtoolset-arm32v7"
# elif [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then
# VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:bionic-devtoolset-ppc64le"
# fi
if [[ "${VSCODE_ARCH}" == "x64" || "${VSCODE_ARCH}" == "arm64" ]]; then
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:centos7-devtoolset8-${VSCODE_ARCH}"
elif [[ "${VSCODE_ARCH}" == "armhf" ]]; then
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:bionic-devtoolset-arm32v7"
elif [[ "${VSCODE_ARCH}" == "ppc64le" ]]; then
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:bionic-devtoolset-ppc64le"
fi
export VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME
# export VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME
for i in {1..5}; do # try 5 times
yarn --cwd build --frozen-lockfile --check-files && break