diff --git a/.github/workflows/prebuild-ios-core.yml b/.github/workflows/prebuild-ios-core.yml index 32030ea60e8..0a935db50b3 100644 --- a/.github/workflows/prebuild-ios-core.yml +++ b/.github/workflows/prebuild-ios-core.yml @@ -102,12 +102,15 @@ jobs: with: name: prebuild-ios-core-headers-${{ matrix.flavor }}-${{ matrix.slice }} path: packages/react-native/.build/headers + - name: Compress slice to preserve symlinks + run: | + tar -czf "$RUNNER_TEMP/prebuild-ios-core-slice-${{ matrix.flavor }}-${{ matrix.slice }}.tar.gz" \ + -C packages/react-native/.build/output/spm/${{ matrix.flavor }}/Build/Products . - name: Upload artifacts uses: ./.github/actions/upload-artifact with: name: prebuild-ios-core-slice-${{ matrix.flavor }}-${{ matrix.slice }} - path: | - packages/react-native/.build/output/spm/${{ matrix.flavor }}/Build/Products + path: ${{ runner.temp }}/prebuild-ios-core-slice-${{ matrix.flavor }}-${{ matrix.slice }}.tar.gz - name: Save Cache uses: actions/cache/save@v5 if: ${{ github.ref == 'refs/heads/main' && inputs.version-type == '' && steps.restore-ios-slice.outputs.cache-hit != 'true' }} @@ -166,8 +169,15 @@ jobs: uses: ./.github/actions/download-artifact with: pattern: prebuild-ios-core-slice-${{ matrix.flavor }}-* - path: packages/react-native/.build/output/spm/${{ matrix.flavor }}/Build/Products + path: ${{ runner.temp }}/prebuild-slices merge-multiple: true + - name: Extract slices + if: steps.restore-ios-xcframework.outputs.cache-hit != 'true' + run: | + mkdir -p packages/react-native/.build/output/spm/${{ matrix.flavor }}/Build/Products + for archive in "$RUNNER_TEMP"/prebuild-slices/*.tar.gz; do + tar -xzf "$archive" -C packages/react-native/.build/output/spm/${{ matrix.flavor }}/Build/Products + done - name: Download headers if: steps.restore-ios-xcframework.outputs.cache-hit != 'true' uses: ./.github/actions/download-artifact diff --git a/.github/workflows/prebuild-ios-dependencies.yml b/.github/workflows/prebuild-ios-dependencies.yml index 2d6949832f4..d73455ee8d3 100644 --- a/.github/workflows/prebuild-ios-dependencies.yml +++ b/.github/workflows/prebuild-ios-dependencies.yml @@ -91,12 +91,15 @@ jobs: - name: Build slice ${{ matrix.slice }} for ${{ matrix.flavor }} if: steps.restore-slice-folder.outputs.cache-hit != 'true' run: node scripts/releases/prepare-ios-prebuilds.js -b -p ${{ matrix.slice }} -r ${{ matrix.flavor }} + - name: Compress slice to preserve symlinks + run: | + tar -czf "$RUNNER_TEMP/prebuild-slice-${{ matrix.flavor }}-${{ matrix.slice }}.tar.gz" \ + -C packages/react-native/third-party/.build/Build/Products . - name: Upload Artifacts uses: ./.github/actions/upload-artifact with: name: prebuild-slice-${{ matrix.flavor }}-${{ matrix.slice }} - path: | - packages/react-native/third-party/.build/Build/Products + path: ${{ runner.temp }}/prebuild-slice-${{ matrix.flavor }}-${{ matrix.slice }}.tar.gz - name: Save Cache uses: actions/cache/save@v5 if: ${{ github.ref == 'refs/heads/main' && steps.restore-slice-folder.outputs.cache-hit != 'true' }} @@ -147,8 +150,15 @@ jobs: uses: ./.github/actions/download-artifact with: pattern: prebuild-slice-${{ matrix.flavor }}-* - path: packages/react-native/third-party/.build/Build/Products + path: ${{ runner.temp }}/prebuild-slices merge-multiple: true + - name: Extract slices + if: steps.restore-xcframework.outputs.cache-hit != 'true' + run: | + mkdir -p packages/react-native/third-party/.build/Build/Products + for archive in "$RUNNER_TEMP"/prebuild-slices/*.tar.gz; do + tar -xzf "$archive" -C packages/react-native/third-party/.build/Build/Products + done - name: Setup Keychain if: ${{ steps.restore-xcframework.outputs.cache-hit != 'true' && env.REACT_ORG_CODE_SIGNING_P12_CERT != '' }} uses: apple-actions/import-codesign-certs@v3 # https://github.com/marketplace/actions/import-code-signing-certificates