Skip to content

Commit 773f08c

Browse files
steelrooterfacebook-github-bot
authored andcommitted
Simplify CI setup with a common script (#2775)
Summary: Simplifies CI setup by making all CIs use a common script to trigger the build. Pull Request resolved: #2775 Test Plan: Verified on Github and CircleCI. Sandcastle is also green. Reviewed By: oprisnik Differential Revision: D58133180 Pulled By: steelrooter fbshipit-source-id: 914a11740d03eb4a5c2746192330ffab5c1cc97b
1 parent 0f9de6c commit 773f08c

File tree

5 files changed

+21
-7
lines changed

5 files changed

+21
-7
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ commands:
1414
name: Run Tests
1515
command: |
1616
export JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"
17-
./gradlew test assembleDebug -PdisablePreDex --info
17+
./ci/build-and-test.sh
1818
run-instrumentation-tests:
1919
steps:
2020
- run:

.github/workflows/build.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,18 @@ jobs:
2222
11
2323
17
2424
cache: gradle
25+
- name: Print debug info
26+
run: |
27+
echo "Printing env PATH var"
28+
echo $PATH
29+
echo "Printing Gradle Wrapper version"
30+
./gradlew --version
2531
- name: Build & run tests
26-
run: ./gradlew test assembleDebug -PdisablePreDex
32+
run: ./ci/build-and-test.sh
2733
- name: Copy Results
2834
run: |
2935
mkdir -p ./gh_actions/test-results/junit
3036
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ./gh_actions/test-results/junit \;
31-
- uses: actions/upload-artifact@v4.0.0
37+
- uses: actions/upload-artifact@v4
3238
with:
3339
path: "./gh_actions/test-results"

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ on:
1212

1313
jobs:
1414
build:
15-
1615
runs-on: ubuntu-latest
17-
1816
steps:
1917
- uses: actions/checkout@v4
2018
- name: Install JDK
@@ -28,11 +26,13 @@ jobs:
2826
- name: Setup Android SDK
2927
uses: android-actions/setup-android@v3
3028
- name: Install NDK
31-
- uses: nttld/setup-ndk@v1
29+
uses: nttld/setup-ndk@v1
3230
with:
3331
ndk-version: r25c
3432
- name: Register NDK
35-
run: "echo 'ndk.path=/usr/local/lib/android/sdk/ndk/25.2.9519653' >> local.properties"
33+
run: |
34+
echo $PATH
35+
echo 'ndk.path=/opt/hostedtoolcache/ndk/r25c/x64' >> local.properties
3636
- name: Write GPG Sec Ring
3737
run: echo '${{ secrets.GPG_KEY_CONTENTS }}' | base64 -d > /tmp/secring.gpg
3838
- name: Update gradle.properties

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<img alt="Fresco Logo" align="right" src="docs/static/sample-images/fresco_logo.svg" width="15%" />
44

5+
![Build Status](https://github.com/facebook/fresco/actions/workflows/build.yml/badge.svg?event=push)
56
[![Build Status](https://circleci.com/gh/facebook/fresco.svg?style=shield)](https://circleci.com/gh/facebook/fresco)
67
[![License](https://img.shields.io/badge/license-MIT-brightgreen)](https://github.com/facebook/fresco/blob/main/LICENSE)
78

ci/build-and-test.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
# Copyright (c) Meta Platforms, Inc. and affiliates.
3+
#
4+
# This source code is licensed under the MIT license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
7+
./gradlew test assembleDebug assembleDebugAndroidTest -PdisablePreDex --info

0 commit comments

Comments
 (0)