Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/validate-external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
${{ github.event_name == 'pull_request_target' &&
github.event.pull_request.head.repo.full_name != github.repository &&
'external' || 'internal' }}
runs-on: ubuntu-24.04
runs-on: ubuntu-26.04
steps:
- run: echo ✓
build:
Expand Down
130 changes: 68 additions & 62 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,27 @@ concurrency:

jobs:
build-linux:
name: Build Linux
runs-on: ubuntu-24.04
name: Build Linux (${{ matrix.arch.name }}, ${{ matrix.preset }})
runs-on: ${{ matrix.arch.runner }}
strategy:
matrix:
arch: [
{ "name": "x86_64", "runner": "ubuntu-26.04" },
{ "name": "arm64", "runner": "ubuntu-26.04-arm" },
]
preset: ["linux-debug", "linux-release", "linux-relwithdebinfo"]
env:
LLVM_VERSION: 18
CMAKE_PRESET: ${{ matrix.preset }}

steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
submodules: recursive

- name: Checkout Private Repository
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
repository: ${{ secrets.ASSET_REPO }}
token: ${{ secrets.ASSET_REPO_TOKEN }}
Expand All @@ -37,91 +41,97 @@ jobs:
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ccache-${{ runner.os }}-${{ matrix.preset }}
key: ccache-${{ runner.os }}-${{ matrix.arch.name }}-${{ matrix.preset }}

- name: Cache vcpkg
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: |
./thirdparty/vcpkg/downloads
./thirdparty/vcpkg/packages
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
key: vcpkg-${{ runner.os }}-${{ matrix.arch.name }}-${{ hashFiles('vcpkg.json') }}
restore-keys: |
vcpkg-${{ runner.os }}-
vcpkg-${{ runner.os }}-${{ matrix.arch.name }}-
- name: Install Dependencies (Linux)
run: |-
sudo apt update
sudo apt install -y ninja-build llvm-${{ env.LLVM_VERSION }}-dev libgtk-3-dev libasound2-dev libpulse-dev libpipewire-0.3-dev
- name: Cache ccache Directory
uses: actions/cache@v4
with:
path: /tmp/ccache
key: ccache-${{ runner.os }}-${{ matrix.preset }}

