forked from ryzom/ryzomcore
-
Notifications
You must be signed in to change notification settings - Fork 0
142 lines (123 loc) · 3.89 KB
/
build-client-vcpkg.yml
File metadata and controls
142 lines (123 loc) · 3.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
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