Generate and upload artifacts through Github actions workflow. #34
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This file is generated. Do not edit directly. | |
| name: Engine Artifacts | |
| on: | |
| pull_request: | |
| env: | |
| DEPOT_TOOLS_WIN_TOOLCHAIN: 0 | |
| FLUTTER_PREBUILT_DART_SDK: 1 | |
| R2_BUCKET: flutter-zero-engine | |
| ENGINE_CHECKOUT_PATH: ${{ github.workspace }}/engine | |
| jobs: | |
| windows_host_debug: | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: '' | |
| - name: Set up depot_tools | |
| if: runner.os != 'Windows' | |
| run: | | |
| git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $HOME/depot_tools | |
| # Append depot_tools to the PATH for subsequent steps | |
| echo "$HOME/depot_tools" >> $GITHUB_PATH | |
| - name: Set up depot_tools | |
| if: runner.os == 'Windows' | |
| run: | | |
| git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $HOME/depot_tools | |
| # Append depot_tools to the PATH for subsequent steps | |
| DEPOT_TOOLS_WIN=$(cygpath -w "$HOME/depot_tools") | |
| echo "$DEPOT_TOOLS_WIN" >> $GITHUB_PATH | |
| - name: Generate engine content hash | |
| id: engine_content_hash | |
| run: | | |
| engine_content_hash=$(bin/internal/content_aware_hash.sh) | |
| echo "::notice:: Engine content hash: ${engine_content_hash}" | |
| echo "value=${engine_content_hash}" >> $GITHUB_OUTPUT | |
| - name: Copy gclient file | |
| run: | | |
| cp engine/scripts/slim.gclient .gclient | |
| - name: GClient sync | |
| run: | | |
| gclient sync -D --no-history --shallow --with_branch_heads | |
| - name: Build engine | |
| shell: cmd | |
| run: | | |
| cd engine\src | |
| set | |
| flutter\bin\et.bat build --config ci\host_debug | |
| - name: Upload windows-x64/artifacts.zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact_${{ steps.engine_content_hash.outputs.value }}_0 | |
| path: engine/src/out/ci/host_debug/zip_archives/windows-x64/artifacts.zip | |
| retention-days: 1 | |
| - name: Upload windows-x64/windows-x64-embedder.zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact_${{ steps.engine_content_hash.outputs.value }}_1 | |
| path: engine/src/out/ci/host_debug/zip_archives/windows-x64/windows-x64-embedder.zip | |
| retention-days: 1 | |
| - name: Upload windows-x64/font-subset.zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact_${{ steps.engine_content_hash.outputs.value }}_2 | |
| path: engine/src/out/ci/host_debug/zip_archives/windows-x64/font-subset.zip | |
| retention-days: 1 | |
| - name: Upload /dart-sdk-windows-x64.zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact_${{ steps.engine_content_hash.outputs.value }}_3 | |
| path: engine/src/out/ci/host_debug/zip_archives/dart-sdk-windows-x64.zip | |
| retention-days: 1 | |
| - name: Upload windows-x64-debug/windows-x64-flutter.zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact_${{ steps.engine_content_hash.outputs.value }}_4 | |
| path: engine/src/out/ci/host_debug/zip_archives/windows-x64-debug/windows-x64-flutter.zip | |
| retention-days: 1 | |
| - name: Upload windows-x64/flutter-cpp-client-wrapper.zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact_${{ steps.engine_content_hash.outputs.value }}_5 | |
| path: engine/src/out/ci/host_debug/zip_archives/windows-x64/flutter-cpp-client-wrapper.zip | |
| retention-days: 1 | |
| windows_host_profile: | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: '' | |
| - name: Set up depot_tools | |
| if: runner.os != 'Windows' | |
| run: | | |
| git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $HOME/depot_tools | |
| # Append depot_tools to the PATH for subsequent steps | |
| echo "$HOME/depot_tools" >> $GITHUB_PATH | |
| - name: Set up depot_tools | |
| if: runner.os == 'Windows' | |
| run: | | |
| git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $HOME/depot_tools | |
| # Append depot_tools to the PATH for subsequent steps | |
| DEPOT_TOOLS_WIN=$(cygpath -w "$HOME/depot_tools") | |
| echo "$DEPOT_TOOLS_WIN" >> $GITHUB_PATH | |
| - name: Generate engine content hash | |
| id: engine_content_hash | |
| run: | | |
| engine_content_hash=$(bin/internal/content_aware_hash.sh) | |
| echo "::notice:: Engine content hash: ${engine_content_hash}" | |
| echo "value=${engine_content_hash}" >> $GITHUB_OUTPUT | |
| - name: Copy gclient file | |
| run: | | |
| cp engine/scripts/slim.gclient .gclient | |
| - name: GClient sync | |
| run: | | |
| gclient sync -D --no-history --shallow --with_branch_heads | |
| - name: Build engine | |
| shell: cmd | |
| run: | | |
| cd engine\src | |
| set | |
| flutter\bin\et.bat build --config ci\host_profile | |
| - name: Upload windows-x64-profile/windows-x64-flutter.zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact_${{ steps.engine_content_hash.outputs.value }}_6 | |
| path: engine/src/out/ci/host_profile/zip_archives/windows-x64-profile/windows-x64-flutter.zip | |
| retention-days: 1 | |
| windows_host_release: | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: '' | |
| - name: Set up depot_tools | |
| if: runner.os != 'Windows' | |
| run: | | |
| git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $HOME/depot_tools | |
| # Append depot_tools to the PATH for subsequent steps | |
| echo "$HOME/depot_tools" >> $GITHUB_PATH | |
| - name: Set up depot_tools | |
| if: runner.os == 'Windows' | |
| run: | | |
| git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $HOME/depot_tools | |
| # Append depot_tools to the PATH for subsequent steps | |
| DEPOT_TOOLS_WIN=$(cygpath -w "$HOME/depot_tools") | |
| echo "$DEPOT_TOOLS_WIN" >> $GITHUB_PATH | |
| - name: Generate engine content hash | |
| id: engine_content_hash | |
| run: | | |
| engine_content_hash=$(bin/internal/content_aware_hash.sh) | |
| echo "::notice:: Engine content hash: ${engine_content_hash}" | |
| echo "value=${engine_content_hash}" >> $GITHUB_OUTPUT | |
| - name: Copy gclient file | |
| run: | | |
| cp engine/scripts/slim.gclient .gclient | |
| - name: GClient sync | |
| run: | | |
| gclient sync -D --no-history --shallow --with_branch_heads | |
| - name: Build engine | |
| shell: cmd | |
| run: | | |
| cd engine\src | |
| set | |
| flutter\bin\et.bat build --config ci\host_release | |
| - name: Upload windows-x64-release/windows-x64-flutter.zip | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact_${{ steps.engine_content_hash.outputs.value }}_7 | |
| path: engine/src/out/ci/host_release/zip_archives/windows-x64-release/windows-x64-flutter.zip | |
| retention-days: 1 | |
| publish_artifacts: | |
| defaults: | |
| run: | |
| shell: bash | |
| needs: | |
| - windows_host_debug | |
| - windows_host_profile | |
| - windows_host_release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout the repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: '' | |
| - name: Set up depot_tools | |
| run: | | |
| git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $HOME/depot_tools | |
| # Append depot_tools to the PATH for subsequent steps | |
| echo "$HOME/depot_tools" >> $GITHUB_PATH | |
| - name: Generate engine content hash | |
| id: engine_content_hash | |
| run: | | |
| engine_content_hash=$(bin/internal/content_aware_hash.sh) | |
| echo "::notice:: Engine content hash: ${engine_content_hash}" | |
| echo "value=${engine_content_hash}" >> $GITHUB_OUTPUT | |
| - name: Download windows-x64/artifacts.zip | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: artifact_${{ steps.engine_content_hash.outputs.value }}_0 | |
| path: artifact-0/ | |
| - name: Download windows-x64/windows-x64-embedder.zip | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: artifact_${{ steps.engine_content_hash.outputs.value }}_1 | |
| path: artifact-1/ | |
| - name: Download windows-x64/font-subset.zip | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: artifact_${{ steps.engine_content_hash.outputs.value }}_2 | |
| path: artifact-2/ | |
| - name: Download /dart-sdk-windows-x64.zip | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: artifact_${{ steps.engine_content_hash.outputs.value }}_3 | |
| path: artifact-3/ | |
| - name: Download windows-x64-debug/windows-x64-flutter.zip | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: artifact_${{ steps.engine_content_hash.outputs.value }}_4 | |
| path: artifact-4/ | |
| - name: Download windows-x64/flutter-cpp-client-wrapper.zip | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: artifact_${{ steps.engine_content_hash.outputs.value }}_5 | |
| path: artifact-5/ | |
| - name: Download windows-x64-profile/windows-x64-flutter.zip | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: artifact_${{ steps.engine_content_hash.outputs.value }}_6 | |
| path: artifact-6/ | |
| - name: Download windows-x64-release/windows-x64-flutter.zip | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: artifact_${{ steps.engine_content_hash.outputs.value }}_7 | |
| path: artifact-7/ | |
| - name: Publish windows-x64/artifacts.zip | |
| uses: ryand56/r2-upload-action@b801a390acbdeb034c5e684ff5e1361c06639e7c | |
| with: | |
| r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} | |
| r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} | |
| r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| r2-bucket: ${{ env.R2_BUCKET }} | |
| source-dir: artifact-0/ | |
| destination-dir: ${{ steps.engine_content_hash.outputs.value }}/windows-x64 | |
| - name: Publish windows-x64/windows-x64-embedder.zip | |
| uses: ryand56/r2-upload-action@b801a390acbdeb034c5e684ff5e1361c06639e7c | |
| with: | |
| r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} | |
| r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} | |
| r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| r2-bucket: ${{ env.R2_BUCKET }} | |
| source-dir: artifact-1/ | |
| destination-dir: ${{ steps.engine_content_hash.outputs.value }}/windows-x64 | |
| - name: Publish windows-x64/font-subset.zip | |
| uses: ryand56/r2-upload-action@b801a390acbdeb034c5e684ff5e1361c06639e7c | |
| with: | |
| r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} | |
| r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} | |
| r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| r2-bucket: ${{ env.R2_BUCKET }} | |
| source-dir: artifact-2/ | |
| destination-dir: ${{ steps.engine_content_hash.outputs.value }}/windows-x64 | |
| - name: Publish /dart-sdk-windows-x64.zip | |
| uses: ryand56/r2-upload-action@b801a390acbdeb034c5e684ff5e1361c06639e7c | |
| with: | |
| r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} | |
| r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} | |
| r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| r2-bucket: ${{ env.R2_BUCKET }} | |
| source-dir: artifact-3/ | |
| destination-dir: ${{ steps.engine_content_hash.outputs.value }}/ | |
| - name: Publish windows-x64-debug/windows-x64-flutter.zip | |
| uses: ryand56/r2-upload-action@b801a390acbdeb034c5e684ff5e1361c06639e7c | |
| with: | |
| r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} | |
| r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} | |
| r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| r2-bucket: ${{ env.R2_BUCKET }} | |
| source-dir: artifact-4/ | |
| destination-dir: ${{ steps.engine_content_hash.outputs.value }}/windows-x64-debug | |
| - name: Publish windows-x64/flutter-cpp-client-wrapper.zip | |
| uses: ryand56/r2-upload-action@b801a390acbdeb034c5e684ff5e1361c06639e7c | |
| with: | |
| r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} | |
| r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} | |
| r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| r2-bucket: ${{ env.R2_BUCKET }} | |
| source-dir: artifact-5/ | |
| destination-dir: ${{ steps.engine_content_hash.outputs.value }}/windows-x64 | |
| - name: Publish windows-x64-profile/windows-x64-flutter.zip | |
| uses: ryand56/r2-upload-action@b801a390acbdeb034c5e684ff5e1361c06639e7c | |
| with: | |
| r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} | |
| r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} | |
| r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| r2-bucket: ${{ env.R2_BUCKET }} | |
| source-dir: artifact-6/ | |
| destination-dir: ${{ steps.engine_content_hash.outputs.value }}/windows-x64-profile | |
| - name: Publish windows-x64-release/windows-x64-flutter.zip | |
| uses: ryand56/r2-upload-action@b801a390acbdeb034c5e684ff5e1361c06639e7c | |
| with: | |
| r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} | |
| r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} | |
| r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} | |
| r2-bucket: ${{ env.R2_BUCKET }} | |
| source-dir: artifact-7/ | |
| destination-dir: ${{ steps.engine_content_hash.outputs.value }}/windows-x64-release |