-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
config.yml
226 lines (226 loc) · 10.2 KB
/
config.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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
version: 2
jobs:
openscad-mxe-32bit:
working_directory: ~/workspace
docker:
- image: openscad/mxe-i686-gui:latest
steps:
- checkout
- run:
name: Build OpenSCAD Windows Application (32bit)
no_output_timeout: 18000
command: |
export NUMCPU=2
export MXEDIR=/mxe
export LIB3MF_INCLUDEDIR=/mxe/usr/i686-w64-mingw32.static.posix/include/lib3mf
export LIB3MF_LIBDIR=/mxe/usr/i686-w64-mingw32.static.posix/lib
if [ x"${CIRCLE_BRANCH}" = xmaster ]; then export SUFFIX=""; else export SUFFIX="_$(echo ${CIRCLE_BRANCH} | sed -e 's,pull/,PR,')"; fi
export OPENSCAD_VERSION="$(date +%Y.%m.%d).ci${CIRCLE_BUILD_NUM}"
./scripts/release-common.sh -snapshot -mingw32 -v "$OPENSCAD_VERSION"
mkdir -p /tmp/out
for f in mingw*/*.zip mingw*/*.exe; do N=$(basename "$f" | sed -e "s/\\(-x86-[36][24]\\)/\\1${SUFFIX}/;"); cp -iv "$f" /tmp/out/"$N"; done
if [ -n "${CODE_SIGNING_KEY}" ]; then
cd /tmp/out
echo $CODE_SIGNING_DATA | base64 -d | gzip -d | gpg --import --allow-secret-key-import --pinentry-mode loopback --passphrase-file <(echo $CODE_SIGNING_PW)
export GPG_ARGS="--batch --yes --passphrase-fd 0 --pinentry-mode loopback --detach-sign --armor"
for a in *.exe *.zip; do echo "$CODE_SIGNING_PW" | gpg -u "$CODE_SIGNING_KEY" $GPG_ARGS "$a"; sha256sum "$a" | tee "${a}.sha256"; sha512sum "$a" | tee "${a}.sha512"; done
rm -rf ~/.gnupg
else
echo "Skipping code signing."
fi
- store_artifacts:
path: /tmp/out
destination: 32-bit
openscad-mxe-64bit:
working_directory: ~/workspace
docker:
- image: openscad/mxe-x86_64-gui:latest
steps:
- checkout
- run:
name: Build OpenSCAD Windows Application (64bit)
no_output_timeout: 18000
command: |
export NUMCPU=2
export MXEDIR=/mxe
export LIB3MF_INCLUDEDIR=/mxe/usr/x86_64-w64-mingw32.static.posix/include/lib3mf
export LIB3MF_LIBDIR=/mxe/usr/x86_64-w64-mingw32.static.posix/lib
if [ x"${CIRCLE_BRANCH}" = xmaster ]; then export SUFFIX=""; else export SUFFIX="_$(echo ${CIRCLE_BRANCH} | sed -e 's,pull/,PR,')"; fi
export OPENSCAD_VERSION="$(date +%Y.%m.%d).ci${CIRCLE_BUILD_NUM}"
./scripts/release-common.sh -snapshot -mingw64 -v "$OPENSCAD_VERSION"
mkdir -p /tmp/out
for f in mingw*/*.zip mingw*/*.exe; do N=$(basename "$f" | sed -e "s/\\(-x86-[36][24]\\)/\\1${SUFFIX}/;"); cp -iv "$f" /tmp/out/"$N"; done
if [ -n "${CODE_SIGNING_KEY}" ]; then
cd /tmp/out
echo $CODE_SIGNING_DATA | base64 -d | gzip -d | gpg --import --allow-secret-key-import --pinentry-mode loopback --passphrase-file <(echo $CODE_SIGNING_PW)
export GPG_ARGS="--batch --yes --passphrase-fd 0 --pinentry-mode loopback --detach-sign --armor"
for a in *.exe *.zip; do echo "$CODE_SIGNING_PW" | gpg -u "$CODE_SIGNING_KEY" $GPG_ARGS "$a"; sha256sum "$a" | tee "${a}.sha256"; sha512sum "$a" | tee "${a}.sha512"; done
rm -rf ~/.gnupg
else
echo "Skipping code signing."
fi
- store_artifacts:
path: /tmp/out
destination: 64-bit
openscad-appimage-64bit:
working_directory: ~/workspace
docker:
- image: openscad/appimage-x86_64-base:latest
steps:
- checkout
- run:
name: Build OpenSCAD AppImage (64bit)
no_output_timeout: 18000
command: |
set +e
. /opt/qt5*/bin/qt5*-env.sh
set -e
export OPENSCAD_COMMIT=$(git log -1 --pretty=format:%h)
export OPENSCAD_VERSION="$(date +%Y.%m.%d).ai${CIRCLE_BUILD_NUM}"
if [ x"${CIRCLE_BRANCH}" = xmaster ]; then export SUFFIX=""; else export SUFFIX="_$(echo ${CIRCLE_BRANCH} | sed -e 's,pull/,PR,')"; fi
git submodule update --init
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DEXPERIMENTAL=ON -DSNAPSHOT=ON -DOPENSCAD_VERSION="$OPENSCAD_VERSION" -DOPENSCAD_COMMIT="$OPENSCAD_COMMIT"
make -j2
make install DESTDIR=../AppDir
cd ..
export PATH=/appimage/usr/bin:"$PATH"
export EXTRA_QT_PLUGINS=svg
VERSION="$OPENSCAD_VERSION" linuxdeploy --plugin qt --output appimage --appdir AppDir
mkdir -p /tmp/out
for f in OpenSCAD-*.AppImage; do N=$(basename "$f" | sed -e "s/OpenSCAD-\\(.*\\)/OpenSCAD-${OPENSCAD_VERSION}-${SUFFIX}\\1/;"); cp -iv "$f" /tmp/out/"$N"; done
if [ -n "${CODE_SIGNING_KEY}" ]; then
cd /tmp/out
echo $CODE_SIGNING_DATA | base64 -d | gzip -d | gpg --import --allow-secret-key-import --pinentry-mode loopback --passphrase-file <(echo $CODE_SIGNING_PW)
export GPG_ARGS="--batch --yes --passphrase-fd 0 --pinentry-mode loopback --detach-sign --armor"
for a in *.AppImage; do echo "$CODE_SIGNING_PW" | gpg -u "$CODE_SIGNING_KEY" $GPG_ARGS "$a"; sha256sum "$a" | tee "${a}.sha256"; sha512sum "$a" | tee "${a}.sha512"; done
rm -rf ~/.gnupg
else
echo "Skipping code signing."
fi
- store_artifacts:
path: /tmp/out
destination: 64-bit
openscad-macos:
macos:
xcode: 13.2.0
environment:
OPENSCAD_LIBRARIES: /Users/distiller/libraries/install
PKG_CONFIG_PATH: /Users/distiller/libraries/install/lib/pkgconfig
DYLD_LIBRARY_PATH: /Users/distiller/libraries/install/lib
DYLD_FRAMEWORK_PATH: /Users/distiller/libraries/install/lib
steps:
- checkout
- run: git submodule update --init
- run:
name: System Info
command: |
system_profiler SPHardwareDataType SPSoftwareDataType SPStorageDataType SPDeveloperToolsDataType
- run:
name: Install Homebrew packages
command: |
brew update
brew install automake libtool cmake pkg-config wget meson
- restore_cache:
keys:
# CircleCI library caching. If we ever need invalidate the cache (e.g. to remove any old files
# from a library cache), the safest, change the MACOS_CACHE_VERSION variable to a random value at
# https://app.circleci.com/settings/project/github/openscad/openscad/environment-variables.
- macos-libraries-PR3-x86_64-{{ .Environment.MACOS_CACHE_VERSION }}-{{ checksum "scripts/macosx-build-dependencies.sh" }}-{{ checksum ".circleci/config.yml" }}
# Fetch the most recently saved cache
- macos-libraries-PR3-x86_64-{{ .Environment.MACOS_CACHE_VERSION }}-
- run:
name: Build Dependencies
command: |
# Pick up our own Qt
export PATH=$OPENSCAD_LIBRARIES/bin:$PATH
# Limit to 30 minutes
./scripts/macosx-build-dependencies.sh -l 30 -a -x -d double_conversion eigen gmp mpfr glew gettext libffi freetype ragel harfbuzz libzip libxml2 libuuid fontconfig hidapi lib3mf pixman cairo glib2 boost cgal qt5 opencsg qscintilla sparkle
- run:
name: Package Dependencies as an artifact
command: |
mkdir -p /tmp/out
tar cz -C "$OPENSCAD_LIBRARIES" -f /tmp/out/libraries.tar.bz2 .
shasum -a 512 /tmp/out/libraries.tar.bz2 > /tmp/out/libraries.tar.bz2.sha512
- save_cache:
# Make sure to create a new cache entry, needed for incremental library builds and also
# preventing full cache drop after 15 days.
key: macos-libraries-PR3-x86_64-{{ .Environment.MACOS_CACHE_VERSION }}-{{ checksum "scripts/macosx-build-dependencies.sh" }}-{{ checksum ".circleci/config.yml" }}-{{ .BuildNum }}
paths:
- /Users/distiller/libraries/install
- run:
name: Build OpenSCAD
command: |
export NUMCPU=$(($(sysctl -n hw.ncpu) * 3 / 2))
time ./scripts/release-common.sh -snapshot
cd build
OPENSCAD_NAME=$(ls OpenSCAD-*.dmg)
shasum -a 256 "$OPENSCAD_NAME" > "$OPENSCAD_NAME".sha256
shasum -a 512 "$OPENSCAD_NAME" > "$OPENSCAD_NAME".sha512
cp -v "$OPENSCAD_NAME"* /tmp/out/
- run:
name: Verify OpenSCAD binary
command: |
./scripts/macosx-sanity-check.py build/OpenSCAD.app/Contents/MacOS/OpenSCAD
- store_artifacts:
path: /tmp/out
workflows:
version: 2
master-build:
jobs:
- openscad-mxe-32bit:
context: secret-context
filters:
branches:
only:
- master
- openscad-mxe-64bit:
context: secret-context
filters:
branches:
only:
- master
- openscad-appimage-64bit:
context: secret-context
filters:
branches:
only:
- master
branch-build:
jobs:
- openscad-mxe-32bit:
filters:
branches:
ignore:
- master
- coverity_scan
- /^(?i:continuous)$/
- openscad-mxe-64bit:
filters:
branches:
ignore:
- master
- coverity_scan
- /^(?i:continuous)$/
- openscad-appimage-64bit:
filters:
branches:
ignore:
- master
- coverity_scan
- /^(?i:continuous)$/
- openscad-macos:
filters:
branches:
only:
- /.*-macos/
scheduled:
triggers:
- schedule:
cron: "30 6 * * 0,1,3,5,6"
filters:
branches:
only:
- master
jobs:
- openscad-macos