-
-
Notifications
You must be signed in to change notification settings - Fork 55
185 lines (177 loc) · 5.58 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
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
name: Build
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag'
required: true
default: '2024.06.12'
build_windows:
type: boolean
description: 'Build Windows'
required: false
default: 'true'
build_linux:
type: boolean
description: 'Build Linux'
required: false
default: 'true'
build_mac:
type: boolean
description: 'Build Mac'
required: false
default: 'true'
build_docker:
type: boolean
description: 'Build Docker'
required: false
default: 'true'
jobs:
linux-build:
if: ${{ github.event.inputs.build_linux == 'true' }}
strategy:
matrix:
os: [ubuntu2404,ubuntu2204,ubuntu2004]
fail-fast: false
runs-on: ubuntu-20.04
steps:
- name: Download Build
run: |
git clone https://x-access-token:${{ secrets.DSISTUDIO_TOKEN }}@github.com/frankyeh/DSI-Studio-Build.git
mv DSI-Studio-Build/build_packages .
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Build and push
uses: docker/[email protected]
with:
context: .
build-args: |
DSISTUDIO_TOKEN=${{ secrets.DSISTUDIO_TOKEN }}
file: build_packages/${{ matrix.os }}/Dockerfile
push: false
outputs: dsi-studio
- name: Packaging
run: |
zip -r dsi_studio_${{ matrix.os }}.zip dsi-studio
- name: Create Release
env:
GH_TOKEN: ${{ secrets.DSISTUDIO_TOKEN }}
run: |
gh release upload ${{ github.event.inputs.tag }} *.zip --clobber --repo frankyeh/DSI-Studio
macos-build-qt6:
if: ${{ github.event.inputs.build_mac == 'true' }}
strategy:
matrix:
os: [macos-14,macos-13,macos-15]
fail-fast: false
runs-on: ${{ matrix.os }}
env:
CFLAGS: -Werror
steps:
- uses: actions/[email protected]
- name: Download Build
run: |
git clone https://x-access-token:${{ secrets.DSISTUDIO_TOKEN }}@github.com/frankyeh/DSI-Studio-Build.git
mv DSI-Studio-Build/*.txt .
mv DSI-Studio-Build/build_packages/build_mac.sh .
- name: brew update
run: |
brew update
brew install cmake
- name: Install Qt
uses: jurplel/[email protected]
with:
version: '6.5.2'
modules: qtcharts
- name: Build DSI Studio
run: |
sh build_mac.sh ${{ matrix.os }}
zip -r dsi_studio_${{ matrix.os }}_qt6.zip dsi_studio.app
- name: Create Release
env:
GH_TOKEN: ${{ secrets.DSISTUDIO_TOKEN }}
run: |
gh release upload ${{ github.event.inputs.tag }} *.zip --clobber
docker_build:
if: ${{ github.event.inputs.build_docker == 'true' }}
runs-on: ubuntu-20.04
steps:
- name: Download Build
run: |
git clone https://x-access-token:${{ secrets.DSISTUDIO_TOKEN }}@github.com/frankyeh/DSI-Studio-Build.git
mv DSI-Studio-Build/build_packages .
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Current Time
run: echo "DATE_TAG=$(date "+%Y-%m-%d")" >> $GITHUB_ENV
- name: Build and push
uses: docker/[email protected]
with:
context: .
build-args: |
DSISTUDIO_TOKEN=${{ secrets.DSISTUDIO_TOKEN }}
file: build_packages/docker/Dockerfile
push: true
tags: |
"dsistudio/dsistudio:hou-${{ env.DATE_TAG }}"
dsistudio/dsistudio:latest
windows_cpu_build:
if: ${{ github.event.inputs.build_windows == 'true' }}
runs-on: windows-2019
steps:
- uses: actions/[email protected]
- name: Download Build
run: |
git clone https://x-access-token:${{ secrets.DSISTUDIO_TOKEN }}@github.com/frankyeh/DSI-Studio-Build.git
move DSI-Studio-Build/*.txt .
move DSI-Studio-Build/build_packages .
- name: Install Qt
uses: jurplel/[email protected]
with:
version: 6.5.2
modules: addons.qtcharts
- name: Build
run: |
call .\build_packages\build_win.bat
move dsi_studio_win.zip dsi_studio_win_cpu.zip
shell: cmd
- name: Create Release
env:
GH_TOKEN: ${{ secrets.DSISTUDIO_TOKEN }}
run: |
gh release upload ${{ github.event.inputs.tag }} dsi_studio_win_cpu.zip --clobber
windows_gpu_build:
if: ${{ github.event.inputs.build_windows == 'true' }}
runs-on: windows-2019
steps:
- uses: actions/[email protected]
- name: Download Build
run: |
git clone https://x-access-token:${{ secrets.DSISTUDIO_TOKEN }}@github.com/frankyeh/DSI-Studio-Build.git
move DSI-Studio-Build/*.txt .
move DSI-Studio-Build/build_packages .
- name: Install Cuda
uses: Jimver/[email protected]
- name: Install Qt
uses: jurplel/[email protected]
with:
version: 6.5.2
modules: addons.qtcharts
- name: Build
run: |
call .\build_packages\build_win.bat
shell: cmd
- name: Create Release
env:
GH_TOKEN: ${{ secrets.DSISTUDIO_TOKEN }}
run: |
gh release upload ${{ github.event.inputs.tag }} dsi_studio_win.zip --clobber