This repository has been archived by the owner on Jun 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml.disabled
98 lines (81 loc) · 2.67 KB
/
.travis.yml.disabled
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
os: osx
osx_image: xcode10.2
language: rust
rust:
- 1.38.0
env:
global:
- "PATH=$HOME/.local/android-sdk-linux/tools/bin:$HOME/.local/flutter/bin:$PATH"
- "ANDROID_HOME=$HOME/.local/android-sdk-linux"
- "JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home"
cache:
directories:
- "$HOME/.local/flutter/.pub-cache"
- "$HOME/.cargo"
- "$TRAVIS_BUILD_DIR/target"
script: |-
set -e
# Remove RVM alias crap
unset cd
BUILD_DIR=$(pwd)
FOLD_FILE=$HOME/.travis_fold_name
# Folding routines, taken from https://www.koszek.com/blog/2016/07/25/dealing-with-large-jobs-on-travis/
travis_fold() {
local action=$1
local name=$2
echo -en "travis_fold:${action}:${name}\r"
}
travis_fold_start() {
travis_fold start "$1"
echo $1
/bin/echo -n $1 > $FOLD_FILE
}
travis_fold_end() {
travis_fold end "$(cat ${FOLD_FILE})"
}
mkdir -p ~/.local
# Install an older Java for Android tools to work
travis_fold_start "install-openjdk8"
brew update >/dev/null
brew tap AdoptOpenJDK/openjdk
brew cask install adoptopenjdk8
java -version
travis_fold_end
# Android SDK
travis_fold_start "install-android-sdk"
set -x
curl -o $HOME/sdk-tools.zip https://dl.google.com/android/repository/sdk-tools-darwin-4333796.zip
mkdir -p ~/.local/android-sdk-linux
(cd ~/.local/android-sdk-linux && unzip -q $HOME/sdk-tools.zip)
rm $HOME/sdk-tools.zip
echo yes | sdkmanager --install "build-tools;28.0.3" "platform-tools" "platforms;android-28" >/dev/null
set +x
travis_fold_end
# Rust toolchains
travis_fold_start "install-rust-ios-toolchains"
rustup target add aarch64-apple-ios
rustup target add x86_64-apple-ios
which cargo-lipo || cargo install --git https://github.com/abustany/cargo-lipo --branch normalize-lib-name cargo-lipo
travis_fold_end
travis_fold_start "install-flutter-dependencies"
brew install --HEAD usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller
brew install ios-deploy
travis_fold_end
travis_fold_start "install-flutter"
[ -d ~/.local/flutter/.pub-cache ] && mv ~/.local/flutter/.pub-cache ~/.local/
git clone https://github.com/flutter/flutter.git -b "v1.7.8+hotfix.2" ~/.local/flutter
[ -d ~/.local/.pub-cache ] && mv ~/.local/.pub-cache ~/.local/flutter/
# This fails with a broken pipe error for some reason...
yes | flutter doctor --android-licenses >/dev/null || true
flutter doctor
travis_fold_end
cd $BUILD_DIR
(cd flouze_flutter && ./build-ios-libs.sh --release)
cd mobile
flutter packages get
./l10n-merge-translations.sh
flutter packages pub run build_runner build
flutter build ios --no-codesign