Skip to content

Commit

Permalink
feat: loong64 support for client (#2121)
Browse files Browse the repository at this point in the history
  • Loading branch information
darkyzhou authored Nov 22, 2024
1 parent 52601b9 commit 8bcb412
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/insider-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ jobs:
vscode_arch: riscv64
npm_arch: riscv64
image: vscodium/vscodium-linux-build-agent:focal-riscv64
- slug: LOONG64
vscode_arch: loong64
npm_arch: loong64
image: vscodium/vscodium-linux-build-agent:trixie-loong64
container:
image: ${{ matrix.image }}
env:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/stable-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ jobs:
vscode_arch: riscv64
npm_arch: riscv64
image: vscodium/vscodium-linux-build-agent:focal-riscv64
- slug: LOONG64
vscode_arch: loong64
npm_arch: loong64
image: vscodium/vscodium-linux-build-agent:trixie-loong64
container:
image: ${{ matrix.image }}
env:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ The minimal version is limited by the core component Electron, you may want to c
- [x] GNU/Linux x64 (`deb`, `rpm`, `AppImage`, `snap`, `tar.gz`)
- [x] GNU/Linux arm64 (`deb`, `rpm`, `snap`, `tar.gz`)
- [x] GNU/Linux armhf (`deb`, `rpm`, `tar.gz`)
- [x] GNU/Linux loong64 (`tar.gz`)
- [x] Windows 10 / Server 2012 R2 or newer x64
- [x] Windows 10 / Server 2012 R2 or newer arm64

Expand Down
9 changes: 7 additions & 2 deletions check_tags.sh
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,13 @@ elif [[ "${ASSETS}" != "null" ]]; then
export SHOULD_BUILD_DEB="no"
export SHOULD_BUILD_RPM="no"
export SHOULD_BUILD_APPIMAGE="no"
export SHOULD_BUILD_TAR="no"

if [[ -z $( contains "${APP_NAME}-linux-loong64-${RELEASE_VERSION}.tar.gz" ) ]]; then
echo "Building on Linux Loong64 because we have no TAR"
export SHOULD_BUILD="yes"
else
export SHOULD_BUILD_TAR="no"
fi

if [[ -z $( contains "${APP_NAME_LC}-reh-linux-loong64-${RELEASE_VERSION}.tar.gz" ) ]]; then
echo "Building on Linux Loong64 because we have no REH archive"
Expand Down Expand Up @@ -599,7 +605,6 @@ else
elif [[ "${VSCODE_ARCH}" == "loong64" ]]; then
SHOULD_BUILD_DEB="no"
SHOULD_BUILD_RPM="no"
SHOULD_BUILD_TAR="no"
fi
if [[ "${VSCODE_ARCH}" != "x64" || "${DISABLE_APPIMAGE}" == "yes" ]]; then
export SHOULD_BUILD_APPIMAGE="no"
Expand Down
6 changes: 6 additions & 0 deletions electron_linux_loong64.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -ex

export ELECTRON_VERSION="32.2.5"
export VSCODE_ELECTRON_TAG="v${ELECTRON_VERSION}"
1 change: 1 addition & 0 deletions electron_linux_loong64.sha256sums
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8d8b540e36a62b778b0fb5e3798a2d47c2c0475925b78ff4a101aa864dfb28a9 *electron-v32.2.5-linux-loong64.zip
10 changes: 10 additions & 0 deletions package_linux_bin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ chown -R root:root vscode

cd vscode || { echo "'vscode' dir not found"; exit 1; }

export VSCODE_PLATFORM='linux'
export VSCODE_SKIP_NODE_VERSION_CHECK=1
export VSCODE_SYSROOT_PREFIX='-glibc-2.17'

Expand All @@ -29,6 +30,11 @@ elif [[ "${VSCODE_ARCH}" == "riscv64" ]]; then
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
export VSCODE_SKIP_SETUPENV=1
elif [[ "${VSCODE_ARCH}" == "loong64" ]]; then
export VSCODE_ELECTRON_REPOSITORY='darkyzhou/electron-loong64'
export ELECTRON_SKIP_BINARY_DOWNLOAD=1
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
export VSCODE_SKIP_SETUPENV=1
fi

if [[ -f "../electron_linux_${VSCODE_ARCH}.sh" ]]; then
Expand Down Expand Up @@ -114,6 +120,10 @@ node build/azure-pipelines/distro/mixin-npm

yarn gulp "vscode-linux-${VSCODE_ARCH}-min-ci"

if [[ -f "../ripgrep_${VSCODE_PLATFORM}_${VSCODE_ARCH}.sh" ]]; then
bash "../ripgrep_${VSCODE_PLATFORM}_${VSCODE_ARCH}.sh" "../VSCode-linux-${VSCODE_ARCH}/resources/app/node_modules"
fi

find "../VSCode-linux-${VSCODE_ARCH}" -print0 | xargs -0 touch -c

cd ..
4 changes: 2 additions & 2 deletions package_linux_reh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ if [[ "${SHOULD_BUILD_REH}" != "no" ]]; then
pushd "../vscode-reh-${VSCODE_PLATFORM}-${VSCODE_ARCH}"

if [[ -f "../ripgrep_${VSCODE_PLATFORM}_${VSCODE_ARCH}.sh" ]]; then
bash "../ripgrep_${VSCODE_PLATFORM}_${VSCODE_ARCH}.sh"
bash "../ripgrep_${VSCODE_PLATFORM}_${VSCODE_ARCH}.sh" "node_modules"
fi

echo "Archiving REH"
Expand All @@ -193,7 +193,7 @@ if [[ "${SHOULD_BUILD_REH_WEB}" != "no" ]]; then
pushd "../vscode-reh-web-${VSCODE_PLATFORM}-${VSCODE_ARCH}"

if [[ -f "../ripgrep_${VSCODE_PLATFORM}_${VSCODE_ARCH}.sh" ]]; then
bash "../ripgrep_${VSCODE_PLATFORM}_${VSCODE_ARCH}.sh"
bash "../ripgrep_${VSCODE_PLATFORM}_${VSCODE_ARCH}.sh" "node_modules"
fi

echo "Archiving REH-web"
Expand Down
6 changes: 5 additions & 1 deletion release_notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,11 @@ RELEASE_NOTES

<table>
<tr>
<td rowspan="2">Linux</td>
<td rowspan="3">Linux</td>
<td>.tar.gz</td>
<td><a href="https://github.com/VSCodium/vscodium/releases/download/RELEASE_VERSION/VSCodium-linux-loong64-RELEASE_VERSION.tar.gz">VSCodium-linux-loong64-RELEASE_VERSION.tar.gz</a></td>
</tr>
<tr>
<td>Remote Host</td>
<td><a href="https://github.com/VSCodium/vscodium/releases/download/RELEASE_VERSION/vscodium-reh-linux-loong64-RELEASE_VERSION.tar.gz">vscodium-reh-linux-loong64-RELEASE_VERSION.tar.gz</a></td>
</tr>
Expand Down
9 changes: 8 additions & 1 deletion ripgrep_linux_loong64.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/usr/bin/env bash

# When installing @vscode/ripgrep, it will try to download prebuilt ripgrep binary from https://github.com/microsoft/ripgrep-prebuilt,
# however, loong64 is not a supported architecture and x86 will be picked as fallback, so we need to replace it with a native one.

RG_PATH="node_modules/@vscode/ripgrep/bin/rg"
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <path_to_node_modules>"
exit 1
fi

RG_PATH="$1/@vscode/ripgrep/bin/rg"
RG_VERSION="14.1.1"

echo "Replacing ripgrep binary with loong64 one"
Expand Down

0 comments on commit 8bcb412

Please sign in to comment.