forked from Laupetin/OpenAssetTools
-
Notifications
You must be signed in to change notification settings - Fork 0
160 lines (142 loc) · 5.06 KB
/
Copy pathci.yaml
File metadata and controls
160 lines (142 loc) · 5.06 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: ci
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
jobs:
build-test-linux:
strategy:
matrix:
build_arch: [x86, x64]
toolset: [gcc, clang]
include:
- build_arch: x86
gtk_packages: libgtk-4-dev:i386 libwebkitgtk-6.0-dev:i386
- build_arch: x64
gtk_packages: libgtk-4-dev libwebkitgtk-6.0-dev
name: Build-Test Linux ${{ matrix.toolset }} ${{ matrix.build_arch }}
runs-on: ubuntu-latest
container: ubuntu:24.04
defaults:
run:
shell: bash
steps:
- name: Enable i386 architecture
if: ${{ matrix.build_arch == 'x86' }}
run: dpkg --add-architecture i386
- name: Install base packages
run: |
apt-get update
apt-get install -y wget tar git make curl ${{ matrix.gtk_packages }}
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: recursive
- name: Configure gcc
uses: ./.github/actions/configure-gcc
with:
gcc_version: 14
enable_x86: ${{ case(matrix.build_arch == 'x86', 'true', 'false') }}
- name: Configure clang
if: ${{ matrix.toolset == 'clang' }}
uses: ./.github/actions/configure-clang
with:
clang_version: 20
enable_x86: ${{ case(matrix.build_arch == 'x86', 'true', 'false') }}
- name: Install node
uses: actions/setup-node@v6.4.0
with:
node-version: 24
- name: Premake generate
working-directory: ${{ github.workspace }}
env:
PREMAKE_NO_PROMPT: 1
run: ./generate.sh --cc=${{ matrix.toolset }} --modman
- name: Build UI
working-directory: ${{ github.workspace }}
run: |
npm --prefix src/ModManUi install
npm --prefix src/ModManUi run lint
npm --prefix src/ModManUi run build
- name: Build
working-directory: ${{ github.workspace }}
run: |
[[ "${{ matrix.build_arch }}" == "x86" ]] && export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig:$PKG_CONFIG_PATH || true
echo "Package config path: $PKG_CONFIG_PATH"
scripts/build.sh release ${{ matrix.build_arch }}
chmod +x build/bin/Release_${{ matrix.build_arch }}/{ModMan,ImageConverter,Unlinker,Linker}
- name: Test
working-directory: ${{ github.workspace }}/build/lib/Release_${{ matrix.build_arch }}/tests
run: |
./CommonTests
./ObjCommonTests
./ObjCompilingTests
./ObjLoadingTests
./ObjWritingTests
./ParserTests
./SystemTests
./ZoneCodeGeneratorLibTests
./ZoneCommonTests
build-test-windows:
strategy:
matrix:
build_arch: [x86, x64]
include:
- build_arch: x86
msbuild_config: Win32
- build_arch: x64
msbuild_config: x64
name: Build-Test Windows ${{ matrix.build_arch }}
runs-on: windows-2025-vs2026
steps:
- name: Install node
uses: actions/setup-node@v6.4.0
with:
node-version: 24
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v3.0.0
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: recursive
- name: Premake generate
working-directory: ${{ github.workspace }}
env:
PREMAKE_NO_PROMPT: 1
run: ./generate.bat --modman
- name: Build UI
working-directory: ${{ github.workspace }}
run: |
npm --prefix src/ModManUi install
npm --prefix src/ModManUi run lint
npm --prefix src/ModManUi run build
- name: Build
working-directory: ${{ github.workspace }}
run: |
msbuild /m /p:Configuration=Release /p:Platform=${{ matrix.msbuild_config }} build
- name: Test
working-directory: ${{ github.workspace }}/build/lib/Release_${{ matrix.build_arch }}/tests
run: |
$combinedExitCode = 0
./CommonTests
$combinedExitCode = [System.Math]::max($combinedExitCode, $LASTEXITCODE)
./ObjCommonTests
$combinedExitCode = [System.Math]::max($combinedExitCode, $LASTEXITCODE)
./ObjCompilingTests
$combinedExitCode = [System.Math]::max($combinedExitCode, $LASTEXITCODE)
./ObjLoadingTests
$combinedExitCode = [System.Math]::max($combinedExitCode, $LASTEXITCODE)
./ObjWritingTests
$combinedExitCode = [System.Math]::max($combinedExitCode, $LASTEXITCODE)
./ParserTests
$combinedExitCode = [System.Math]::max($combinedExitCode, $LASTEXITCODE)
./SystemTests
$combinedExitCode = [System.Math]::max($combinedExitCode, $LASTEXITCODE)
./ZoneCodeGeneratorLibTests
$combinedExitCode = [System.Math]::max($combinedExitCode, $LASTEXITCODE)
./ZoneCommonTests
$combinedExitCode = [System.Math]::max($combinedExitCode, $LASTEXITCODE)
exit $combinedExitCode