diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8eab547d70..8ea1c57630 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -44,8 +44,7 @@ jobs: make -j4 make install - - name: Install Ninja (Linux) - if: runner.os =='Linux' + - name: Install Ninja run: sudo apt-get install ninja-build - name: Build @@ -86,7 +85,6 @@ jobs: key: ${{ runner.os }}-${{ runner.arch }}-icu-${{ hashFiles('nativeruntime/external/icu/**') }} - name: Install Ninja - if: runner.os =='Linux' run: sudo apt-get install ninja-build - name: Run unit tests @@ -122,11 +120,39 @@ jobs: with: submodules: recursive + - uses: actions/cache@v2 + with: + path: | + ~/.gradle + ~/.m2 + ~/sqlite + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Set up JDK 11.0.8 uses: actions/setup-java@v1 with: java-version: 11.0.8 + - name: Install build tools + run: brew install ninja + + - name: Cache ICU build output + id: cache-icu + uses: actions/cache@v2 + with: + path: ~/icu-bin + key: ${{ runner.os }}-${{ runner.arch }}-icu-${{ hashFiles('nativeruntime/external/icu/**') }} + + - name: Build ICU + if: steps.cache-icu.outputs.cache-hit != 'true' + run: | + cd nativeruntime/external/icu/icu4c/source + ./runConfigureICU MacOSX --enable-static --prefix=$HOME/icu-bin + make -j4 + make install + # Determine what emulator image to use. We run all API 29+ emulators using # the google_apis image - name: Determine emulator target @@ -147,7 +173,7 @@ jobs: target: ${{ steps.determine-target.outputs.TARGET }} profile: Nexus One emulator-build: 7425822 # https://github.com/ReactiveCircus/android-emulator-runner/issues/160 - script: ./gradlew connectedCheck + script: ICU_ROOT_DIR=$HOME/icu-bin SKIP_ERRORPRONE=true SKIP_JAVADOC=true ./gradlew connectedCheck - name: Upload test results if: always()