Skip to content

Instantly share code, notes, and snippets.

@bitc
Last active December 22, 2020 07:02
Show Gist options
  • Save bitc/14087883c926ec97011f to your computer and use it in GitHub Desktop.
Save bitc/14087883c926ec97011f to your computer and use it in GitHub Desktop.
vagga build snippets
# All build snippets are based on Ubuntu trusty:
containers:
build:
setup:
- !Ubuntu trusty
- !UbuntuUniverse
# ------------------------------------------------------------------------
# Node.js
#
# URL: https://nodejs.org
# Version: 0.12
# Dependencies: [none]
# ------------------------------------------------------------------------
- !BuildDeps [ca-certificates, wget, git]
- !Sh |
set -ex
wget -O- https://deb.nodesource.com/setup_0.12 | bash -
apt-get install -y nodejs
# ------------------------------------------------------------------------
# Emscripten
#
# URL: http://emscripten.org
# Version: latest
# Dependencies: Node.js
# Required environ:
# HOME: /tmp
# PATH: /opt/emsdk_portable:/opt/emsdk_portable/clang/fastcomp/build_master_64/bin:/opt/emsdk_portable/emscripten/master:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# EMSCRIPTEN: /opt/emsdk_portable/emscripten/master
# ------------------------------------------------------------------------
- !Install [python]
- !Install [build-essential]
- !BuildDeps [ca-certificates, wget, git]
- !BuildDeps [make, cmake]
- !Sh |
set -ex
cd /opt
wget https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz
tar xzf emsdk-portable.tar.gz --no-same-owner -C /opt
rm emsdk-portable.tar.gz
cd /opt/emsdk_portable
./emsdk update
# TODO Should specify a specific version instead of "latest"
./emsdk install latest
./emsdk activate
# ------------------------------------------------------------------------
# TypeScript
#
# URL: http://www.typescriptlang.org
# Version: 1.5-bitc_fork
# Dependencies: Node.js
# ------------------------------------------------------------------------
- !BuildDeps [git]
- !Sh |
set -ex
cd /tmp
git clone --depth 1 https://github.com/bitc/TypeScript.git --branch compilerServer
cd TypeScript
npm install && ./node_modules/.bin/jake release clean local
./node_modules/.bin/jake LKG
npm pack
npm install -g typescript-1.5.0.tgz
# ------------------------------------------------------------------------
# Shake
#
# URL: http://shakebuild.com
# Version: latest
# Dependencies: [none]
# ------------------------------------------------------------------------
- !Install [ghc, cabal-install]
- !Sh |
set -ex
cabal update
cabal install --global shake
# ------------------------------------------------------------------------
# OpenGL C Headers
#
# URL: https://www.opengl.org
# Version: latest
# Dependencies: [none]
# ------------------------------------------------------------------------
- !Install [mesa-common-dev]
# ------------------------------------------------------------------------
# hdevtools
#
# URL: https://github.com/bitc/hdevtools
# Version: latest
# Dependencies: GHC, cabal-install
# ------------------------------------------------------------------------
- !BuildDeps [git]
- !Sh |
set -ex
cabal update
cd /tmp
git clone --depth 1 https://github.com/bitc/hdevtools.git
cd hdevtools
cabal install --global
cd /tmp
rm -rfv hdevtools
# ------------------------------------------------------------------------
# GHC
# URL: https://www.haskell.org/ghc/
# Version: 7.10.1
# Dependencies: [none]
# ------------------------------------------------------------------------
- !Install [build-essential, libgmp10:amd64, libgmp-dev:amd64]
- !BuildDeps [ca-certificates, wget]
- !Sh |
set -ex
cd /tmp
wget https://www.haskell.org/ghc/dist/7.10.1/ghc-7.10.1-x86_64-unknown-linux-deb7.tar.bz2
tar -jxvf ghc-7.10.1-x86_64-unknown-linux-deb7.tar.bz2
cd ghc-7.10.1
./configure --prefix=/usr/local && make install
cd /tmp
rm -fv ghc-7.10.1-x86_64-unknown-linux-deb7.tar.bz2
rm -rfv ghc-7.10.1
# ------------------------------------------------------------------------
# cabal-install
#
# URL: https://www.haskell.org/cabal/
# Version: 1.22.3.0
# Dependencies: GHC
# ------------------------------------------------------------------------
# Cabal library
- !BuildDeps [ca-certificates, wget]
- !Sh |
set -ex
cd /tmp
wget https://www.haskell.org/cabal/release/cabal-1.22.3.0/Cabal-1.22.3.0.tar.gz
tar -zxvf Cabal-1.22.3.0.tar.gz
cd Cabal-1.22.3.0
ghc --make Setup.hs
./Setup configure --global
./Setup build
./Setup install
cd /tmp
rm -fv Cabal-1.22.3.0.tar.gz
rm -rfv Cabal-1.22.3.0
# cabal-install tool
- !BuildDeps [ca-certificates, wget]
- !BuildDeps [zlib1g-dev]
- !Sh |
set -ex
cd /tmp
wget https://www.haskell.org/cabal/release/cabal-install-1.22.3.0/cabal-install-1.22.3.0.tar.gz
tar -zxvf cabal-install-1.22.3.0.tar.gz
cd cabal-install-1.22.3.0
./bootstrap.sh --global
cd /tmp
rm -fv cabal-install-1.22.3.0.tar.gz
rm -rfv cabal-install-1.22.3.0
# ------------------------------------------------------------------------
# sassc
#
# URL: https://github.com/sass/sassc
# Version: 3.2.5
# Dependencies: [none]
# ------------------------------------------------------------------------
- !BuildDeps [git, make, build-essential]
- !Sh |
set -ex
cd /tmp
git clone --depth 1 --branch 3.2.5 https://github.com/sass/libsass.git
git clone --depth 1 --branch 3.2.5 https://github.com/sass/sassc.git
make -C libsass
SASS_LIBSASS_PATH=`pwd`/libsass make -C sassc
cp sassc/bin/sassc /usr/local/bin
chown root:root /usr/local/bin/sassc
chmod 755 /usr/local/bin/sassc
# ------------------------------------------------------------------------
# Oracle JDK 7
#
# URL: http://www.oracle.com/technetwork/java/javase/downloads/
# Version: latest
# Dependencies: [none]
# ------------------------------------------------------------------------
- !BuildDeps [software-properties-common] # For apt-add-repository
- !Sh |
set -ex
# http://askubuntu.com/a/521154
apt-add-repository -y ppa:webupd8team/java
apt-get update
# http://askubuntu.com/a/190674
echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
apt-get install -y oracle-java7-installer
# ------------------------------------------------------------------------
# Android SDK Tools
#
# URL: https://developer.android.com/sdk/
# Version: 24.2
# Dependencies: Oracle JDK 7
# Required environ:
# HOME: /work/.home
# ANDROID_HOME: /opt/android-sdk-linux
# ------------------------------------------------------------------------
- !BuildDeps [ca-certificates, wget]
# Set HOME directory to /work/.home
- !Sh |
set -ex
mkdir -p /work/.home
sed -i 's%:/root:%:/work/.home:%' /etc/passwd
- !Env
HOME: /work/.home
- !Sh |
set -ex
# http://askubuntu.com/a/165536
dpkg --add-architecture i386
apt-get update
apt-get install -y libc6:i386 libstdc++6:i386 zlib1g:i386
cd /opt
wget https://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar xzf android-sdk_r24.2-linux.tgz --no-same-owner -C /opt
rm android-sdk_r24.2-linux.tgz
/opt/android-sdk-linux/tools/android list sdk --all
echo y | /opt/android-sdk-linux/tools/android update sdk --no-ui --all --filter \
platform-tools,build-tools-21.1.2,android-22
# ------------------------------------------------------------------------
# Cordova
#
# URL: https://cordova.apache.org
# Version: 5.0.0
# Dependencies: none
# ------------------------------------------------------------------------
- !NpmInstall [[email protected]]
# ------------------------------------------------------------------------
# Ant
#
# URL: http://ant.apache.org
# Version: latest
# Dependencies: none
# ------------------------------------------------------------------------
- !Install [ant]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment