Skip to content

Instantly share code, notes, and snippets.

@douglaslassance
Last active February 13, 2023 10:24
Show Gist options
  • Select an option

  • Save douglaslassance/ade4c6c6957ebbf0c02e2e50bbf9922b to your computer and use it in GitHub Desktop.

Select an option

Save douglaslassance/ade4c6c6957ebbf0c02e2e50bbf9922b to your computer and use it in GitHub Desktop.

Revisions

  1. Douglas Lassance revised this gist Jul 30, 2022. 1 changed file with 1 addition and 10 deletions.
    11 changes: 1 addition & 10 deletions generate-installed-build.yml
    Original file line number Diff line number Diff line change
    @@ -13,17 +13,8 @@ jobs:
    SPACES_SECRET: ${{ secrets.SPACES_SECRET }}
    SPACES_ENDPOINT: ${{ secrets.SPACES_ENDPOINT }}
    steps:
    - name: Sparse checkout action
    uses: snow-actions/[email protected]
    - uses: actions/checkout@v2
    with:
    patterns: |
    Binaries
    Build
    Config
    Plugins
    Programs
    Shaders
    Source
    # There is 80 GB on C instead of 14 GB on the default D drive.
    path: C:\UnrealEngine\Engine

  2. Douglas Lassance created this gist Jul 30, 2022.
    62 changes: 62 additions & 0 deletions generate-installed-build.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,62 @@
    name: Generate installed build

    on:
    push:
    branches: [ main ]

    jobs:
    build-and-upload:
    name: Generate installed build
    runs-on: windows-latest
    env:
    SPACES_ACCESS_KEY: ${{ secrets.SPACES_ACCESS_KEY }}
    SPACES_SECRET: ${{ secrets.SPACES_SECRET }}
    SPACES_ENDPOINT: ${{ secrets.SPACES_ENDPOINT }}
    steps:
    - name: Sparse checkout action
    uses: snow-actions/[email protected]
    with:
    patterns: |
    Binaries
    Build
    Config
    Plugins
    Programs
    Shaders
    Source
    # There is 80 GB on C instead of 14 GB on the default D drive.
    path: C:\UnrealEngine\Engine

    - name: Download Rclone
    run: |
    Start-BitsTransfer -Source https://github.com/rclone/rclone/releases/download/v1.55.1/rclone-v1.55.1-windows-amd64.zip
    Expand-Archive rclone-v1.55.1-windows-amd64.zip .
    $env:path = $env:path + ";$env:GITHUB_WORKSPACE\rclone-v1.55.1-windows-amd64"
    rclone --help
    - name: Download dependencies
    run: |
    pushd C:\UnrealEngine\Engine
    .\DownloadDependencies.bat
    popd
    - name: Build engine
    run: |
    pushd C:\UnrealEngine\Engine
    .\GenerateInstalledBuild.bat
    popd
    - name: Upload build
    run: |
    pushd C:\UnrealEngine\Engine
    .\UploadInstalledBuild.bat
    popd
    # Only keeps the build corresponding to the 4 last commits.
    - name: Prune older builds
    run: |
    pushd C:\UnrealEngine\Engine
    $keepers = @((git rev-parse HEAD), (git rev-parse HEAD~1), (git rev-parse HEAD~2), (git rev-parse HEAD~3))
    $env:path = $env:path + ";$env:GITHUB_WORKSPACE\rclone-v1.55.1-windows-amd64"
    rclone delete spaces:/<space_name>/unreal-engine/** --exclude **$keepers[0]** --exclude **$keepers[1]** --exclude **$keepers[2]** --exclude **$keepers[3]**
    popd