-
-
Notifications
You must be signed in to change notification settings - Fork 112
Linux Build Agent Setup
Marc Durdin edited this page Jun 10, 2021
·
4 revisions
-
Install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh rustup target add wasm32-unknown-unknown
-
Install wasm-pack (WASM builds):
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
-
Install Enscripten (including adding to path with
emsdk_env.sh
) (WASM builds): https://emscripten.org/docs/getting_started/downloads.html#sdk-download-and-install
- Install dependencies
cd ~
sudo apt install openjdk-8-jdk
wget https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip
unzip commandlinetools-linux-6609375_latest.zip -d cmdline-tools
sudo mkdir /user/lib/android-sdk
sudo mv cmdline-tools /usr/lib/android-sdk
sudo chown -R [login:group] /usr/lib/android-sdk
sudo dpkg -i pandoc-2.13-1-amd64.deb
- Since there's likely multiple Java versions installed, choose Java 8
sudo update-alternatives --config java
- Update Android SDK and Accept Android SDK licenses
cd /usr/lib/android-sdk/cmdline-tools/tools/bin
sdkmanager "platform-tools" "platforms;android-30"
sudo ./sdkmanager --update
cd ../../../build-tools/licenses
yes | sdkmanager --licenses
- Add the following to bottom of ~/.bashrc
# Export the Android SDK path
export ANDROID_HOME="/usr/lib/android-sdk"
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/tools/bin
- Edit
/var/lib/TeamCity/agent/conf/buildAgent.properties
and set the following for TeamCity environment vars
env.PATH=/usr/local/bin:/usr/bin:/bin:/usr/lib/android-sdk/cmdline-tools/tools/bin:~/.cargo/bin
env.DISPLAY=:0
env.ANDROID_HOME=/usr/lib/android-sdk
env.JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
- Restart the TeamCity agent to pick up the new environment variables
cd /var/lib/TeamCity/agent/bin
./agent.sh stop
./agent.sh start
TODO