mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
CI: Skip "Download SDL" step instead of using Test-Path, use cache@v3
For some reason, this test takes a dozen seconds or more. Maybe because it needs to boot up powershell or something like that? No idea, but it's just sitting there. The cache action has a return value that indicates whether there was a cache hit, so there's no need to use Test-Path, saving CI time. EDIT: Maybe the SDL cache hasn't ever been working. It seems to cache 30 bytes (huh?) and the folder it caches is C:\SDL, not C:\SDL2-2.24.0 as the folder would look like. So it was probably downloading SDL every time anyway? Also, I upgraded the cache@v2 action to cache@v3. I added a cache@v3 myself and noticed this was still using cache@v2, so I figured, why not future-proof it? And that's when I notice this warning: "Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/cache@v2." So it's pretty good timing.
This commit is contained in:
parent
0961084ff9
commit
62449dfa9a
1 changed files with 8 additions and 9 deletions
13
.github/workflows/ci.yml
vendored
13
.github/workflows/ci.yml
vendored
|
@ -125,20 +125,19 @@ jobs:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Cache SDL
|
- name: Cache SDL
|
||||||
uses: actions/cache@v2
|
id: cache-windows-sdl
|
||||||
|
uses: actions/cache@v3
|
||||||
env:
|
env:
|
||||||
cache-name: cache-sdl
|
cache-name: cache-sdl
|
||||||
with:
|
with:
|
||||||
path: C:\SDL
|
path: C:\SDL2-*
|
||||||
key: ${{ runner.os }}-build-${{ env.cache-name }}
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.SDL_VERSION }}
|
||||||
|
|
||||||
- name: Download SDL if not cached
|
- if: ${{ steps.cache-windows-sdl.outputs.cache-hit != 'true' }}
|
||||||
|
name: Download SDL if not cached
|
||||||
run: |
|
run: |
|
||||||
if (-Not (Test-Path C:\SDL))
|
|
||||||
{
|
|
||||||
Invoke-WebRequest "https://github.com/libsdl-org/SDL/releases/download/release-$env:SDL_VERSION/SDL2-devel-$env:SDL_VERSION-VC.zip" -o C:\SDL.zip
|
Invoke-WebRequest "https://github.com/libsdl-org/SDL/releases/download/release-$env:SDL_VERSION/SDL2-devel-$env:SDL_VERSION-VC.zip" -o C:\SDL.zip
|
||||||
Expand-Archive C:\SDL.zip -DestinationPath C:\
|
Expand-Archive C:\SDL.zip -DestinationPath C:\
|
||||||
}
|
|
||||||
|
|
||||||
- name: CMake configure (default version)
|
- name: CMake configure (default version)
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Reference in a new issue