ci(linux): install dependencies from devtool images [skip ci]
This commit is contained in:
parent
b0e8397279
commit
0b4117ed49
4 changed files with 35 additions and 22 deletions
11
.github/workflows/insider-linux.yml
vendored
11
.github/workflows/insider-linux.yml
vendored
|
@ -42,8 +42,8 @@ jobs:
|
||||||
npm_arch: arm64
|
npm_arch: arm64
|
||||||
- vscode_arch: armhf
|
- vscode_arch: armhf
|
||||||
npm_arch: arm
|
npm_arch: arm
|
||||||
# - vscode_arch: ppc64le
|
- vscode_arch: ppc64le
|
||||||
# npm_arch: ppc64
|
npm_arch: ppc64
|
||||||
env:
|
env:
|
||||||
DISABLE_UPDATE: 'yes'
|
DISABLE_UPDATE: 'yes'
|
||||||
VSCODE_ARCH: ${{ matrix.vscode_arch }}
|
VSCODE_ARCH: ${{ matrix.vscode_arch }}
|
||||||
|
@ -118,6 +118,13 @@ jobs:
|
||||||
run: ./update_version.sh
|
run: ./update_version.sh
|
||||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
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:
|
aur:
|
||||||
needs:
|
needs:
|
||||||
- build
|
- build
|
||||||
|
|
|
@ -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);
|
|
22
patches/linux/yarn-dependencies.patch
Normal file
22
patches/linux/yarn-dependencies.patch
Normal 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);
|
|
@ -95,11 +95,11 @@ if [[ "${OS_NAME}" == "linux" ]]; then
|
||||||
|
|
||||||
if [[ "${VSCODE_ARCH}" == "x64" || "${VSCODE_ARCH}" == "arm64" ]]; then
|
if [[ "${VSCODE_ARCH}" == "x64" || "${VSCODE_ARCH}" == "arm64" ]]; then
|
||||||
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:centos7-devtoolset8-${VSCODE_ARCH}"
|
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:centos7-devtoolset8-${VSCODE_ARCH}"
|
||||||
|
else
|
||||||
|
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:bionic-devtoolset-${VSCODE_ARCH}"
|
||||||
|
fi
|
||||||
|
|
||||||
export VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME
|
export VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME
|
||||||
elif [[ "${VSCODE_ARCH}" == "armhf" ]]; then
|
|
||||||
export VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:bionic-armhf"
|
|
||||||
fi
|
|
||||||
|
|
||||||
./build/azure-pipelines/linux/install.sh
|
./build/azure-pipelines/linux/install.sh
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue