From 3129250a12655bec6d57bddc1000a262c849cd06 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Tue, 25 Oct 2022 02:57:26 -0700 Subject: [PATCH] Fix CircleCI maven snapshot build (#4257) Summary: It somehow broke with 16983deaaf3ab3ea7584e1b80f5c458204964deb and failed with a fairly unspecific error message: https://app.circleci.com/pipelines/github/facebook/flipper/11548/workflows/5f114b29-edd8-4a12-97c0-97e2b6e2aef3/jobs/6136 This fixes it and also upgrades the build to make use of the new "orb" system Circle CI provides. Pull Request resolved: https://github.com/facebook/flipper/pull/4257 Reviewed By: mweststrate Differential Revision: D40641195 Pulled By: passy fbshipit-source-id: ca99a6063ff4aca97510ea8b65f6d466f86a72fd --- .circleci/config.yml | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3c2169bbe..2f25e97ac 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,28 +1,32 @@ version: 2.1 -executors: - default-executor: - docker: - - image: circleci/android:api-30-ndk - resource_class: large - - environment: - _JAVA_OPTIONS: "-Xmx1500m -XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport -XX:ParallelGCThreads=2 -XX:ConcGCThreads=2 -XX:ParallelGCThreads=2 -Djava.util.concurrent.ForkJoinPool.common.parallelism=2" - TERM: 'dumb' - +orbs: + android: circleci/android@2.1.2 jobs: snapshot: - executor: default-executor + environment: + TERM: 'dumb' + executor: + name: android/android-machine + tag: 2021.10.1 + resource-class: large steps: - checkout + - android/restore-gradle-cache: + cache-prefix: v1a - run: name: install retry command: scripts/install-retry.sh - run: - name: build and deploy + name: build + command: | + yes | sdkmanager "platforms;android-30" || true + /tmp/retry -m 3 ./gradlew :android:assembleRelease --info + - run: + name: deploy snapshot command: | - yes | sdkmanager "platforms;android-27" || true - /tmp/retry -m 3 ./gradlew :android:assembleRelease /tmp/retry -m 3 scripts/publish-android-snapshot.sh + - android/save-gradle-cache: + cache-prefix: v1a workflows: version: 2 build-and-deploy: