forked from edgardoh/darktable
-
-
Notifications
You must be signed in to change notification settings - Fork 23
171 lines (165 loc) · 4.97 KB
/
win-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
name: Nightly Win PKG
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
Win64:
if: github.repository == 'aurelienpierreeng/ansel' || github.event_name == 'workflow_dispatch'
name: Nightly Ansel Win64 build
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
btype:
- Release
compiler:
- { compiler: GNU, CC: gcc, CXX: g++ }
eco: [-DBINARY_PACKAGE_BUILD=ON]
target:
- skiptest
generator:
- Ninja
branch:
- { code: master, label: stable }
defaults:
run:
shell: msys2 {0}
env:
CC: ${{ matrix.compiler.CC }}
CXX: ${{ matrix.compiler.CXX }}
SRC_DIR: ${{ github.workspace }}/src
BUILD_DIR: ${{ github.workspace }}/build
INSTALL_PREFIX: ${{ github.workspace }}/install
ECO: ${{ matrix.eco }}
CMAKE_BUILD_TYPE: ${{ matrix.btype }}
GENERATOR: ${{ matrix.generator }}
TARGET: ${{ matrix.target }}
BRANCH: ${{ matrix.branch.code }}
BUILD_NAME: ${{ matrix.branch.label }}
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ucrt64
install: >-
base-devel
git
intltool
pacboy: >-
toolchain:p
cmake:p
cmocka:p
ninja:p
nsis:p
dbus-glib:p
drmingw:p
exiv2:p
gettext:p
gmic:p
graphicsmagick:p
gtk3:p
iso-codes:p
lcms2:p
lensfun:p
libavif:p
libexif:p
libheif:p
libjpeg-turbo:p
libsecret:p
libsoup:p
libwebp:p
libxml2:p
libxslt:p
lua:p
openexr:p
openjpeg2:p
osm-gps-map:p
portmidi:p
pugixml:p
python3:p
python3-jsonschema:p
python3-setuptools:p
python3-six:p
sqlite3:p
zlib:p
gmic:p
update: true
- name: Checkout ansel source
uses: actions/checkout@v3
with:
ref: ${{ env.BRANCH }}
fetch-depth: 500
submodules: true
path: src
- name: Update lensfun data
if: ${{ false }} #${{ success() }} re-enable when lensfun servers renew the SSL certificate
run: |
lensfun-update-data
- name: Build and Install
run: |
cmake -E make_directory "${BUILD_DIR}"
cmake -E make_directory "${INSTALL_PREFIX}"
$(cygpath ${SRC_DIR})/.ci/ci-script.sh
- name: Check if it runs
run: |
$(cygpath ${INSTALL_PREFIX})/bin/ansel.exe --version || true
$(cygpath ${INSTALL_PREFIX})/bin/ansel-cli.exe \
--width 2048 --height 2048 \
--hq true --apply-custom-presets false \
$(cygpath ${SRC_DIR})/src/tests/integration/images/mire1.cr2 \
$(cygpath ${SRC_DIR})/src/tests/integration/0000-nop/nop.xmp \
output.png \
--core --disable-opencl --conf host_memory_limit=8192 \
--conf worker_threads=4 -t 4 \
--conf plugins/lighttable/export/force_lcms2=FALSE \
--conf plugins/lighttable/export/iccintent=0
- name: Package
if: ${{ success() }}
run: |
cd "${BUILD_DIR}"
cmake --build "${BUILD_DIR}" --target package
- name: Package upload
if: ${{ success() }}
uses: actions/upload-artifact@v3
with:
name: ansel.${{ env.BUILD_NAME }}.win64
path: ${{ env.BUILD_DIR }}/ansel-*.exe
retention-days: 90
upload_to_release:
runs-on: ubuntu-latest
needs: Win64
env:
REPO: "https://github.com/aurelienpierreeng/ansel"
ROOM: "!SgRYbzspwqwwUgSQHC:matrix.org"
TAG: "v0.0.0"
steps:
- name: Checkout ansel source
uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: false
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ansel.stable.win64
- name: Update nightly release
uses: aurelienpierreeng/tip@master
with:
tag: ${{ env.TAG }}
rm: false
token: ${{ secrets.GITHUB_TOKEN }}
files: ansel-*.exe
- name: Install dependencies
run: |
python -m pip install simplematrixbotlib
- name: Notify Matrix
if: ${{ success() }}
run: |
FILENAME=$(find . -type f -iname "ansel-*.exe")
MESSAGE="New Exe [${FILENAME}](${{ env.REPO }}/releases/download/${{ env.TAG }}/${FILENAME}) built"
python .ci/matrix.py \
-m "$MESSAGE" \
-s ${{ secrets.MATRIX_SERVER }} \
-u ${{ secrets.MATRIX_USER }} \
-t ${{ secrets.MATRIX_ACCESS }} \
-r ${{ env.ROOM }}