DzzD
May 1, 2022, 6:39pm
#1
I am wondering if it would be interresting to create an online build cloud services.
The Idea behind that, would be that people wont requiere to install anything to get started with Titanium, they will just have to connect there GIT to the platform, what do you think of this idea ?
To go further, it may be in a second time connected to online Emulators
miga
May 1, 2022, 7:55pm
#2
you can do it with github actions:
name: Android app
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: macos-latest
strategy:
matrix:
node-version: [14.18.1]
outputs:
output1: ${{ steps.step1.outputs.browserstack_appid }}
steps:
- uses: actions/checkout@v2
- uses: joschi/setup-jdk@v2
with:
java-version: '12'
- name: Node install
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache Node.js modules
id: node-cache
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.OS }}-node-modules-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-modules-
${{ runner.OS }}-
- name: Install Titanium
run: |
sudo npm i -g titanium appcelerator alloy
ti sdk install 10.1.1.GA
ti sdk select 10.1.1.GA
sudo chmod 777 /Users/runner/Library/'Application Support'/Titanium/modules/android
sudo chmod 777 /Users/runner/Library/'Application Support'/Titanium/modules/iphone
sudo chmod 777 /Users/runner/.titanium
- name: Build app
run: |
ti build -p android -b
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
# /build/android/app/build/outputs/apk/debug
- name: Upload APK
uses: actions/upload-artifact@v2
with:
name: my APK
path: ./build/android/app/build/outputs/apk/debug/app-debug.apk
That will build an Android APK everytime you submit a PR.
Also have a docker file here:
that will start an ubuntu with all build stuff.
And the windows powershell:
to install everything on windows.
DzzD
May 1, 2022, 8:24pm
#3
Thanks for all this infomations !
Docker seems to be a perfect solution for building from git CI or any other solution server side, It would be nice to have remote Web emulator too.
It is just an idea to enable Titanium dev without installing anything except GIT, just by register on a website that offer those services.
miga
May 2, 2022, 10:08am
#4