-
Notifications
You must be signed in to change notification settings - Fork 36
180 lines (172 loc) · 5.65 KB
/
nightly.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
name: nightly packages
# based on the same for darktable-org/darktable
# i suppose that makes it GPLv3.
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
AppImage:
if: github.repository == 'hanatos/vkdt'
name: nightly vkdt appimage
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
compiler:
- { compiler: GNU12, CC: gcc-12, CXX: g++-12, packages: gcc-12 g++-12 }
branch:
- { code: master, label: gitmaster }
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
SRC_DIR: ${{ github.workspace }}/src
BUILD_DIR: ${{ github.workspace }}
INSTALL_PREFIX: ${{ github.workspace }}/AppDir
CMAKE_BUILD_TYPE: ${{ matrix.btype }}
GENERATOR: ${{ matrix.generator }}
TARGET: ${{ matrix.target }}
VKDT_CLI: ${{ github.workspace }}/AppDir/usr/bin/vkdt-cli
BRANCH: ${{ matrix.branch.code }}
BUILD_NAME: ${{ matrix.branch.label }}
steps:
- name: install compiler ${{ matrix.compiler.compiler }}
run: |
# Remove azure mirror because it is unreliable and sometimes unpredictably leads to failed CI
sudo sed -i 's/azure\.//' /etc/apt/sources.list
sudo apt-get update
sudo apt-get -y install \
${{ matrix.compiler.packages }}
- name: install base dependencies
run: |
sudo apt-get -y install \
build-essential \
appstream-util \
git \
glslang-tools \
libvulkan-dev \
libjpeg-dev \
libglfw3-dev \
zlib1g-dev \
libpugixml-dev \
libomp-dev \
libfuse2 \
appstream;
- uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH }}
submodules: true
# We have to fetch the entire history to correctly generate the version for the AppImage filename
fetch-depth: 0
- name: build and install
run: |
bash bin/mkappimg.sh
- name: check if it runs
run: |
./vkdt-*.AppImage --version
- name: package upload
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
path: vkdt-*.AppImage*
name: artifact-appimage
retention-days: 1
Windows:
if: github.repository == 'hanatos/vkdt'
name: nightly vkdt windows
runs-on: windows-latest
strategy:
fail-fast: true
matrix:
msystem:
- UCRT64
defaults:
run:
shell: msys2 {0}
env:
SRC_DIR: ${{ github.workspace }}/src
INSTALL_PREFIX: ${{ github.workspace }}/install
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
install: >-
git
rsync
make
zip
pacboy: >-
cc:p
gcc-libs:p
dlfcn:p
glfw:p
vulkan-devel:p
glslang:p
libjpeg-turbo:p
zlib:p
exiv2:p
omp:p
cmake:p
pugixml:p
update: false
- run: git config --global core.autocrlf input
shell: bash
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
path: src
- name: build and install
run: |
make -C ${SRC_DIR}
make DESTDIR=${INSTALL_PREFIX} -C ${SRC_DIR} install
- name: check if it runs
run: |
${INSTALL_PREFIX}/usr/lib/vkdt/vkdt.exe --version
- name: get version info
run: |
cd ${SRC_DIR}
echo "VERSION=$(git describe)" >> $GITHUB_ENV
([[ ${MSYSTEM_CARCH} == x86_64 ]] && echo "SYSTEM=win64" || echo "SYSTEM=woa64") >> $GITHUB_ENV
- name: create zip package
run: |
cd ${INSTALL_PREFIX}/usr/lib
# copy dso for vkdt
cp /ucrt64/bin/{libdl.dll,libgcc_s_seh-1.dll,libjpeg-8.dll,libstdc++-6.dll,libwinpthread-1.dll} vkdt/
# copy dso for rawspeed + exiv2
cp /ucrt64/bin/{libbrotlicommon.dll,libbrotlidec.dll,libcrypto-3-x64.dll,libcurl-4.dll,libexiv2-28.dll,libexpat-1.dll,libidn2-0.dll,libintl-8.dll,libnghttp2-14.dll,libpsl-5.dll,libpugixml.dll,libssh2-1.dll,libssl-3-x64.dll,libunistring-5.dll,libgomp-1.dll,zlib1.dll,libiconv-2.dll,libINIReader-0.dll,libinih-0.dll,libzstd.dll} vkdt/
zip -r vkdt-${{ env.VERSION }}-${{ env.SYSTEM }}.zip vkdt/
- name: package upload
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
path: ${{ env.INSTALL_PREFIX}}/usr/lib/vkdt-${{ env.VERSION }}-${{ env.SYSTEM }}.zip
name: artifact-windows
retention-days: 1
upload_to_release:
permissions:
contents: write
runs-on: ubuntu-latest
needs: [AppImage, Windows]
steps:
- name: download artifacts
uses: actions/download-artifact@v4
- name: update nightly release
uses: andelf/nightly-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: nightly
prerelease: true
name: 'vkdt nightly build $$'
body: |
this is an automated nightly build of vkdt.
it may contain pre-release quality features, use with care :)
the windows version is pre-alpha and has known issues, see https://github.com/hanatos/vkdt/issues/103 .
you can help by reporting more issues (or maybe even fixing, if you can ;) ).
files: |
artifact-appimage/*
artifact-windows/*