From a3960d12e8303efd85d03acfe196c62913908e58 Mon Sep 17 00:00:00 2001 From: Josh Kearney Date: Fri, 31 May 2024 09:46:08 -0700 Subject: [PATCH] Convert the CircleCI workflow to a GitHub Actions workflow (#2762) Summary: This pull request converts the CircleCI workflows to GitHub actions workflows. [Github Actions Importer](https://github.com/github/gh-actions-importer) was used to convert the workflows initially, then I edited them manually to correct errors in translation. **Issues** 1. _facebook/fresco/build -> Run Tests_ ``` Execution failed for task ':animated-base:testDebugUnitTest'. ```
Full Error
com.facebook.fresco.animation.bitmap.cache.FrescoFrameCacheTest > testExtractAndClose_whenCloseableStaticBitmapNull_thenReturnNull FAILED
    org.mockito.exceptions.base.MockitoException at FrescoFrameCacheTest.java:40
        Caused by: org.mockito.exceptions.base.MockitoException at FrescoFrameCacheTest.java:40
            Caused by: java.lang.IllegalStateException at FrescoFrameCacheTest.java:40
                Caused by: java.lang.IllegalArgumentException at FrescoFrameCacheTest.java:40

com.facebook.fresco.animation.bitmap.cache.FrescoFrameCacheTest > testExtractAndClose_whenBitmapReferenceInvalid_thenReturnReference FAILED
    org.mockito.exceptions.base.MockitoException at FrescoFrameCacheTest.java:40
        Caused by: org.mockito.exceptions.base.MockitoException at FrescoFrameCacheTest.java:40
            Caused by: java.lang.IllegalStateException at FrescoFrameCacheTest.java:40
                Caused by: java.lang.IllegalArgumentException at FrescoFrameCacheTest.java:40

com.facebook.fresco.animation.bitmap.cache.FrescoFrameCacheTest > testExtractAndClose FAILED
    org.mockito.exceptions.base.MockitoException at FrescoFrameCacheTest.java:40
        Caused by: org.mockito.exceptions.base.MockitoException at FrescoFrameCacheTest.java:40
            Caused by: java.lang.IllegalStateException at FrescoFrameCacheTest.java:40
                Caused by: java.lang.IllegalArgumentException at FrescoFrameCacheTest.java:40

com.facebook.fresco.animation.bitmap.cache.FrescoFrameCacheTest > testExtractAndClose_whenBitmapRecycled_thenReturnReference FAILED
    org.mockito.exceptions.base.MockitoException at FrescoFrameCacheTest.java:40
        Caused by: org.mockito.exceptions.base.MockitoException at FrescoFrameCacheTest.java:40
            Caused by: java.lang.IllegalStateException at FrescoFrameCacheTest.java:40
                Caused by: java.lang.IllegalArgumentException at FrescoFrameCacheTest.java:40

com.facebook.fresco.animation.bitmap.cache.FrescoFrameCacheTest > testExtractAndClose_whenImageReferenceInvalid_thenReturnNull FAILED
    org.mockito.exceptions.base.MockitoException at FrescoFrameCacheTest.java:40
        Caused by: org.mockito.exceptions.base.MockitoException at FrescoFrameCacheTest.java:40
            Caused by: java.lang.IllegalStateException at FrescoFrameCacheTest.java:40
                Caused by: java.lang.IllegalArgumentException at FrescoFrameCacheTest.java:40

com.facebook.fresco.animation.bitmap.cache.FrescoFrameCacheTest > testExtractAndClose_whenInputNull_thenReturnNull FAILED
    org.mockito.exceptions.base.MockitoException at FrescoFrameCacheTest.java:40
        Caused by: org.mockito.exceptions.base.MockitoException at FrescoFrameCacheTest.java:40
            Caused by: java.lang.IllegalStateException at FrescoFrameCacheTest.java:40
                Caused by: java.lang.IllegalArgumentException at FrescoFrameCacheTest.java:40

com.facebook.fresco.animation.bitmap.cache.FrescoFrameCacheTest > testExtractAndClose_whenCloseableStaticBitmapClosed_thenReturnNull FAILED
    org.mockito.exceptions.base.MockitoException at FrescoFrameCacheTest.java:40
        Caused by: org.mockito.exceptions.base.MockitoException at FrescoFrameCacheTest.java:40
            Caused by: java.lang.IllegalStateException at FrescoFrameCacheTest.java:40
                Caused by: java.lang.IllegalArgumentException at FrescoFrameCacheTest.java:40
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended

com.facebook.fresco.animation.bitmap.wrapper.AnimatedDrawableBackendFrameRendererTest > testRenderFrameUnsuccessful FAILED
    org.mockito.exceptions.base.MockitoException at AnimatedDrawableBackendFrameRendererTest.java:104
        Caused by: org.mockito.exceptions.base.MockitoException at AnimatedDrawableBackendFrameRendererTest.java:104
            Caused by: java.lang.IllegalStateException at AnimatedDrawableBackendFrameRendererTest.java:104
                Caused by: java.lang.IllegalArgumentException at AnimatedDrawableBackendFrameRendererTest.java:104

com.facebook.fresco.animation.bitmap.wrapper.AnimatedDrawableBackendFrameRendererTest > testSetBounds FAILED
    org.mockito.exceptions.base.MockitoException at AnimatedDrawableBackendFrameRendererTest.java:52
        Caused by: org.mockito.exceptions.base.MockitoException at AnimatedDrawableBackendFrameRendererTest.java:52
            Caused by: java.lang.IllegalStateException at AnimatedDrawableBackendFrameRendererTest.java:52
                Caused by: java.lang.IllegalArgumentException at AnimatedDrawableBackendFrameRendererTest.java:52

com.facebook.fresco.animation.bitmap.wrapper.AnimatedDrawableBackendFrameRendererTest > testRenderFrame FAILED
    org.mockito.exceptions.base.MockitoException at AnimatedDrawableBackendFrameRendererTest.java:104
        Caused by: org.mockito.exceptions.base.MockitoException at AnimatedDrawableBackendFrameRendererTest.java:104
            Caused by: java.lang.IllegalStateException at AnimatedDrawableBackendFrameRendererTest.java:104
                Caused by: java.lang.IllegalArgumentException at AnimatedDrawableBackendFrameRendererTest.java:104

com.facebook.imagepipeline.animated.impl.AnimatedDrawableBackendImplTest > testOffsets FAILED
    java.lang.RuntimeException at AbstractClassloaderExecutor.java:108
        Caused by: java.lang.reflect.InvocationTargetException at DirectConstructorHandleAccessor.java:79
            Caused by: java.lang.ExceptionInInitializerError at XStream.java:989
                Caused by: java.lang.reflect.InaccessibleObjectException at AccessibleObject.java:354

com.facebook.imagepipeline.animated.impl.AnimatedDrawableBackendImplTest > testNoUpscaling FAILED
    java.lang.RuntimeException at AbstractClassloaderExecutor.java:108
        Caused by: java.lang.reflect.InvocationTargetException at DirectConstructorHandleAccessor.java:79
            Caused by: java.lang.NoClassDefFoundError at XStream.java:989
                Caused by: java.lang.ExceptionInInitializerError at AccessibleObject.java:354

com.facebook.imagepipeline.animated.impl.AnimatedDrawableBackendImplTest > testNarrow FAILED
    java.lang.RuntimeException at AbstractClassloaderExecutor.java:108
        Caused by: java.lang.reflect.InvocationTargetException at DirectConstructorHandleAccessor.java:79
            Caused by: java.lang.NoClassDefFoundError at XStream.java:989
                Caused by: java.lang.ExceptionInInitializerError at AccessibleObject.java:354

com.facebook.imagepipeline.animated.impl.AnimatedDrawableBackendImplTest > testSimple FAILED
    java.lang.RuntimeException at AbstractClassloaderExecutor.java:108
        Caused by: java.lang.reflect.InvocationTargetException at DirectConstructorHandleAccessor.java:79
            Caused by: java.lang.NoClassDefFoundError at XStream.java:989
                Caused by: java.lang.ExceptionInInitializerError at AccessibleObject.java:354

com.facebook.imagepipeline.animated.impl.AnimatedFrameCacheTest > testContainsFullReuseFlowWithMultipleItems FAILED
    org.mockito.exceptions.base.MockitoException at AnimatedFrameCacheTest.java:53
        Caused by: org.mockito.exceptions.base.MockitoException at AnimatedFrameCacheTest.java:53
            Caused by: java.lang.IllegalStateException at AnimatedFrameCacheTest.java:53
                Caused by: java.lang.IllegalArgumentException at AnimatedFrameCacheTest.java:53

com.facebook.imagepipeline.animated.impl.AnimatedFrameCacheTest > testBasic FAILED
    org.mockito.exceptions.base.MockitoException at AnimatedFrameCacheTest.java:53
        Caused by: org.mockito.exceptions.base.MockitoException at AnimatedFrameCacheTest.java:53
            Caused by: java.lang.IllegalStateException at AnimatedFrameCacheTest.java:53
                Caused by: java.lang.IllegalArgumentException at AnimatedFrameCacheTest.java:53

com.facebook.imagepipeline.animated.impl.AnimatedFrameCacheTest > testReuse FAILED
    org.mockito.exceptions.base.MockitoException at AnimatedFrameCacheTest.java:53
        Caused by: org.mockito.exceptions.base.MockitoException at AnimatedFrameCacheTest.java:53
            Caused by: java.lang.IllegalStateException at AnimatedFrameCacheTest.java:53
                Caused by: java.lang.IllegalArgumentException at AnimatedFrameCacheTest.java:53

com.facebook.imagepipeline.animated.impl.AnimatedFrameCacheTest > testCantReuseIfNotClosed FAILED
    org.mockito.exceptions.base.MockitoException at AnimatedFrameCacheTest.java:53
        Caused by: org.mockito.exceptions.base.MockitoException at AnimatedFrameCacheTest.java:53
            Caused by: java.lang.IllegalStateException at AnimatedFrameCacheTest.java:53
                Caused by: java.lang.IllegalArgumentException at AnimatedFrameCacheTest.java:53

com.facebook.imagepipeline.animated.impl.AnimatedFrameCacheTest > testStillThereIfClosed FAILED
    org.mockito.exceptions.base.MockitoException at AnimatedFrameCacheTest.java:53
        Caused by: org.mockito.exceptions.base.MockitoException at AnimatedFrameCacheTest.java:53
            Caused by: java.lang.IllegalStateException at AnimatedFrameCacheTest.java:53
                Caused by: java.lang.IllegalArgumentException at AnimatedFrameCacheTest.java:53

com.facebook.imagepipeline.animated.impl.AnimatedFrameCacheTest > testMultipleFrames FAILED
    org.mockito.exceptions.base.MockitoException at AnimatedFrameCacheTest.java:53
        Caused by: org.mockito.exceptions.base.MockitoException at AnimatedFrameCacheTest.java:53
            Caused by: java.lang.IllegalStateException at AnimatedFrameCacheTest.java:53
                Caused by: java.lang.IllegalArgumentException at AnimatedFrameCacheTest.java:53

com.facebook.imagepipeline.animated.impl.AnimatedFrameCacheTest > testContains FAILED
    org.mockito.exceptions.base.MockitoException at AnimatedFrameCacheTest.java:53
        Caused by: org.mockito.exceptions.base.MockitoException at AnimatedFrameCacheTest.java:53
            Caused by: java.lang.IllegalStateException at AnimatedFrameCacheTest.java:53
                Caused by: java.lang.IllegalArgumentException at AnimatedFrameCacheTest.java:53

com.facebook.imagepipeline.animated.impl.AnimatedFrameCacheTest > testReplace FAILED
    org.mockito.exceptions.base.MockitoException at AnimatedFrameCacheTest.java:53
        Caused by: org.mockito.exceptions.base.MockitoException at AnimatedFrameCacheTest.java:53
            Caused by: java.lang.IllegalStateException at AnimatedFrameCacheTest.java:53
                Caused by: java.lang.IllegalArgumentException at AnimatedFrameCacheTest.java:53

com.facebook.imagepipeline.animated.impl.AnimatedFrameCacheTest > testContainsWhenReused FAILED
    org.mockito.exceptions.base.MockitoException at AnimatedFrameCacheTest.java:53
        Caused by: org.mockito.exceptions.base.MockitoException at AnimatedFrameCacheTest.java:53
            Caused by: java.lang.IllegalStateException at AnimatedFrameCacheTest.java:53
                Caused by: java.lang.IllegalArgumentException at AnimatedFrameCacheTest.java:53

com.facebook.imagepipeline.producers.AnimatedRepeatedPostprocessorProducerTest > testNonStaticBitmapIsPassedOn FAILED
    org.mockito.exceptions.base.MockitoException at AnimatedRepeatedPostprocessorProducerTest.java:76
        Caused by: org.mockito.exceptions.base.MockitoException at AnimatedRepeatedPostprocessorProducerTest.java:76
            Caused by: java.lang.IllegalStateException at AnimatedRepeatedPostprocessorProducerTest.java:76
                Caused by: java.lang.IllegalArgumentException at AnimatedRepeatedPostprocessorProducerTest.java:76

com.facebook.imagepipeline.producers.AnimatedSingleUsePostprocessorProducerTest > testNonStaticBitmapIsPassedOn FAILED
    org.mockito.exceptions.base.MockitoException at AnimatedSingleUsePostprocessorProducerTest.java:69
        Caused by: org.mockito.exceptions.base.MockitoException at AnimatedSingleUsePostprocessorProducerTest.java:69
            Caused by: java.lang.IllegalStateException at AnimatedSingleUsePostprocessorProducerTest.java:69
                Caused by: java.lang.IllegalArgumentException at AnimatedSingleUsePostprocessorProducerTest.java:69

35 tests completed, 25 failed

> Task :animated-base:testDebugUnitTest FAILED
454 actionable tasks: 454 executed

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':animated-base:testDebugUnitTest'.
## How did you test this change? I tested these changes in a [forked repo](https://github.com/robandpdx-org/fresco/actions/runs/8024468495). https://fburl.com/workplace/f6mz6tmw Pull Request resolved: https://github.com/facebook/fresco/pull/2762 Reviewed By: kartavya-ramnani Differential Revision: D56526799 Pulled By: steelrooter fbshipit-source-id: 500220691ddcdd0532d9db828474f51d7d4c3f6d --- .github/workflows/build.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..66f413e8d4 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,30 @@ +name: facebook/fresco/build +on: + push: + branches: + - main +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: nttld/setup-ndk@v1 + with: + ndk-version: r25c + - name: Install JDK + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: | + 11 + 17 + cache: gradle + - name: Build & run tests + run: ./gradlew test assembleDebug -PdisablePreDex + - name: Copy Results + run: | + mkdir -p /home/gh_actions/test-results/junit + find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} /home/gh_actions/test-results/junit \; + - uses: actions/upload-artifact@v4.0.0 + with: + path: "/home/gh_actions/test-results"