-
-
Notifications
You must be signed in to change notification settings - Fork 0
149 lines (129 loc) · 4.75 KB
/
build.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
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
name: build
on:
push:
#
jobs:
win32-x86-debug:
runs-on: windows-latest
defaults:
run:
shell: powershell
working-directory: interface\provisioner
steps:
- uses: microsoft/[email protected]
- uses: actions/checkout@v2
with:
submodules: 'recursive'
fetch-depth: 0
- name: Fetch SDL
run: |
Invoke-WebRequest -Uri 'https://github.com/libsdl-org/SDL/releases/download/release-2.24.2/SDL2-devel-2.24.2-VC.zip' -OutFile 'SDL2-devel-2.24.2-VC.zip'
Expand-Archive -Path 'SDL2-devel-2.24.2-VC.zip' -DestinationPath 'lib/sdl'
- name: Fetch SQLite
run: |
Invoke-WebRequest -Uri 'https://www.sqlite.org/2022/sqlite-amalgamation-3390400.zip' -OutFile 'sqlite-amalgamation-3390400.zip'
Expand-Archive -Path 'sqlite-amalgamation-3390400.zip' -DestinationPath 'lib/sqlite/'
- name: Build ConeRGB Configurator Debug
run: msbuild provisioner.sln /p:Configuration="Debug" /p:PlatformTarget=x86 /p:Platform=x86
- uses: actions/upload-artifact@v3
with:
name: ConeRGB-Win32-Debug
path: |
interface\provisioner\Debug\provisioner.exe
interface\provisioner\Debug\README.txt
interface\provisioner\Debug\LICENSE
interface\provisioner\Debug\SDL2.dll
interface\provisioner\Debug\README-SDL.txt
interface\provisioner\Debug\imgui.ini
interface\provisioner\Debug\config.db
win32-x86-release:
runs-on: windows-latest
defaults:
run:
shell: powershell
working-directory: interface\provisioner
steps:
- uses: microsoft/[email protected]
- uses: actions/checkout@v2
with:
submodules: 'recursive'
fetch-depth: 0
- name: Fetch SDL
run: |
Invoke-WebRequest -Uri 'https://github.com/libsdl-org/SDL/releases/download/release-2.24.2/SDL2-devel-2.24.2-VC.zip' -OutFile 'SDL2-devel-2.24.2-VC.zip'
Expand-Archive -Path 'SDL2-devel-2.24.2-VC.zip' -DestinationPath 'lib/sdl'
- name: Fetch SQLite
run: |
Invoke-WebRequest -Uri 'https://www.sqlite.org/2022/sqlite-amalgamation-3390400.zip' -OutFile 'sqlite-amalgamation-3390400.zip'
Expand-Archive -Path 'sqlite-amalgamation-3390400.zip' -DestinationPath 'lib/sqlite/'
- name: Build ConeRGB Configurator Release
run: msbuild provisioner.sln /p:Configuration="Release" /p:PlatformTarget=x86 /p:Platform=x86
- uses: actions/upload-artifact@v3
with:
name: ConeRGB-Win32-Release
path: |
interface\provisioner\Release\provisioner.exe
interface\provisioner\Release\README.txt
interface\provisioner\Release\LICENSE
interface\provisioner\Release\SDL2.dll
interface\provisioner\Release\README-SDL.txt
interface\provisioner\Release\imgui.ini
interface\provisioner\Release\config.db
Emscripten:
runs-on: ubuntu-18.04
defaults:
run:
shell: bash
working-directory: interface/provisioner
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
fetch-depth: 0
- name: Install Dependencies
run: |
wget -q https://github.com/emscripten-core/emsdk/archive/master.tar.gz
tar -xvf master.tar.gz
emsdk-master/emsdk update
emsdk-master/emsdk install latest
emsdk-master/emsdk activate latest
- name: Build provisioner
run: |
pushd emsdk-master
source ./emsdk_env.sh
popd
make TARGET=emscripten
- name: Archive artifact
run: |
tar \
--dereference --hard-dereference \
--directory web \
-cvf /tmp/artifact.tar \
--exclude=.git \
--exclude=.github \
.
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: github-pages
path: /tmp/artifact.tar
retention-days: 7
deploy:
# Add a dependency to the build job
needs: Emscripten
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1