瀏覽代碼

ci(linux): use container dependencies only for remote [skip ci]

Baptiste Augrain 1 年之前
父節點
當前提交
f18abb0ab8
共有 2 個文件被更改,包括 9 次插入14 次删除
  1. 0 5
      patches/linux/yarn-dependencies.patch
  2. 9 9
      prepare_vscode.sh

+ 0 - 5
patches/linux/yarn-dependencies.patch

@@ -2,11 +2,6 @@ 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') {

+ 9 - 9
prepare_vscode.sh

@@ -107,15 +107,15 @@ if [[ "${OS_NAME}" == "linux" ]]; then
 
     export 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
-
-    # export VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME
+    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
 
     for i in {1..5}; do # try 5 times
       yarn --cwd build --frozen-lockfile --check-files && break