-
Notifications
You must be signed in to change notification settings - Fork 2
78 lines (77 loc) · 2.72 KB
/
builds.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: Build Game
on: [push, pull_request]
jobs:
builds:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { name: "Windows VS 16 - Conan 1.x", os: "windows-2019", conan_version: "1.*", zip_appendix: "win64-vs2019" }
- { name: "Windows VS 17 - Conan 2.x", os: "windows-2022", conan_version: "2.*", zip_appendix: "win64-vs2022" }
- { name: "Linux GCC - Conan 1.x", os: "ubuntu-22.04", conan_version: "1.*", zip_appendix: "linux-gcc" }
name: ${{ matrix.config.name }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install Conan
run: |
pip install conan==${{ matrix.config.conan_version }} cmake
conan user
conan --version
cmake --version
- name: Set Conan 1.x specifics
if: ${{ startsWith(matrix.config.conan_version , '1') }}
run: |
conan config set general.revisions_enabled=True
- name: Create Conan 2.x profile
if: ${{ startsWith(matrix.config.conan_version , '2') }}
run: |
conan profile detect
- name: Install dependencies via Conan
run: |
conan remote add bincrafters https://bincrafters.jfrog.io/artifactory/api/conan/public-conan
echo "Conan install"
conan install . --build missing -pr:b default -pr:h default -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True
- name: CMake
# TODO: Fix cpack
run: |
echo "::group::CMake configuration"
cmake --preset release
echo "::endgroup::"
echo "::group::CMake build"
cmake --build --preset release
echo "::endgroup::"
echo "::group::CMake install"
cmake --install build/
echo "::endgroup::"
- name: Create package
# TODO: Fix cpack
run: |
echo "Create package"
version=r`cat version.txt`
echo $version
echo "SAUER_VERSION=${version}" >> "$GITHUB_ENV"
echo "{ARTIFACT_FILE}={value}" >> "$GITHUB_ENV"
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v4
# TODO: Fix CPack, use ${{ env.ARTIFACT_FILE }}
with:
name: sauerbraten-${{ env.SAUER_VERSION }}-${{ matrix.config.zip_appendix }}.zip
path: |
bin/
bin_unix
bin64/
data/
src/
rpg.bat
sauerbraten.bat
sauerbraten_unix
server-init.cfg
server.bat
CMakeLists.txt
conanfile.txt
.gitignore