-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (68 loc) · 2.95 KB
/
build_baker.yml
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
name: Making a Build
on: push
jobs:
job:
name: ${{ matrix.os }}-build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Download dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt install build-essential pkgconf autoconf libtool libx11-dev libxft-dev libxext-dev libwayland-dev libxkbcommon-dev libegl1-mesa-dev libibus-1.0-dev libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev
- name: Get latest CMake if possible
uses: lukka/get-cmake@latest
- name: Restore from cache and setup vcpkg executable and data files.
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: '${{github.workspace}}/vcpkg'
runVcpkgInstall: true
vcpkgJsonGlob: '**/neo/vcpkg.json'
- name: Run CMake+vcpkg+Ninja to build the engine.
uses: lukka/run-cmake@v10
with:
cmakeListsTxtPath: '${{github.workspace}}/neo/CMakeLists.txt'
configurePreset: 'ninja-multi-vcpkg'
buildPreset: 'ninja-vcpkg-release'
- name: Lower case runner.os
if: matrix.os != 'windows-latest'
id: runner_os
uses: Entepotenz/[email protected]
with:
string: ${{runner.os}}
- name: Copy base files to ${{steps.runner_os.outputs.lowercase}}/
if: matrix.os != 'windows-latest'
shell: pwsh
run: |
cd ${{github.workspace}}
Copy-Item -Path "base" -Destination "output/${{steps.runner_os.outputs.lowercase}}/base" -Recurse
Copy-Item -Path "libs" -Destination "output/${{steps.runner_os.outputs.lowercase}}/libs" -Recurse
Copy-Item -Path ".github/Changelog.md" -Destination "output/${{steps.runner_os.outputs.lowercase}}"
Copy-Item -Path ".github/Configuration.md" -Destination "output/${{steps.runner_os.outputs.lowercase}}"
Copy-Item -Path ".github/README.md" -Destination "output/${{steps.runner_os.outputs.lowercase}}"
- name: Copy windows only files ( hacky :( )
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
cd ${{github.workspace}}
Copy-Item -Path "base" -Destination "output/windows/base" -Recurse
Copy-Item -Path ".github/Changelog.md" -Destination "output/windows"
Copy-Item -Path ".github/Configuration.md" -Destination "output/windows"
Copy-Item -Path ".github/README.md" -Destination "output/windows"
- name: Artifacts for Windows
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: prey2006-windows
path: output/windows/
- name: Artifacts for Linux
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: prey2006-linux
path: output/linux/