- name: Prepare Project
run: cp ./private/* ./UnleashedRecompLib/private

- name: Configure Project
env:
CCACHE_DIR: /tmp/ccache
run: cmake . --preset ${{ env.CMAKE_PRESET }} -DSDL2MIXER_VORBIS=VORBISFILE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache

- name: Build Project
env:
CCACHE_DIR: /tmp/ccache
run: cmake --build ./out/build/${{ env.CMAKE_PRESET }} --target UnleashedRecomp

- name: Upload Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: UnleashedRecomp-Linux-${{ env.CMAKE_PRESET }}
name: UnleashedRecomp-Linux-${{ matrix.arch.name }}-${{ env.CMAKE_PRESET }}
path: ./out/build/${{ env.CMAKE_PRESET }}/UnleashedRecomp/UnleashedRecomp
build-windows:
name: Build Windows
runs-on: windows-latest
name: Build Windows (${{ matrix.preset.name }})
runs-on: ${{ matrix.preset.runner }}
strategy:
matrix:
preset: ["x64-Clang-Debug", "x64-Clang-Release", "x64-Clang-RelWithDebInfo"]
preset: [
{"name": "x64-Clang-Debug", "arch": "x64", "runner": "windows-latest"},
{"name": "x64-Clang-Release", "arch": "x64", "runner": "windows-latest"},
{"name": "x64-Clang-RelWithDebInfo", "arch": "x64", "runner": "windows-latest"},
{"name": "arm64-Clang-Debug", "arch": "arm64", "runner": "windows-11-arm"},
{"name": "arm64-Clang-Release", "arch": "arm64", "runner": "windows-11-arm"},
{"name": "arm64-Clang-RelWithDebInfo", "arch": "arm64", "runner": "windows-11-arm"},
]
env:
CMAKE_PRESET: ${{ matrix.preset }}
CMAKE_PRESET: ${{ matrix.preset.name }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
submodules: recursive

- name: Checkout private repository
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
repository: ${{ secrets.ASSET_REPO }}
token: ${{ secrets.ASSET_REPO_TOKEN }}
path: .\private

- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ccache-${{ runner.os }}-${{ matrix.preset }}
# Disabled: Breaks with pre-compiled headers
#- name: Setup ccache
# uses: hendrikmuhs/ccache-action@v1.2
# with:
# key: ccache-${{ runner.os }}-${{ matrix.preset.name }}

- name: Cache vcpkg
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: |
./thirdparty/vcpkg/downloads
./thirdparty/vcpkg/packages
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
key: vcpkg-${{ runner.os }}-${{ matrix.preset.arch }}-${{ hashFiles('vcpkg.json') }}
restore-keys: |
vcpkg-${{ runner.os }}-
vcpkg-${{ runner.os }}-${{ matrix.preset.arch }}-
- name: Install dependencies
run: |
choco install ninja
Remove-Item -Path "C:\ProgramData\Chocolatey\bin\ccache.exe" -Force -ErrorAction SilentlyContinue
- name: Configure Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
uses: TheMrMilchmann/setup-msvc-dev@v4
with:
arch: ${{ matrix.preset.arch }}

- name: Configure Visual Studio LLVM
run: |
$llvm = "$env:VCINSTALLDIR\Tools\Llvm\${{ matrix.preset.arch }}\bin"
"Path=$llvm;$env:Path" >> $env:GITHUB_ENV
& "$llvm\clang-cl.exe" --version
- name: Prepare Project
run: |
Expand All @@ -130,7 +140,8 @@ jobs:
copy .\private\* .\UnleashedRecompLib\private
- name: Configure Project
run: cmake . --preset ${{ env.CMAKE_PRESET }} -DSDL2MIXER_VORBIS=VORBISFILE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache
run: cmake . --preset ${{ env.CMAKE_PRESET }} -DSDL2MIXER_VORBIS=VORBISFILE
# -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache

- name: Build Project
run: cmake --build .\out\build\${{ env.CMAKE_PRESET }} --target UnleashedRecomp
Expand All @@ -146,31 +157,38 @@ jobs:
Move-Item -Path ".\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\UnleashedRecomp.exe" -Destination ".\release\UnleashedRecomp.exe"
- name: Upload Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: UnleashedRecomp-Windows-${{ env.CMAKE_PRESET }}
path: .\release

- name: Upload PDB
uses: actions/upload-artifact@v4
if: ${{ matrix.preset != 'x64-Clang-Release' }}
uses: actions/upload-artifact@v7
if: ${{ (matrix.preset.name != 'x64-Clang-Release') && (matrix.preset.name != 'arm64-Clang-Release') }}
with:
name: UnleashedRecomp-Windows-${{ env.CMAKE_PRESET }}-PDB
path: .\out\build\${{ env.CMAKE_PRESET }}\UnleashedRecomp\UnleashedRecomp.pdb
build-flatpak:
name: Build Flatpak
runs-on: ubuntu-24.04
name: Build Flatpak (${{ matrix.arch.name }})
runs-on: ${{ matrix.arch.runner }}
strategy:
matrix:
arch: [
{"name": "x86_64", "runner": "ubuntu-26.04"},
{"name": "arm64", "runner": "ubuntu-26.04-arm"},
]
env:
FLATPAK_ID: io.github.hedge_dev.unleashedrecomp
CCACHE_DIR: /tmp/ccache

steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
submodules: recursive

- name: Checkout Private Repository
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
repository: ${{ secrets.ASSET_REPO }}
token: ${{ secrets.ASSET_REPO_TOKEN }}
Expand All @@ -182,10 +200,9 @@ jobs:
sudo apt install -y flatpak-builder ccache
- name: Setup ccache
uses: actions/cache@v4
uses: hendrikmuhs/ccache-action@v1.2
with:
path: /tmp/ccache
key: ccache-${{ runner.os }}
key: ccache-${{ runner.os }}-${{ matrix.arch.name }}-flatpak

- name: Prepare Project
run: cp ./private/* ./UnleashedRecompLib/private
Expand All @@ -197,14 +214,13 @@ jobs:
- name: Build Flatpak
run: |
echo "commit_message=$(git log -1 --pretty=%s)" >> $GITHUB_ENV
export CCACHE_DIR=/tmp/ccache
flatpak-builder --user --force-clean --install-deps-from=flathub --repo=repo --ccache builddir ./flatpak/${{ env.FLATPAK_ID }}.json
flatpak build-bundle repo ./${{ env.FLATPAK_ID }}.flatpak ${{ env.FLATPAK_ID }} --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
- name: Upload Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: UnleashedRecomp-Flatpak
name: UnleashedRecomp-Flatpak-${{ matrix.arch.name }}
path: ./${{ env.FLATPAK_ID }}.flatpak
build-macos:
name: Build macOS
Expand All @@ -218,12 +234,12 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
submodules: recursive

- name: Checkout Private Repository
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
repository: ${{ secrets.ASSET_REPO }}
token: ${{ secrets.ASSET_REPO_TOKEN }}
Expand All @@ -240,7 +256,7 @@ jobs:
key: ccache-${{ runner.os }}-${{ matrix.arch }}-${{ matrix.preset }}

- name: Cache vcpkg
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: |
./thirdparty/vcpkg/downloads
Expand All @@ -253,24 +269,14 @@ jobs:
run: |
brew install ninja
- name: Cache ccache Directory
uses: actions/cache@v4
with:
path: /tmp/ccache
key: ccache-${{ runner.os }}-${{ matrix.arch }}-${{ matrix.preset }}

- name: Prepare Project
run: |
cp ./private/* ./UnleashedRecompLib/private
- name: Configure Project
env:
CCACHE_DIR: /tmp/ccache
run: cmake . --preset ${{ env.CMAKE_PRESET }} -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} -DSDL2MIXER_VORBIS=VORBISFILE -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache

- name: Build Project
env:
CCACHE_DIR: /tmp/ccache
run: cmake --build ./out/build/${{ env.CMAKE_PRESET }} --target UnleashedRecomp

- name: Pack Release
Expand All @@ -279,7 +285,7 @@ jobs:
tar -czf UnleashedRecomp-macOS-${{ matrix.arch }}-${{ env.CMAKE_PRESET }}.tar.gz -C ./out/build/${{ env.CMAKE_PRESET }}/UnleashedRecomp "Unleashed Recompiled.app"
- name: Upload Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: UnleashedRecomp-macOS-${{ matrix.arch }}-${{ env.CMAKE_PRESET }}
path: UnleashedRecomp-macOS-${{ matrix.arch }}-${{ env.CMAKE_PRESET }}.tar.gz
43 changes: 36 additions & 7 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
{
"name": "x64-Clang-Debug",
"displayName": "Debug",
"displayName": "Debug (x64)",
"inherits": "windows-base",
"architecture": {
"value": "x64",
Expand All @@ -43,21 +43,54 @@
},
{
"name": "x64-Clang-RelWithDebInfo",
"displayName": "RelWithDebInfo",
"displayName": "RelWithDebInfo (x64)",
"inherits": "x64-Clang-Debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "x64-Clang-Release",
"displayName": "Release",
"displayName": "Release (x64)",
"inherits": "x64-Clang-Debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": true
}
},
{
"name": "arm64-Clang-Debug",
"displayName": "Debug (ARM64)",
"inherits": "windows-base",
"architecture": {
"value": "arm64",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"VCPKG_TARGET_TRIPLET": {
"value": "arm64-windows-static",
"type": "STRING"
}
}
},
{
"name": "arm64-Clang-RelWithDebInfo",
"displayName": "RelWithDebInfo (ARM64)",
"inherits": "arm64-Clang-Debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "arm64-Clang-Release",
"displayName": "Release (ARM64)",
"inherits": "arm64-Clang-Debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release",
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": true
}
},
{
"name": "linux-base",
"hidden": true,
Expand All @@ -69,10 +102,6 @@
"value": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"type": "FILEPATH"
},
"VCPKG_TARGET_TRIPLET": {
"value": "x64-linux",
"type": "STRING"
},
"VCPKG_CHAINLOAD_TOOLCHAIN_FILE": "${sourceDir}/toolchains/linux-clang.cmake"
},
"environment": {
Expand Down
Loading
Loading