summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglx22 <glx@openttd.org>2021-02-21 01:03:39 +0100
committerLoïc Guilloux <glx22@users.noreply.github.com>2021-02-24 17:54:24 +0100
commit2fd2950eb538332dec631e645a3e08abd24a5357 (patch)
treec966e6db1d14cca907a8f7732669156d5fb031fd
parent30ae0190952d53f8e261e04b5b4e09efb1fdfd22 (diff)
downloadopenttd-2fd2950eb538332dec631e645a3e08abd24a5357.tar.xz
Change: [Actions] stop using 'run-vcpkg' action for CI
-rw-r--r--.github/workflows/ci-build.yml60
1 files changed, 38 insertions, 22 deletions
diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml
index ebdb06729..b50e84136 100644
--- a/.github/workflows/ci-build.yml
+++ b/.github/workflows/ci-build.yml
@@ -160,14 +160,25 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- - name: Prepare vcpkg (with cache)
- uses: lukka/run-vcpkg@v6
+ - name: Prepare cache key
+ id: key
+ run: |
+ echo "::set-output name=image::$ImageOS-$ImageVersion"
+
+ - name: Enable vcpkg cache
+ uses: actions/cache@v2
with:
- vcpkgDirectory: '/usr/local/share/vcpkg'
- doNotUpdateVcpkg: false
- vcpkgGitCommitId: 2a42024b53ebb512fb5dd63c523338bf26c8489c
- vcpkgArguments: 'liblzma libpng lzo'
- vcpkgTriplet: '${{ matrix.arch }}-osx'
+ path: /usr/local/share/vcpkg/installed
+ key: ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}
+
+ - name: Prepare vcpkg
+ run: |
+ vcpkg install --triplet=${{ matrix.arch }}-osx \
+ liblzma \
+ libpng \
+ lzo \
+ zlib \
+ # EOF
- name: Install OpenGFX
run: |
@@ -225,25 +236,30 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- # "restore-cache" which is done by "run-vcpkg" uses Windows tar.
- # A git clone on windows marks a few files as read-only; when Windows tar
- # tries to extract the cache over this folder, it fails, despite the files
- # being identical. This failure shows up as an warning in the logs. We
- # avoid this by simply removing the read-only mark from the git folder.
- # In other words: this is a hack!
- # See: https://github.com/lukka/run-vcpkg/issues/61
- - name: Remove read-only flag from vcpkg git folder
+ - name: Prepare cache key
+ id: key
shell: powershell
run: |
- attrib -r "c:\vcpkg\.git\*.*" /s
+ # Work around caching failure with GNU tar
+ New-Item -Type Junction -Path vcpkg -Target c:\vcpkg
- - name: Prepare vcpkg (with cache)
- uses: lukka/run-vcpkg@v6
+ Write-Output "::set-output name=image::$env:ImageOS-$env:ImageVersion"
+
+ - name: Enable vcpkg cache
+ uses: actions/cache@v2
with:
- vcpkgDirectory: 'c:/vcpkg'
- doNotUpdateVcpkg: true
- vcpkgArguments: 'liblzma libpng lzo zlib'
- vcpkgTriplet: '${{ matrix.arch }}-windows-static'
+ path: vcpkg/installed
+ key: ${{ steps.key.outputs.image }}-vcpkg-${{ matrix.arch }}
+
+ - name: Prepare vcpkg
+ shell: bash
+ run: |
+ vcpkg install --triplet=${{ matrix.arch }}-windows-static \
+ liblzma \
+ libpng \
+ lzo \
+ zlib \
+ # EOF
- name: Install OpenGFX
shell: bash