|
| 1 | +name: Run Fantom Tests |
| 2 | +inputs: |
| 3 | + release-type: |
| 4 | + required: true |
| 5 | + description: The type of release we are building. It could be nightly, release or dry-run |
| 6 | + gradle-cache-encryption-key: |
| 7 | + description: "The encryption key needed to store the Gradle Configuration cache" |
| 8 | +env: |
| 9 | + FANTOM_CCACHE_FILES: | |
| 10 | + packages/react-native/ReactAndroid/**/*.cpp |
| 11 | + packages/react-native/ReactAndroid/**/*.h |
| 12 | + packages/react-native/ReactAndroid/**/CMakeLists.txt |
| 13 | + packages/react-native/ReactCommon/**/*.cpp |
| 14 | + packages/react-native/ReactCommon/**/*.h |
| 15 | + packages/react-native/ReactCommon/**/CMakeLists.txt |
| 16 | + private/react-native-fantom/tester/**/*.cpp |
| 17 | + private/react-native-fantom/tester/**/*.h |
| 18 | + private/react-native-fantom/tester/**/CMakeLists.txt |
| 19 | +runs: |
| 20 | + using: composite |
| 21 | + steps: |
| 22 | + - name: Install dependencies |
| 23 | + shell: bash |
| 24 | + run: | |
| 25 | + sudo apt update |
| 26 | + sudo apt install -y git cmake openssl libssl-dev clang |
| 27 | + - name: Setup git safe folders |
| 28 | + shell: bash |
| 29 | + run: git config --global --add safe.directory '*' |
| 30 | + - name: Setup node.js |
| 31 | + uses: ./.github/actions/setup-node |
| 32 | + - name: Install node dependencies |
| 33 | + uses: ./.github/actions/yarn-install |
| 34 | + - name: Setup gradle |
| 35 | + uses: ./.github/actions/setup-gradle |
| 36 | + with: |
| 37 | + cache-read-only: "false" |
| 38 | + cache-encryption-key: ${{ inputs.gradle-cache-encryption-key }} |
| 39 | + - name: Restore Fantom ccache |
| 40 | + uses: actions/cache/restore@v4 |
| 41 | + with: |
| 42 | + path: /github/home/.cache/ccache |
| 43 | + key: v2-ccache-fantom-${{ github.job }}-${{ github.ref }}-${{ hashFiles(${{ env.FANTOM_CCACHE_FILES }}) }} |
| 44 | + restore-keys: | |
| 45 | + v2-ccache-fantom-${{ github.job }}-${{ github.ref }}- |
| 46 | + v2-ccache-fantom-${{ github.job }}- |
| 47 | + v2-ccache-fantom- |
| 48 | + - name: Show ccache stats |
| 49 | + shell: bash |
| 50 | + run: ccache -s -v |
| 51 | + - name: Run Fantom Tests |
| 52 | + shell: bash |
| 53 | + run: yarn fantom |
| 54 | + env: |
| 55 | + CC: clang |
| 56 | + CXX: clang++ |
| 57 | + - name: Save Fantom ccache |
| 58 | + if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} |
| 59 | + uses: actions/cache/save@v4 |
| 60 | + with: |
| 61 | + path: /github/home/.cache/ccache |
| 62 | + key: v2-ccache-fantom-${{ github.job }}-${{ github.ref }}-${{ hashFiles(${{ env.FANTOM_CCACHE_FILES }}) }} |
| 63 | + - name: Show ccache stats |
| 64 | + shell: bash |
| 65 | + run: ccache -s -v |
| 66 | + - name: Upload test results |
| 67 | + if: ${{ always() }} |
| 68 | + |
| 69 | + with: |
| 70 | + name: run-fantom-tests-results |
| 71 | + compression-level: 1 |
| 72 | + path: | |
| 73 | + private/react-native-fantom/build/reports |
0 commit comments