Skip to content

Commit

Permalink
ci: Cache all Studio builds from Linux machines
Browse files Browse the repository at this point in the history
  • Loading branch information
psyGamer committed Jan 26, 2025
1 parent 7affe8d commit 540a553
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 20 deletions.
33 changes: 13 additions & 20 deletions .github/workflows/Build.CelesteStudio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ on:
required: true
type: string
default: Release
outputs:
windows_cache_key:
value: ${{ jobs.cache.outputs.windows_cache_key }}
linux_cache_key:
value: ${{ jobs.cache.outputs.linux_cache_key }}
macos_cache_key:
value: ${{ jobs.cache.outputs.macos_cache_key }}
windows_cache_hit:
value: ${{ jobs.cache.outputs.windows_cache_hit }}
linux_cache_hit:
value: ${{ jobs.cache.outputs.linux_cache_hit }}
macos_cache_hit:
value: ${{ jobs.cache.outputs.macos_cache_hit }}

jobs:
cache:
Expand Down Expand Up @@ -122,12 +135,6 @@ jobs:
Compress-Archive -Destination ../CelesteStudio-windows-x64.zip -Path **
Pop-Location
- name: Cache build
uses: actions/cache/save@v4
with:
path: CelesteStudio-windows-x64.zip
key: ${{ needs.cache.outputs.windows_cache_key }}

- name: Upload x64
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -180,12 +187,6 @@ jobs:
zip -r ../CelesteStudio-linux-x64.zip **
popd
- name: Cache build
uses: actions/cache/save@v4
with:
path: CelesteStudio-linux-x64.zip
key: ${{ needs.cache.outputs.linux_cache_key }}

- name: Upload x64
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -261,14 +262,6 @@ jobs:
zip -r ../CelesteStudio-macos-arm64.zip CelesteStudio.app
popd
- name: Cache build
uses: actions/cache/save@v4
with:
path: |
CelesteStudio-macos-x64.zip
CelesteStudio-macos-arm64.zip
key: ${{ needs.cache.outputs.macos_cache_key }}

- name: Upload x64
uses: actions/upload-artifact@v4
with:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,27 @@ jobs:
mv CelesteStudio-macos-x64/CelesteStudio-macos-x64.zip .
mv CelesteStudio-macos-arm64/CelesteStudio-macos-arm64.zip .
- name: Cache Windows build
if: ${{ needs.build-studio.outputs.windows_cache_hit != 'true' }}
uses: actions/cache/save@v4
with:
path: CelesteStudio-windows-x64.zip
key: ${{ needs.build-studio.outputs.windows_cache_key }}
- name: Cache Linux build
if: ${{ needs.build-studio.outputs.linux_cache_hit != 'true' }}
uses: actions/cache/save@v4
with:
path: CelesteStudio-linux-x64.zip
key: ${{ needs.build-studio.outputs.linux_cache_key }}
- name: Cache macOS build
if: ${{ needs.build-studio.outputs.macos_cache_hit != 'true' }}
uses: actions/cache/save@v4
with:
path: |
CelesteStudio-macos-x64.zip
CelesteStudio-macos-arm64.zip
key: ${{ needs.build-studio.outputs.macos_cache_key }}

- name: Fill-in download info
run: |
sed -i "s\\false; //DOUBLE_ZIP_ARCHIVE\\true;\\" CelesteTAS-EverestInterop/Source/EverestInterop/StudioHelper.cs
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,27 @@ jobs:
mv CelesteStudio-macos-x64/CelesteStudio-macos-x64.zip .
mv CelesteStudio-macos-arm64/CelesteStudio-macos-arm64.zip .
- name: Cache Windows build
if: ${{ needs.build-studio.outputs.windows_cache_hit != 'true' }}
uses: actions/cache/save@v4
with:
path: CelesteStudio-windows-x64.zip
key: ${{ needs.build-studio.outputs.windows_cache_key }}
- name: Cache Linux build
if: ${{ needs.build-studio.outputs.linux_cache_hit != 'true' }}
uses: actions/cache/save@v4
with:
path: CelesteStudio-linux-x64.zip
key: ${{ needs.build-studio.outputs.linux_cache_key }}
- name: Cache macOS build
if: ${{ needs.build-studio.outputs.macos_cache_hit != 'true' }}
uses: actions/cache/save@v4
with:
path: |
CelesteStudio-macos-x64.zip
CelesteStudio-macos-arm64.zip
key: ${{ needs.build-studio.outputs.macos_cache_key }}

- name: Fill-in download info
run: |
sed -i "s\\false; //DOUBLE_ZIP_ARCHIVE\\false;\\" CelesteTAS-EverestInterop/Source/EverestInterop/StudioHelper.cs
Expand Down

0 comments on commit 540a553

Please sign in to comment.