Skip to content

Commit

Permalink
Merge pull request #387 from hanabi1224/cirrus_ci
Browse files Browse the repository at this point in the history
cirrus ci
  • Loading branch information
hanxu317317 committed Nov 8, 2019
2 parents 12dbd74 + 3fbe7e5 commit 3ce5c0e
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM cirrusci/flutter:stable

RUN sudo apt-get update -y

RUN sudo apt-get install -y --no-install-recommends gnupg

# Add repo for gcloud sdk and install it
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | \
sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list

RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \
sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -

RUN sudo apt-get update && sudo apt-get install -y google-cloud-sdk && \
gcloud config set core/disable_usage_reporting true && \
gcloud config set component_manager/disable_update_check true

RUN yes | sdkmanager \
"platforms;android-29" \
"build-tools;29.0.2" \
"extras;google;m2repository" \
"extras;android;m2repository"

RUN yes | sdkmanager \
"platforms;android-28" \
"build-tools;28.0.3" \
"extras;google;m2repository" \
"extras;android;m2repository"

RUN yes | sdkmanager --licenses
32 changes: 32 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
task:
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == ''
container:
dockerfile: .ci/Dockerfile
cpu: 8
memory: 16G
pub_cache:
folder: ~/.pub-cache
setup_script:
- flutter channel stable
- flutter upgrade
build_script:
- flutter build apk
test_script: flutter test

task:
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
osx_instance:
#image: mojave-xcode-10.2-flutter
image: mojave-flutter
pub_cache:
folder: ~/.pub-cache
setup_script:
- pod repo update
- flutter channel stable
- flutter upgrade
create_simulator_script:
- xcrun simctl list
- xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-12-2 | xargs xcrun simctl boot
build_script:
- flutter build ios --no-codesign
test_script: flutter test

0 comments on commit 3ce5c0e

Please sign in to comment.