Skip to content

Commit

Permalink
Fix cache management to avoid failure in building release version
Browse files Browse the repository at this point in the history
  • Loading branch information
maron2000 committed Mar 4, 2024
1 parent c1b7b7b commit 6f1b985
Showing 1 changed file with 49 additions and 7 deletions.
56 changes: 49 additions & 7 deletions .github/workflows/windows-installers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,18 @@ jobs:
with:
name: dosbox-x-vsbuild-ARM32_64-${{ env.timestamp }}
path: ${{ github.workspace }}/package/
- name: Cache Visual Studio builds
- name: Cache Visual Studio builds (nightly)
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/vs-bin
key: vs-${{ github.sha }}
- name: Cache Visual Studio builds (release)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/vs-bin
key: vs-r-${{ github.sha }}
MinGW32_CI_build:
permissions:
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
Expand All @@ -172,7 +179,7 @@ jobs:
with:
msystem: MINGW32
update: true
install: git mingw-w64-i686-toolchain mingw-w64-i686-libtool mingw-w64-i686-nasm autoconf automake
install: git mingw-w64-i686-toolchain mingw-w64-i686-libtool mingw-w64-i686-nasm autoconf automake mingw-w64-i686-libslirp
- name: Update build info
shell: bash
run: |
Expand Down Expand Up @@ -202,11 +209,18 @@ jobs:
strip -s $top/src/dosbox-x.exe
cp $top/src/dosbox-x.exe $top/package/dosbox-x_MinGWx86_SDL2.exe
cp $top/src/dosbox-x.exe $top/mingw-x86-bin/dosbox-x_MinGWx86_SDL2.exe
- name: Cache MinGW x86 builds
- name: Cache MinGW x86 builds (nightly)
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/mingw-x86-bin
key: mingw-x86-bin-${{ github.sha }}
- name: Cache MinGW x86 builds (release)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/vs-bin
key: mingw-x86-bin-r-${{ github.sha }}
MinGW64_CI_build:
permissions:
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
Expand Down Expand Up @@ -255,11 +269,18 @@ jobs:
strip -s $top/src/dosbox-x.exe
cp $top/src/dosbox-x.exe $top/package/dosbox-x_MinGWx64_SDL2.exe
cp $top/src/dosbox-x.exe $top/mingw-x64-bin/dosbox-x_MinGWx64_SDL2.exe
- name: Cache MinGW x64 builds
- name: Cache MinGW x64 builds (nightly)
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/mingw-x64-bin
key: mingw-x64-bin-${{ github.sha }}
- name: Cache MinGW x64 builds (release)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/vs-bin
key: mingw-x64-bin-r-${{ github.sha }}
Build_Windows_Installer:
permissions:
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
Expand All @@ -273,21 +294,42 @@ jobs:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Restore MinGW x86 builds
- name: Restore MinGW x86 builds (nightly)
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/mingw-x86-bin
key: mingw-x86-bin-${{ github.sha }}
- name: Restore MinGW x64 builds
- name: Restore MinGW x64 builds (nightly)
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/mingw-x64-bin
key: mingw-x64-bin-${{ github.sha }}
- name: Restore Visual Studio builds
- name: Restore Visual Studio builds (nightly)
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/vs-bin
key: vs-${{ github.sha }}
- name: Restore MinGW x86 builds (release)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/mingw-x86-bin
key: mingw-x86-bin-r-${{ github.sha }}
- name: Restore MinGW x64 builds (release)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/mingw-x64-bin
key: mingw-x64-bin-r-${{ github.sha }}
- name: Restore Visual Studio builds (release)
if: ${{ startsWith(github.ref, 'refs/tags/') }}
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/vs-bin
key: vs-r-${{ github.sha }}
- name: Package MinGW builds
run: |
set +e
Expand Down

0 comments on commit 6f1b985

Please sign in to comment.