mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-29 04:42:18 -05:00
Moar caching (#3896)
This commit is contained in:
parent
8cac9b4264
commit
83da5ee677
117
.github/workflows/generate-builds.yml
vendored
117
.github/workflows/generate-builds.yml
vendored
@ -13,20 +13,35 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: ccache
|
- name: ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2
|
uses: hendrikmuhs/ccache-action@v1.2.11
|
||||||
with:
|
with:
|
||||||
key: ${{ runner.os }}-soh-otr-ccache
|
key: ${{ runner.os }}-otr-ccache-${{ github.ref }}-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-otr-ccache-${{ github.ref }}
|
||||||
|
${{ runner.os }}-otr-ccache-
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
if: ${{ !vars.LINUX_RUNNER }}
|
if: ${{ !vars.LINUX_RUNNER }}
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y $(cat .github/workflows/apt-deps.txt)
|
sudo apt-get install -y $(cat .github/workflows/apt-deps.txt)
|
||||||
|
- name: Cache build folders
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
key: ${{ runner.os }}-otr-build-${{ github.ref }}-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-otr-build-${{ github.ref }}
|
||||||
|
${{ runner.os }}-otr-build-
|
||||||
|
path: |
|
||||||
|
build-cmake
|
||||||
|
SDL2-2.28.5
|
||||||
- name: Install latest SDL
|
- name: Install latest SDL
|
||||||
if: ${{ !vars.LINUX_RUNNER }}
|
if: ${{ !vars.LINUX_RUNNER }}
|
||||||
run: |
|
run: |
|
||||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||||
wget https://www.libsdl.org/release/SDL2-2.28.5.tar.gz
|
if [ ! -d "SDL2-2.28.5" ]; then
|
||||||
tar -xzf SDL2-2.28.5.tar.gz
|
wget https://www.libsdl.org/release/SDL2-2.28.5.tar.gz
|
||||||
|
tar -xzf SDL2-2.28.5.tar.gz
|
||||||
|
fi
|
||||||
cd SDL2-2.28.5
|
cd SDL2-2.28.5
|
||||||
./configure --enable-hidapi-libusb
|
./configure --enable-hidapi-libusb
|
||||||
make -j 10
|
make -j 10
|
||||||
@ -37,7 +52,7 @@ jobs:
|
|||||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||||
cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release
|
cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release
|
||||||
cmake --build build-cmake --config Release --target GenerateSohOtr
|
cmake --build build-cmake --config Release --target GenerateSohOtr
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: soh.otr
|
name: soh.otr
|
||||||
path: soh.otr
|
path: soh.otr
|
||||||
@ -50,9 +65,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: ccache
|
- name: ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2
|
uses: hendrikmuhs/ccache-action@v1.2.11
|
||||||
with:
|
with:
|
||||||
key: ${{ runner.os }}-ccache
|
key: ${{ runner.os }}-ccache-${{ github.ref }}-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-ccache-${{ github.ref }}
|
||||||
|
${{ runner.os }}-ccache-
|
||||||
- name: Install gtar wrapper
|
- name: Install gtar wrapper
|
||||||
if: ${{ !vars.MAC_RUNNER }}
|
if: ${{ !vars.MAC_RUNNER }}
|
||||||
run: |
|
run: |
|
||||||
@ -85,7 +103,7 @@ jobs:
|
|||||||
sudo port install $(cat .github/workflows/macports-deps.txt)
|
sudo port install $(cat .github/workflows/macports-deps.txt)
|
||||||
brew install ninja
|
brew install ninja
|
||||||
- name: Download soh.otr
|
- name: Download soh.otr
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: soh.otr
|
name: soh.otr
|
||||||
- name: Build SoH
|
- name: Build SoH
|
||||||
@ -99,7 +117,7 @@ jobs:
|
|||||||
mv _packages/*.dmg SoH.dmg
|
mv _packages/*.dmg SoH.dmg
|
||||||
mv README.md readme.txt
|
mv README.md readme.txt
|
||||||
- name: Upload build
|
- name: Upload build
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: soh-mac
|
name: soh-mac
|
||||||
path: |
|
path: |
|
||||||
@ -128,15 +146,30 @@ jobs:
|
|||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y $(cat .github/workflows/apt-deps.txt)
|
sudo apt-get install -y $(cat .github/workflows/apt-deps.txt)
|
||||||
- name: ccache
|
- name: ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2
|
uses: hendrikmuhs/ccache-action@v1.2.11
|
||||||
with:
|
with:
|
||||||
key: ${{ matrix.os }}-ccache
|
key: ${{ matrix.os }}-ccache-${{ github.ref }}-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ matrix.os }}-ccache-${{ github.ref }}
|
||||||
|
${{ matrix.os }}-ccache-
|
||||||
|
- name: Cache build folders
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
key: ${{ matrix.os }}-build-${{ github.ref }}-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ matrix.os }}-build-${{ github.ref }}
|
||||||
|
${{ matrix.os }}-build-
|
||||||
|
path: |
|
||||||
|
SDL2-2.28.5
|
||||||
|
SDL2_net-2.2.0
|
||||||
- name: Install latest SDL
|
- name: Install latest SDL
|
||||||
if: ${{ (matrix.os == 'ubuntu-20.04' && !vars.LINUX_COMPATIBILITY_RUNNER) || (matrix.os == 'ubuntu-22.04' && !vars.LINUX_PERFORMANCE_RUNNER) }}
|
if: ${{ (matrix.os == 'ubuntu-20.04' && !vars.LINUX_COMPATIBILITY_RUNNER) || (matrix.os == 'ubuntu-22.04' && !vars.LINUX_PERFORMANCE_RUNNER) }}
|
||||||
run: |
|
run: |
|
||||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||||
wget https://www.libsdl.org/release/SDL2-2.28.5.tar.gz
|
if [ ! -d "SDL2-2.28.5" ]; then
|
||||||
tar -xzf SDL2-2.28.5.tar.gz
|
wget https://www.libsdl.org/release/SDL2-2.28.5.tar.gz
|
||||||
|
tar -xzf SDL2-2.28.5.tar.gz
|
||||||
|
fi
|
||||||
cd SDL2-2.28.5
|
cd SDL2-2.28.5
|
||||||
./configure --enable-hidapi-libusb
|
./configure --enable-hidapi-libusb
|
||||||
make -j 10
|
make -j 10
|
||||||
@ -146,15 +179,17 @@ jobs:
|
|||||||
if: ${{ (matrix.os == 'ubuntu-20.04' && !vars.LINUX_COMPATIBILITY_RUNNER) || (matrix.os == 'ubuntu-22.04' && !vars.LINUX_PERFORMANCE_RUNNER) }}
|
if: ${{ (matrix.os == 'ubuntu-20.04' && !vars.LINUX_COMPATIBILITY_RUNNER) || (matrix.os == 'ubuntu-22.04' && !vars.LINUX_PERFORMANCE_RUNNER) }}
|
||||||
run: |
|
run: |
|
||||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||||
wget https://www.libsdl.org/projects/SDL_net/release/SDL2_net-2.2.0.tar.gz
|
if [ ! -d "SDL2_net-2.2.0" ]; then
|
||||||
tar -xzf SDL2_net-2.2.0.tar.gz
|
wget https://www.libsdl.org/projects/SDL_net/release/SDL2_net-2.2.0.tar.gz
|
||||||
|
tar -xzf SDL2_net-2.2.0.tar.gz
|
||||||
|
fi
|
||||||
cd SDL2_net-2.2.0
|
cd SDL2_net-2.2.0
|
||||||
./configure
|
./configure
|
||||||
make -j 10
|
make -j 10
|
||||||
sudo make install
|
sudo make install
|
||||||
sudo cp -av /usr/local/lib/libSDL* /lib/x86_64-linux-gnu/
|
sudo cp -av /usr/local/lib/libSDL* /lib/x86_64-linux-gnu/
|
||||||
- name: Download soh.otr
|
- name: Download soh.otr
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: soh.otr
|
name: soh.otr
|
||||||
- name: Build SoH
|
- name: Build SoH
|
||||||
@ -170,7 +205,7 @@ jobs:
|
|||||||
CC: gcc-${{ matrix.gcc }}
|
CC: gcc-${{ matrix.gcc }}
|
||||||
CXX: g++-${{ matrix.gcc }}
|
CXX: g++-${{ matrix.gcc }}
|
||||||
- name: Upload build
|
- name: Upload build
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: soh-linux-${{ matrix.archive-suffix }}
|
name: soh-linux-${{ matrix.archive-suffix }}
|
||||||
path: |
|
path: |
|
||||||
@ -193,9 +228,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: ccache
|
- name: ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2
|
uses: hendrikmuhs/ccache-action@v1.2.11
|
||||||
with:
|
with:
|
||||||
key: ${{ runner.os }}-switch-ccache
|
key: ${{ runner.os }}-switch-ccache-${{ github.ref }}-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-switch-ccache-${{ github.ref }}
|
||||||
|
${{ runner.os }}-switch-ccache-
|
||||||
- name: Build SoH
|
- name: Build SoH
|
||||||
run: |
|
run: |
|
||||||
cmake -H. -Bbuild-switch -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache
|
cmake -H. -Bbuild-switch -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/Switch.cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache
|
||||||
@ -204,11 +242,11 @@ jobs:
|
|||||||
mv build-switch/soh/*.nro soh.nro
|
mv build-switch/soh/*.nro soh.nro
|
||||||
mv README.md readme.txt
|
mv README.md readme.txt
|
||||||
- name: Download soh.otr
|
- name: Download soh.otr
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: soh.otr
|
name: soh.otr
|
||||||
- name: Upload build
|
- name: Upload build
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: soh-switch
|
name: soh-switch
|
||||||
path: |
|
path: |
|
||||||
@ -230,9 +268,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: ccache
|
- name: ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2
|
uses: hendrikmuhs/ccache-action@v1.2.11
|
||||||
with:
|
with:
|
||||||
key: ${{ runner.os }}-wiiu-ccache
|
key: ${{ runner.os }}-wiiu-ccache-${{ github.ref }}-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-wiiu-ccache-${{ github.ref }}
|
||||||
|
${{ runner.os }}-wiiu-ccache-
|
||||||
- name: Build SoH
|
- name: Build SoH
|
||||||
run: |
|
run: |
|
||||||
cmake -H. -Bbuild-wiiu -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/WiiU.cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache
|
cmake -H. -Bbuild-wiiu -GNinja -DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/WiiU.cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache
|
||||||
@ -245,11 +286,11 @@ jobs:
|
|||||||
DEVKITPRO: /opt/devkitpro
|
DEVKITPRO: /opt/devkitpro
|
||||||
DEVKITPPC: /opt/devkitpro/devkitPPC
|
DEVKITPPC: /opt/devkitpro/devkitPPC
|
||||||
- name: Download soh.otr
|
- name: Download soh.otr
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: soh.otr
|
name: soh.otr
|
||||||
- name: Upload build
|
- name: Upload build
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: soh-wiiu
|
name: soh-wiiu
|
||||||
path: |
|
path: |
|
||||||
@ -270,17 +311,25 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: ccache
|
- name: ccache
|
||||||
uses: hendrikmuhs/ccache-action@v1.2
|
uses: hendrikmuhs/ccache-action@v1.2.11
|
||||||
with:
|
with:
|
||||||
key: ${{ runner.os }}-ccache
|
|
||||||
variant: sccache
|
variant: sccache
|
||||||
max-size: "1G"
|
max-size: "1G"
|
||||||
- name: vcpkg
|
key: ${{ runner.os }}-ccache-${{ github.ref }}-${{ github.sha }}
|
||||||
uses: johnwason/vcpkg-action@v5
|
restore-keys: |
|
||||||
|
${{ runner.os }}-ccache-${{ github.ref }}
|
||||||
|
${{ runner.os }}-ccache-
|
||||||
|
- name: Cache build folder
|
||||||
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
pkgs: zlib bzip2 libpng sdl2 sdl2-net glew glfw3
|
save-always: true
|
||||||
token: ${{ github.token }}
|
key: ${{ runner.os }}-build-${{ github.ref }}-${{ github.sha }}
|
||||||
triplet: 'x64-windows-static'
|
restore-keys: |
|
||||||
|
${{ runner.os }}-build-${{ github.ref }}
|
||||||
|
${{ runner.os }}-build-
|
||||||
|
path: |
|
||||||
|
build-windows
|
||||||
|
vcpkg
|
||||||
- name: Configure Developer Command Prompt
|
- name: Configure Developer Command Prompt
|
||||||
uses: ilammy/msvc-dev-cmd@v1
|
uses: ilammy/msvc-dev-cmd@v1
|
||||||
- name: Build SoH
|
- name: Build SoH
|
||||||
@ -301,12 +350,12 @@ jobs:
|
|||||||
mv ./build-windows/gamecontrollerdb.txt ./soh-windows/gamecontrollerdb.txt
|
mv ./build-windows/gamecontrollerdb.txt ./soh-windows/gamecontrollerdb.txt
|
||||||
mv ./x64/Release/assets ./soh-windows
|
mv ./x64/Release/assets ./soh-windows
|
||||||
- name: Download soh.otr
|
- name: Download soh.otr
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: soh.otr
|
name: soh.otr
|
||||||
path: soh-windows
|
path: soh-windows
|
||||||
- name: Upload build
|
- name: Upload build
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: soh-windows
|
name: soh-windows
|
||||||
path: soh-windows
|
path: soh-windows
|
||||||
|
Loading…
Reference in New Issue
Block a user