Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ matrix:
sudo: required
env: BUILDARCH=x64
dist: trusty
- os: linux
sudo: required
env: BUILDARCH=arm64
dist: trusty
- os: osx

language: node_js
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,10 @@ The builds are run every day, but exit early if there isn't a new release from M
- [x] OS X (`zip`, `dmg`)
- [x] Linux x64 (`deb`, `rpm`, `AppImage`, `tar.gz`)
- [x] Linux x86 (`deb`, `rpm`, `tar.gz`) ([up to v1.35.1](https://code.visualstudio.com/updates/v1_36#_linux-32bit-support-ends))
- [x] Linux arm64 (`deb`, `tar.gz`)
- [x] Windows x64
- [x] Windows x86

The ARM architecture is not currently supported but is being worked on.

## <a id="donate"></a>Donate
If you would like to support the development of VSCodium, feel free to send BTC to `3PgjE95yzBDTrSPxPiqoxSgZFuKPPAix1N`.

Expand Down
24 changes: 14 additions & 10 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

function keep_alive() {
while true; do
date
sleep 60
echo .
read -t 60 < /proc/self/fd/1 > /dev/null 2>&1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why were these lines changed ? Can you help me understand what read -t 60 < /proc/self/fd/1 > /dev/null 2>&1 does ?

Copy link
Copy Markdown
Contributor Author

@dimkr dimkr Dec 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When available RAM is low, the shell fails to run processes (fork() fails) and the shell decides to exit. date and sleep are new processes, so sometimes CI fails because the shell can't run them. By using echo and read (from a file descriptor there's nothing to read from, the stdout pipe - that's /proc/self/fd/1) with timeout, two shell built-in commands (as opposed to separate executables executed by the shell), we can reliably output something every once in a while under low-memory conditions.

Because the sub-shell that runs read shares the same stdout pipe as the parent shell, we want to redirect the output of read to /dev/null, otherwise, something like pressing ENTER when running interactively, can cause an infinite loop (read from stdout, then output to stdout, repeatedly).

This makes CI more reliable and makes minification very unlikely to cause the shell to terminate.

done
}

Expand Down Expand Up @@ -69,14 +69,14 @@ if [[ "$SHOULD_BUILD" == "yes" ]]; then
sed -i "s/code-oss/codium/" resources/linux/debian/postinst.template
fi

yarn gulp compile-build
yarn gulp compile-extensions-build

# this task is very slow on mac, so using a keep alive to keep travis alive
keep_alive &
KA_PID=$!

yarn gulp compile-build
yarn gulp compile-extensions-build

yarn gulp minify-vscode
kill $KA_PID

yarn gulp minify-vscode-reh
yarn gulp minify-vscode-reh-web
Expand All @@ -97,14 +97,18 @@ if [[ "$SHOULD_BUILD" == "yes" ]]; then
yarn gulp "vscode-win32-${BUILDARCH}-system-setup"
yarn gulp "vscode-win32-${BUILDARCH}-user-setup"
else # linux
yarn gulp vscode-linux-x64-min-ci
yarn gulp vscode-reh-linux-x64-min-ci
yarn gulp vscode-reh-web-linux-x64-min-ci
yarn gulp vscode-linux-${BUILDARCH}-min-ci
yarn gulp vscode-reh-linux-${BUILDARCH}-min-ci
yarn gulp vscode-reh-web-linux-${BUILDARCH}-min-ci

yarn gulp "vscode-linux-${BUILDARCH}-build-deb"
yarn gulp "vscode-linux-${BUILDARCH}-build-rpm"
if [[ "$BUILDARCH" != "arm64" ]]; then
yarn gulp "vscode-linux-${BUILDARCH}-build-rpm"
fi
. ../create_appimage.sh
fi

kill $KA_PID

cd ..
fi
16 changes: 11 additions & 5 deletions install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,24 @@ if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install jq zip
else
sudo apt-get update
sudo apt-get install -y fakeroot rpm jq
sudo apt-get install -y fakeroot jq
if [[ $BUILDARCH == "arm64" ]]; then
echo "deb http://ports.ubuntu.com/ubuntu-ports/ trusty main" | sudo tee -a /etc/apt/sources.list.d/arm64.list >/dev/null
sed 's/^deb /deb [arch=amd64] '/g -i /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty main" | sudo tee -a /etc/apt/sources.list.d/arm64.list >/dev/null
sudo dpkg --add-architecture arm64
sudo apt-get update
sudo apt-get install libc6-dev-arm64-cross gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
sudo apt-get install libx11-dev:arm64 libxkbfile-dev:arm64
sudo apt-get install libc6-dev-arm64-cross gcc-aarch64-linux-gnu g++-aarch64-linux-gnu `apt-cache search x11proto | grep ^x11proto | cut -f 1 -d ' '` xz-utils pkg-config
mkdir -p dl
cd dl
apt-get download libx11-dev:arm64 libx11-6:arm64 libxkbfile-dev:arm64 libxkbfile1:arm64 libxau-dev:arm64 libxdmcp-dev:arm64 libxcb1-dev:arm64 libsecret-1-dev:arm64 libsecret-1-0:arm64 libpthread-stubs0-dev:arm64 libglib2.0-dev:arm64 libglib2.0-0:arm64 libffi-dev:arm64 libffi6:arm64 zlib1g:arm64 libpcre3-dev:arm64 libpcre3:arm64
for i in *.deb; do ar x $i; sudo tar -C / -xf data.tar.*; rm -f data.tar.*; done
cd ..
export CC=/usr/bin/aarch64-linux-gnu-gcc
export CXX=/usr/bin/aarch64-linux-gnu-g++
export CC_host=/usr/bin/gcc
export CXX_host=/usr/bin/g++
export PKG_CONFIG_LIBDIR=/usr/lib/aarch64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
else
sudo apt-get install libx11-dev libxkbfile-dev libsecret-1-dev fakeroot rpm jq
sudo apt-get install libx11-dev libxkbfile-dev libsecret-1-dev rpm
fi
fi
4 changes: 2 additions & 2 deletions sum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ if [[ "$SHOULD_BUILD" == "yes" ]]; then
sum_file VSCodium-win32-*.zip
else # linux
cp out/*.AppImage .
cp vscode/.build/linux/deb/amd64/deb/*.deb .
cp vscode/.build/linux/rpm/x86_64/*.rpm .
cp vscode/.build/linux/deb/*/deb/*.deb .
cp vscode/.build/linux/rpm/*/*.rpm .

sum_file *.AppImage
sum_file VSCodium-linux*.tar.gz
Expand Down