mirror of https://github.com/OpenTTD/OpenTTD.git
Codechange: [CI] Use runner vcpkg in release-linux workflow
This commit is contained in:
parent
b1f98a79f8
commit
e2c5eb3b65
|
@ -17,6 +17,11 @@ jobs:
|
||||||
# manylinux2014 is based on CentOS 7, but already has a lot of things
|
# manylinux2014 is based on CentOS 7, but already has a lot of things
|
||||||
# installed and preconfigured. It makes it easier to build OpenTTD.
|
# installed and preconfigured. It makes it easier to build OpenTTD.
|
||||||
image: quay.io/pypa/manylinux2014_x86_64
|
image: quay.io/pypa/manylinux2014_x86_64
|
||||||
|
volumes:
|
||||||
|
- /usr/local/share/vcpkg:/vcpkg
|
||||||
|
env:
|
||||||
|
ImageOS: ${{ env.ImageOS }}
|
||||||
|
ImageVersion: ${{ env.ImageVersion }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download source
|
- name: Download source
|
||||||
|
@ -41,13 +46,18 @@ jobs:
|
||||||
- name: Enable Rust cache
|
- name: Enable Rust cache
|
||||||
uses: Swatinem/rust-cache@v2
|
uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
|
- name: Prepare cache key
|
||||||
|
id: key
|
||||||
|
run: |
|
||||||
|
echo "image=$ImageOS-$ImageVersion" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Enable vcpkg cache
|
- name: Enable vcpkg cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: /vcpkg/installed
|
path: /vcpkg/installed
|
||||||
key: ubuntu-20.04-vcpkg-release-1 # Increase the number whenever dependencies are modified
|
key: ${{ steps.key.outputs.image }}-vcpkg-release-1 # Increase the number whenever dependencies are modified
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
ubuntu-20.04-vcpkg-release
|
${{ steps.key.outputs.image }}-vcpkg-release
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
@ -103,40 +113,23 @@ jobs:
|
||||||
# We use vcpkg for our dependencies, to get more up-to-date version.
|
# We use vcpkg for our dependencies, to get more up-to-date version.
|
||||||
echo "::group::Install vcpkg and dependencies"
|
echo "::group::Install vcpkg and dependencies"
|
||||||
|
|
||||||
# We do a little dance to make sure we copy the cached install folder
|
# Make Python3 available for other packages.
|
||||||
# into our new clone.
|
/vcpkg/vcpkg install python3
|
||||||
git clone --depth=1 https://github.com/microsoft/vcpkg /vcpkg-clone
|
ln -sf /vcpkg/installed/x64-linux/tools/python3/python3.[0-9][0-9] /usr/bin/python3
|
||||||
if [ -e /vcpkg/installed ]; then
|
|
||||||
mv /vcpkg/installed /vcpkg-clone/
|
|
||||||
rm -rf /vcpkg
|
|
||||||
fi
|
|
||||||
mv /vcpkg-clone /vcpkg
|
|
||||||
|
|
||||||
(
|
/vcpkg/vcpkg install \
|
||||||
cd /vcpkg
|
breakpad \
|
||||||
./bootstrap-vcpkg.sh -disableMetrics
|
curl[http2] \
|
||||||
|
fontconfig \
|
||||||
# Once installed (and cached) a package will never be upgraded unless we do it ourselves.
|
freetype \
|
||||||
./vcpkg upgrade --no-dry-run
|
harfbuzz \
|
||||||
|
icu \
|
||||||
# Make Python3 available for other packages.
|
liblzma \
|
||||||
./vcpkg install python3
|
libpng \
|
||||||
ln -sf $(pwd)/installed/x64-linux/tools/python3/python3.[0-9][0-9] /usr/bin/python3
|
lzo \
|
||||||
|
sdl2 \
|
||||||
./vcpkg install \
|
zlib \
|
||||||
breakpad \
|
# EOF
|
||||||
curl[http2] \
|
|
||||||
fontconfig \
|
|
||||||
freetype \
|
|
||||||
harfbuzz \
|
|
||||||
icu \
|
|
||||||
liblzma \
|
|
||||||
libpng \
|
|
||||||
lzo \
|
|
||||||
sdl2 \
|
|
||||||
zlib \
|
|
||||||
# EOF
|
|
||||||
)
|
|
||||||
echo "::endgroup::"
|
echo "::endgroup::"
|
||||||
|
|
||||||
echo "::group::Install breakpad dependencies"
|
echo "::group::Install breakpad dependencies"
|
||||||
|
|
Loading…
Reference in New Issue