Skip to content

prefer config mode when using vcpkg and use alias targets for vorbis #41

prefer config mode when using vcpkg and use alias targets for vorbis

prefer config mode when using vcpkg and use alias targets for vorbis #41

name: "Ryzom Client: build on multiple platforms (vcpkg)"
on:
push:
branches: [ "core4", "feature/*" ]
paths:
- .github/workflows/build-client-vcpkg.yml
# TODO use nel package instead
- nel/**
- ryzom/**
- cmake/**
- CMakeModules/**
- CMakeLists.txt
- CMakePresets.json
- vcpkg.json
- vcpkg-configuration.json
pull_request:
branches: [ "core4" ]
paths:
- .github/workflows/build-client-vcpkg.yml
# TODO use nel package instead
- nel/**
- ryzom/**
- cmake/**
- CMakeModules/**
- CMakeLists.txt
- CMakePresets.json
- vcpkg.json
- vcpkg-configuration.json
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-24.04
- ubuntu-22.04
- windows-2025
- windows-2022
- macos-13
include:
- os: windows-2022
cmake_preset: ryzom-client-x64-windows-vcpkg
- os: windows-2025
cmake_preset: ryzom-client-x64-windows-vcpkg
- os: ubuntu-22.04
ubuntu_version: 22.04
cmake_preset: ryzom-client-x64-linux-vcpkg
- os: ubuntu-24.04
ubuntu_version: 24.04
cmake_preset: ryzom-client-x64-linux-vcpkg
- os: macos-13
cmake_preset: macos-ryzom-client
steps:
- uses: actions/checkout@v4
- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
echo "vcpkg-dir=${{ github.workspace }}/.vcpkg" >> "$GITHUB_OUTPUT"
echo "runner.os=${{ runner.os }}"
- uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.31.6
- uses: lukka/run-vcpkg@v11
- name: Dependencies Linux
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y --no-install-recommends \
autoconf autoconf-archive automake libtool nasm libltdl-dev
- id: vcpkg-cache
uses: actions/cache/restore@v4
with:
path: ${{ steps.strings.outputs.vcpkg-dir }}
key: vcpkg-${{ matrix.os }}-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
- uses: actions/cache/restore@v4
if: runner.os == 'Windows'
with:
path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
key: ${{ matrix.os }}-chocolatey
- name: Dependencies Windows
if: runner.os == 'Windows'
run: |
choco install directx-sdk nsis
- name: Dependencies Windows
if: runner.os == 'Darwin'
run: |
brew install nasm
- uses: actions/cache/save@v4
with:
path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey
key: ${{ matrix.os }}-chocolatey
- name: Configure CMake
env:
MACOSX_DEPLOYMENT_TARGET: 10.13
shell: bash
run: >
cmake --preset ${{ matrix.cmake_preset }}
-DVCPKG_INSTALLED_DIR="${{ steps.strings.outputs.vcpkg-dir }}"
- uses: actions/cache/save@v4
with:
path: ${{ steps.strings.outputs.vcpkg-dir }}
key: vcpkg-${{ matrix.os }}-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
- name: Build
env:
MACOSX_DEPLOYMENT_TARGET: 10.13
run: cmake --build --preset ryzom-client
- name: Package
run: cmake --build --preset ryzom-client --target package
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: ${{ matrix.os }}-logs
path: build/**/*.log
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-client-package
path: build/ryzom-client/ryzom-client-*
if-no-files-found: error