Created
February 4, 2018 14:28
-
-
Save dinukasal/6abe675b6e5d8c00a53fe713d0570dbc to your computer and use it in GitHub Desktop.
Gitlab CI for react-native builds
This file contains hidden or 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
image: openjdk:8-jdk | |
# image: jangrewe/gitlab-ci-android | |
variables: | |
ANDROID_COMPILE_SDK: "23" | |
ANDROID_BUILD_TOOLS: "23.0.1" | |
ANDROID_SDK_TOOLS: "3859397" | |
before_script: | |
# Fetch the specified SDK tools version to build with | |
- wget --quiet --output-document=/tmp/sdk-tools-linux.zip https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_TOOLS}.zip | |
- unzip /tmp/sdk-tools-linux.zip -d .android | |
# Set up environment variables | |
- export ANDROID_HOME=$PWD/.android | |
- export PATH=$PATH:$PWD/.android/platform-tools/ | |
# Install platform tools and Android SDK for the compile target | |
- echo y | .android/tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" | |
# - curl -sL https://deb.nodesource.com/setup_4.x | bash | |
- curl -sL https://deb.nodesource.com/setup_8.x | bash | |
# - apt-get update | |
- apt-get install -y nodejs | |
# - apt-get install -y build-essential | |
# - curl http://npmjs.org/install.sh | sh | |
- npm install -g react-native-cli | |
- npm i -g yarn | |
- yarn | |
- react-native link | |
- chmod +x android/gradlew | |
stages: | |
- build | |
# - test | |
build: | |
stage: build | |
script: | |
- cd android && ./gradlew assembleDebug | |
artifacts: | |
paths: | |
- android/app/build/outputs/ | |
# unitTests: | |
# stage: test | |
# script: | |
# - ./gradlew test | |
# functionalTests: | |
# stage: test | |
# script: | |
# - wget --quiet --output-document=android-wait-for-emulator https://raw.githubusercontent.com/travis-ci/travis-cookbooks/0f497eb71291b52a703143c5cd63a217c8766dc9/community-cookbooks/android-sdk/files/default/android-wait-for-emulator | |
# - chmod +x android-wait-for-emulator | |
# - echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter sys-img-x86-google_apis-${ANDROID_COMPILE_SDK} | |
# - echo no | android-sdk-linux/tools/android create avd -n test -t android-${ANDROID_COMPILE_SDK} --abi google_apis/x86 | |
# - android-sdk-linux/tools/emulator64-x86 -avd test -no-window -no-audio & | |
# - ./android-wait-for-emulator | |
# - adb shell input keyevent 82 | |
# - ./gradlew cAT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hello, can you give me some example for ios?