forked from daid/EmptyEpsilon
-
Notifications
You must be signed in to change notification settings - Fork 1
202 lines (199 loc) · 6.83 KB
/
Copy pathcicd.yml
File metadata and controls
202 lines (199 loc) · 6.83 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
---
name: CI/CD
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
linux:
name: Linux
runs-on: ubuntu-latest
strategy:
matrix:
build_type: [Debug, RelWithDebInfo, Release]
steps:
- name: Dependencies
run: |
sudo apt-get update -qq
sudo apt-get install build-essential cmake ninja-build zip unzip libsdl2-dev
- name: SeriousProton Checkout
uses: actions/checkout@v2
with:
repository: gcask/SeriousProton
path: SeriousProton
- name: EmptyEpsilon Checkout
uses: actions/checkout@v2
with:
path: EmptyEpsilon
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: >
cmake
-G Ninja
-DCMAKE_INSTALL_PREFIX=dist
-DCPACK_GENERATOR=ZIP
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DSERIOUS_PROTON_DIR="../SeriousProton"
../EmptyEpsilon
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config ${{ matrix.build_type }} --target package
- uses: actions/upload-artifact@v2
with:
name: emptyepsilon-linux-${{ matrix.build_type }}.zip
path: ${{ github.workspace }}/build/EmptyEpsilon.zip
windows-cross:
name: Windows (Cross-Compile)
runs-on: ubuntu-latest
strategy:
matrix:
build_type: [Debug, RelWithDebInfo, Release]
steps:
- name: Dependencies
run: |
sudo apt update -qq
sudo apt install build-essential cmake python3-minimal mingw-w64 ninja-build p7zip-full
- name: SeriousProton Checkout
uses: actions/checkout@v2
with:
repository: gcask/SeriousProton
path: SeriousProton
- name: EmptyEpsilon Checkout
uses: actions/checkout@v2
with:
path: EmptyEpsilon
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: >
cmake
-G Ninja
-DCPACK_GENERATOR=ZIP
-DCMAKE_TOOLCHAIN_FILE=../EmptyEpsilon/cmake/mingw.toolchain
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DSERIOUS_PROTON_DIR="../SeriousProton"
../EmptyEpsilon
- name: Build
working-directory: ${{github.workspace}}/build
run: |
cmake --build . --config ${{ matrix.build_type }} --target package
- uses: actions/upload-artifact@v2
with:
name: emptyepsilon-win-mingw-${{matrix.build_type }}.zip
path: ${{ github.workspace }}/build/EmptyEpsilon.zip
macos:
name: MacOS
runs-on: macos-latest
strategy:
matrix:
build_type: [Debug, RelWithDebInfo, Release]
steps:
- name: Dependencies
run: brew install cmake sdl2 ninja
- name: SeriousProton Checkout
uses: actions/checkout@v2
with:
repository: gcask/SeriousProton
path: SeriousProton
- name: EmptyEpsilon Checkout
uses: actions/checkout@v2
with:
path: EmptyEpsilon
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: >
cmake
-G Ninja
-DCPACK_GENERATOR=Bundle
-DCPACK_BUNDLE_NAME=EmptyEpsilon
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DSERIOUS_PROTON_DIR="../SeriousProton"
-DWARNING_IS_ERROR=1
../EmptyEpsilon
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config ${{ matrix.build_type }} --target EmptyEpsilon
windows:
name: Windows
runs-on: windows-latest
strategy:
matrix:
build_type: [Debug, RelWithDebInfo, Release]
arch: [Win32, x64]
steps:
- name: Dependencies
run: |
$sdl_version = "2.0.16"
$sdl_link = "https://libsdl.org/release/SDL2-devel-$sdl_version-VC.zip"
$sdl_zip = "$env:GITHUB_WORKSPACE/sdl-dev.zip"
(new-object System.Net.WebClient).DownloadFile($sdl_link, $sdl_zip)
Expand-Archive -LiteralPath $sdl_zip -DestinationPath "$env:GITHUB_WORKSPACE/externals"
$sdl_config = @"
set(flavor x86)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(flavor x64)
endif()
set(_SDL2_prefix "`${CMAKE_CURRENT_LIST_DIR}/SDL2-$sdl_version")
add_library(SDL2::SDL2main STATIC IMPORTED)
set_target_properties(SDL2::SDL2main PROPERTIES
IMPORTED_LOCATION "`${_SDL2_prefix}/lib/`${flavor}/SDL2main.lib"
)
add_library(SDL2::SDL2 SHARED IMPORTED)
set_target_properties(SDL2::SDL2 PROPERTIES
IMPORTED_LOCATION "`${_SDL2_prefix}/lib/`${flavor}/SDL2.dll"
IMPORTED_IMPLIB "`${_SDL2_prefix}/lib/`${flavor}/SDL2.lib"
INTERFACE_INCLUDE_DIRECTORIES "`${_SDL2_prefix}/include"
)
target_link_libraries(SDL2::SDL2 INTERFACE SDL2::SDL2main)
"@
Set-Content -Path "$env:GITHUB_WORKSPACE/externals/sdl2-config.cmake" -Value $sdl_config
Get-Content "$env:GITHUB_WORKSPACE/externals/sdl2-config.cmake"
- name: EmptyEpsilon Checkout
uses: actions/checkout@v2
with:
path: EmptyEpsilon
- name: SeriousProton Checkout
uses: actions/checkout@v2
with:
repository: daid/SeriousProton
path: SeriousProton
ref: master
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
working-directory: ${{github.workspace}}/build
run: >
cmake ../EmptyEpsilon
-G "Visual Studio 16 2019" -A Win32
-DSDL2_DIR:PATH="$env:GITHUB_WORKSPACE/externals"
-DSERIOUS_PROTON_DIR="../SeriousProton"
../EmptyEpsilon
- name: Build
working-directory: ${{github.workspace}}/build
run: |
cmake --build . --config ${{ matrix.build_type }} --target package
- uses: actions/upload-artifact@v2
with:
name: emptyepsilon-win-${{ matrix.arch }}-${{matrix.build_type }}.zip
path: ${{ github.workspace }}/build/EmptyEpsilon.zip
luatest:
name: LuaTest
runs-on: ubuntu-latest
steps:
- name: Update apt index
run: sudo apt-get update -qq
- name: Install dependencies
run: sudo apt-get install lua5.3
- name: Checkout EmptyEpsilon
uses: actions/checkout@v2
- name: Test if lua scripts parse
run: find scripts/ -iname "*.lua" | xargs -P 4 -n 1 luac -p