Skip to content

Commit

Permalink
feat: add linux riscv64 reh build
Browse files Browse the repository at this point in the history
  • Loading branch information
kxxt committed Apr 12, 2024
1 parent 50cd49e commit 33a49ff
Show file tree
Hide file tree
Showing 9 changed files with 417 additions and 188 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/insider-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ jobs:
npm_arch: arm
# - vscode_arch: ppc64le
# npm_arch: ppc64
- vscode_arch: riscv64
npm_arch: riscv64
env:
BUILD_SOURCEVERSION: ${{ needs.compile.outputs.BUILD_SOURCEVERSION }}
MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/stable-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ jobs:
npm_arch: arm
# - vscode_arch: ppc64le
# npm_arch: ppc64
- vscode_arch: riscv64
npm_arch: riscv64
env:
BUILD_SOURCEVERSION: ${{ needs.compile.outputs.BUILD_SOURCEVERSION }}
MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }}
Expand Down
2 changes: 2 additions & 0 deletions build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ if [[ "${UNAME_ARCH}" == "arm64" ]]; then
export VSCODE_ARCH="arm64"
elif [[ "${UNAME_ARCH}" == "ppc64le" ]]; then
export VSCODE_ARCH="ppc64le"
elif [[ "${UNAME_ARCH}" == "riscv64" ]]; then
export VSCODE_ARCH="riscv64"
else
export VSCODE_ARCH="x64"
fi
Expand Down
18 changes: 18 additions & 0 deletions check_tags.sh
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,24 @@ elif [[ "${ASSETS}" != "null" ]]; then
echo "Already have all the Linux PowerPC64LE builds"
fi

# linux-riscv64
elif [[ "${VSCODE_ARCH}" == "riscv64" ]]; then
SHOULD_BUILD_APPIMAGE="no"
SHOULD_BUILD_DEB="no"
SHOULD_BUILD_RPM="no"
SHOULD_BUILD_TAR="no"

if [[ -z $( contains "${APP_NAME_LC}-reh-linux-riscv64-${RELEASE_VERSION}.tar.gz" ) ]]; then
echo "Building on Linux RISC-V64 because we have no REH archive"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_REH="no"
fi

if [[ "${SHOULD_BUILD}" != "yes" ]]; then
echo "Already have all the Linux PowerPC64LE builds"
fi

# linux-x64
else
if [[ -z $( contains "amd64.deb" ) ]]; then
Expand Down
8 changes: 8 additions & 0 deletions package_linux_reh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ 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"
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
elif [[ "${VSCODE_ARCH}" == "riscv64" ]]; then
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME="vscodium/vscodium-linux-build-agent:focal-devtoolset-riscv64"
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
# Unofficial RISC-V nodejs builds doesn't provide v16.x
sed -i '/target/s/"16.*"/"18.18.1"/' remote/.yarnrc
fi

export VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME
Expand Down
2 changes: 1 addition & 1 deletion patches/linux/yarn-dependencies.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ index 72dd74f..0f70d8c 100644
@@ -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') {
+ if (process.env['npm_config_arch'] === 'arm64' || process.env['npm_config_arch'] === 'arm' || process.env['npm_config_arch'] === 'ppc64' || process.env['npm_config_arch'] === 'riscv64') {
run('sudo', ['docker', 'run', '--rm', '--privileged', 'multiarch/qemu-user-static', '--reset', '-p', 'yes'], opts);
}
- if (process.env['npm_config_arch'] === 'arm') {
Expand Down
Loading

0 comments on commit 33a49ff

Please sign in to comment.