arm64 support (#35)

* Add arm64 build support thanks to @435vic
This commit is contained in:
Victor Javier 2018-10-10 10:20:56 -05:00 committed by Peter Squicciarini
parent dc75d7df46
commit c1bdb38d45
5 changed files with 38 additions and 3 deletions

View file

@ -5,6 +5,9 @@ matrix:
- os: linux
sudo: required
env: BUILDARCH=ia32
- os: linux
sudo: required
env: BUILDARCH=arm64
- os: osx
language: node_js
@ -35,6 +38,7 @@ deploy:
- vscode/.build/linux/rpm/i386/*.rpm
- vscode/.build/linux/deb/amd64/deb/*.deb
- vscode/.build/linux/rpm/x86_64/*.rpm
- vscode/.build/linux/deb/arm64/deb/*.deb
on:
all_branches: true
condition: $SHOULD_BUILD = yes

View file

@ -30,6 +30,10 @@ if [[ "$SHOULD_BUILD" == "yes" ]]; then
npm run gulp vscode-linux-ia32-build-deb
npm run gulp vscode-linux-ia32-build-rpm
unset npm_config_arch
elif [[ "$BUILDARCH" == "arm64" ]]; then
npm run gulp vscode-linux-arm64-min
npm run gulp vscode-linux-arm64-build-deb
# npm run gulp vscode-linux-arm64-build-rpm
else
npm run gulp vscode-linux-x64-min
npm run gulp vscode-linux-x64-build-deb

View file

@ -1,6 +1,6 @@
#!/bin/bash
GITHUB_RESPONSE=$(curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/vscodium/vscodium/releases/tags/$LATEST_MS_TAG)
GITHUB_RESPONSE=$(curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/VSCodium/vscodium/releases/tags/$LATEST_MS_TAG)
echo "Github response: ${GITHUB_RESPONSE}"
VSCODIUM_ASSETS=$(echo $GITHUB_RESPONSE | jq '.assets')
echo "VSCodium assets: ${VSCODIUM_ASSETS}"
@ -33,6 +33,25 @@ if [ "$GITHUB_TOKEN" != "" ]; then
if [[ "$SHOULD_BUILD" != "yes" ]]; then
echo "Already have all the Linux ia32 builds"
fi
elif [[ $BUILDARCH == "arm64" ]]; then
# HAVE_ARM64_RPM=$(echo $VSCODIUM_ASSETS | jq 'map(.name) | contains(["arm64.rpm"])')
HAVE_ARM64_DEB=$(echo $VSCODIUM_ASSETS | jq 'map(.name) | contains(["arm64.deb"])')
HAVE_ARM64_TAR=$(echo $VSCODIUM_ASSETS | jq --arg suffix "arm64-$LATEST_MS_TAG.tar.gz" 'map(.name) | contains([$suffix])')
# if [[ "$HAVE_ARM64_RPM" != "true" ]]; then
# echo "Building on Linux arm64 because we have no RPM"
# export SHOULD_BUILD="yes"
# fi
if [[ "$HAVE_ARM64_DEB" != "true" ]]; then
echo "Building on Linux arm64 because we have no DEB"
export SHOULD_BUILD="yes"
fi
if [[ "$HAVE_ARM64_TAR" != "true" ]]; then
echo "Building on Linux arm64 because we have no TAR"
export SHOULD_BUILD="yes"
fi
if [[ "$SHOULD_BUILD" != "yes" ]]; then
echo "Already have all the Linux arm64 builds"
fi
else
HAVE_64_RPM=$(echo $VSCODIUM_ASSETS | jq 'map(.name) | contains(["x86_64.rpm"])')
HAVE_64_DEB=$(echo $VSCODIUM_ASSETS | jq 'map(.name) | contains(["amd64.deb"])')

View file

@ -7,6 +7,9 @@ if [[ "$SHOULD_BUILD" == "yes" ]]; then
elif [[ "$BUILDARCH" == "ia32" ]]; then
cd VSCode-linux-ia32
tar czf ../VSCode-linux-ia32-${LATEST_MS_TAG}.tar.gz .
elif [[ "$BUILDARCH" == "arm64" ]]; then
cd VSCode-linux-arm64
tar czf ../VSCode-linux-arm64-${LATEST_MS_TAG}.tar.gz .
else
cd VSCode-linux-x64
tar czf ../VSCode-linux-x64-${LATEST_MS_TAG}.tar.gz .

View file

@ -12,5 +12,10 @@ else
sudo apt-get update
sudo apt-get install libc6-dev-i386 gcc-multilib g++-multilib
sudo apt-get install libx11-dev:i386 libxkbfile-dev:i386
elif [[ $BUILDARCH == "arm64" ]]; then
# Use the default C / C++ compilers,
# because some makefiles default to CC:=gcc:
export CC=/usr/bin/cc
export CXX=/usr/bin/c++
fi
fi