add check in at previously scheduled temporary location #64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
release: | |
types: [published] | |
jobs: | |
android: | |
runs-on: ubuntu-latest | |
container: thyrlian/android-sdk | |
steps: | |
- name: apt update and install | |
run: | | |
apt -qq update && apt -qq upgrade -y | |
apt -q install git curl wget unzip build-essential clang cmake ninja-build pkg-config libgtk-3-dev python3 ruby-full -y | |
- name: Flutter and Android SDK | |
run: | | |
git clone https://github.com/flutter/flutter.git /usr/local/flutter | |
export PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}" | |
sdkmanager "platforms;android-29" "build-tools;28.0.3" "ndk;26.3.11579264" | |
yes | sdkmanager --licenses | |
flutter config --android-sdk /opt/android-sdk | |
flutter doctor -v | |
- name: Rust | |
run: curl -proto '=https' -tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
- name: Checkout Veilid | |
run: cd .. && git clone https://gitlab.com/veilid/veilid.git | |
- uses: actions/checkout@v3 | |
- name: Add Rust Targets | |
shell: bash | |
env: | |
LC_ALL: en_US.UTF-8 | |
LANG: en_US.UTF-8 | |
run: | | |
source "$HOME/.cargo/env" | |
PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}" | |
rustup target add armv7-linux-androideabi | |
rustup target add aarch64-linux-android | |
rustup target add i686-linux-android | |
rustup target add x86_64-linux-android | |
- name: Test | |
shell: bash | |
env: | |
LC_ALL: en_US.UTF-8 | |
LANG: en_US.UTF-8 | |
run: | | |
source "$HOME/.cargo/env" | |
PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}" | |
flutter pub get | |
flutter test | |
- name: Build APK | |
shell: bash | |
env: | |
LC_ALL: en_US.UTF-8 | |
LANG: en_US.UTF-8 | |
run: | | |
source "$HOME/.cargo/env" | |
PATH="/usr/local/flutter/bin:/usr/local/flutter/bin/cache/dart-sdk/bin:${PATH}" | |
flutter build apk --release | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: coagulate.apk | |
path: build/app/outputs/flutter-apk/app-release.apk | |
# TODO: Set up signing certificates and re-enable | |
# ios: | |
# runs-on: macos-latest | |
# steps: | |
# - name: Checkout Veilid | |
# run: cd .. && git clone https://gitlab.com/veilid/veilid.git | |
# - uses: actions/checkout@v3 | |
# - uses: subosito/flutter-action@v2 | |
# with: | |
# flutter-version: '3.19.1' | |
# - run: flutter pub get | |
# - run: flutter build ipa |