@@ -66,70 +66,127 @@ jobs:
6666 REPO_OWNER : ${{ github.repository_owner }}
6767 run : |
6868 if [[ "$GITHUB_WORKFLOW" == *"early access"* && "$REPO_OWNER" != "JabRef" ]]; then
69- echo "🚫 Early access workflow for JabRef disabled for non-JabRef owner"
69+ echo "⊘ Early access workflow for JabRef disabled for non-JabRef owner"
70+ echo "⊘ Early access workflow for JabRef disabled for non-JabRef owner" >> $GITHUB_STEP_SUMMARY
7071 echo "should-build=false" >> "$GITHUB_OUTPUT"
7172 exit 0
7273 fi
7374
7475 if [[ "$EVENT_NAME" != "labeled" || "$LABEL_NAME" == "automerge" || "$LABEL_NAME" == "dev: binaries" ]]; then
7576 echo "📦 build enabled"
77+ echo "📦 build enabled" >> $GITHUB_STEP_SUMMARY
7678 echo "should-build=true" >> "$GITHUB_OUTPUT"
7779 else
78- echo "🚫 build should be skipped"
80+ echo "⊘ build should be skipped"
81+ echo "⊘ build should be skipped" >> $GITHUB_STEP_SUMMARY
7982 echo "should-build=false" >> "$GITHUB_OUTPUT"
8083 exit 0
8184 fi
8285
8386 if [ -z "$BUILDJABREFPRIVATEKEY" ]; then
87+ echo "⊘ Secret BUILDJABREFPRIVATEKEY not present – skipping upload"
88+ echo "⊘ Secret BUILDJABREFPRIVATEKEY not present – skipping upload"
8489 echo "upload-to-builds-jabref-org=false" >> "$GITHUB_OUTPUT"
8590 echo "secretspresent=false" >> "$GITHUB_OUTPUT"
86- echo "🚫 Secret BUILDJABREFPRIVATEKEY not present – skipping upload"
8791 exit 0
8892 fi
8993 echo "secretspresent=true" >> "$GITHUB_OUTPUT"
9094
9195 if [[ "$GITHUB_REF" == refs/heads/gh-readonly-queue* ]]; then
96+ echo "⊘ merge queue – skipping upload"
97+ echo "⊘ merge queue – skipping upload" >> $GITHUB_STEP_SUMMARY
9298 echo "upload-to-builds-jabref-org=false" >> "$GITHUB_OUTPUT"
93- echo "🚫 merge queue – skipping upload"
9499 exit 0
95100 fi
96101
97102 if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
103+ echo "⊘ tag bulid" >> $GITHUB_STEP_SUMMARY
98104 echo "tagbuild=true" >> "$GITHUB_OUTPUT"
99105 else
106+ echo "⊘ no tag bulid" >> $GITHUB_STEP_SUMMARY
100107 echo "tagbuild=false" >> "$GITHUB_OUTPUT"
101108 fi
102109
103110 if [[ "${GITHUB_REF}" == refs/tags/* ]] || [[ "${{ inputs.notarization }}" == "true" ]]; then
104111 # This workflow runs on ubuntu-latest even for notarization for macOS; need to check later if really on macOS
105112 echo "🧾 macOS notarization"
113+ echo "🧾 macOS notarization" >> $GITHUB_STEP_SUMMARY
106114 echo "should-notarize=true" >> "$GITHUB_OUTPUT"
107115 echo "☁️ will upload"
116+ echo "☁️ will upload" >> $GITHUB_STEP_SUMMARY
108117 echo "upload-to-builds-jabref-org=true" >> "$GITHUB_OUTPUT"
109118 exit 0;
110119 else
111- echo "🚫 no macOS notarization"
120+ echo "⊘ no macOS notarization"
121+ echo "⊘ no macOS notarization" >> $GITHUB_STEP_SUMMARY
112122 echo "should-notarize=false" >> "$GITHUB_OUTPUT"
113123 fi
114124
115125 if [ "${{ github.event_name }}" != "pull_request" ]; then
116- echo "upload-to-builds-jabref-org=true" >> "$GITHUB_OUTPUT"
117126 echo "☁️ Non-PR event – will upload"
127+ echo "☁️ Non-PR event – will upload" >> $GITHUB_STEP_SUMMARY
128+ echo "upload-to-builds-jabref-org=true" >> "$GITHUB_OUTPUT"
118129 exit 0
119130 fi
120131
121132 LABELS=$(gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels --jq '.[].name')
122133
123134 if echo "$LABELS" | grep -q "^dev: binaries$"; then
124- echo "upload-to-builds-jabref-org=true" >> "$GITHUB_OUTPUT"
125135 echo "☁️ Label 'dev: binaries' found – will upload"
136+ echo "☁️ Label 'dev: binaries' found – will upload" >> $GITHUB_STEP_SUMMARY
137+ echo "upload-to-builds-jabref-org=true" >> "$GITHUB_OUTPUT"
126138 else
139+ echo "⊘ Label 'dev: binaries' not found – skipping upload"
140+ echo "⊘ Label 'dev: binaries' not found – skipping upload" >> $GITHUB_STEP_SUMMARY
127141 echo "upload-to-builds-jabref-org=false" >> "$GITHUB_OUTPUT"
128- echo "🚫 Label 'dev: binaries' not found – skipping upload"
129142 fi
130143
144+ disk-space-check :
145+ needs : conditions
146+ runs-on : ubuntu-latest
147+ outputs :
148+ available : ${{ steps.diskspace.outputs.available }}
149+ steps :
150+ - name : No upload
151+ if : needs.conditions.outputs.upload-to-builds-jabref-org == 'false'
152+ shell : bash
153+ run : |
154+ echo "⊘ no upload – skipping upload"
155+ echo "⊘ no upload – skipping upload" >> $GITHUB_STEP_SUMMARY
156+ echo "available=false" >> "$GITHUB_OUTPUT"
157+ - name : Setup SSH key
158+ if : needs.conditions.outputs.upload-to-builds-jabref-org == 'true'
159+ run : |
160+ echo "${{ secrets.buildJabRefPrivateKey }}" > sshkey
161+ chmod 600 sshkey
162+ - name : Check disk space on builds.jabref.org
163+ if : needs.conditions.outputs.upload-to-builds-jabref-org == 'true'
164+ id : diskspace
165+ shell : bash
166+ run : |
167+ USAGE=$(ssh -p 9922 -i sshkey -o StrictHostKeyChecking=no jrrsync@build-upload.jabref.org \
168+ "df --output=pcent /var/www/builds.jabref.org | tail -n1 | tr -dc '0-9'")
169+ echo "Remote usage: ${USAGE}%"
170+ echo "Remote usage: ${USAGE}%" >> $GITHUB_STEP_SUMMARY
171+
172+ if [ "$USAGE" -lt 80 ]; then
173+ echo "☁️ enough disk space available – will upload"
174+ echo "☁️ enough disk space available – will upload" >> $GITHUB_STEP_SUMMARY
175+ echo "available=true" >> "$GITHUB_OUTPUT"
176+ else
177+ echo "⛔ not enough disk space – skipping upload"
178+ echo "⛔ not enough disk space – skipping upload" >> $GITHUB_STEP_SUMMARY
179+ echo "available=false" >> "$GITHUB_OUTPUT"
180+ fi
181+ - name : Output URL
182+ if : steps.diskspace.outputs.available == 'true'
183+ shell : bash
184+ run : |
185+ echo "Link: https://builds.jabref.org/pull/${{ github.event.pull_request.number }}/merge"
186+ echo "Link: <https://builds.jabref.org/pull/${{ github.event.pull_request.number }}/merge>" >> $GITHUB_STEP_SUMMARY
187+
131188 build :
132- needs : [conditions]
189+ needs : [conditions, disk-space-check ]
133190 if : ${{ needs.conditions.outputs.should-build == 'true' }}
134191 strategy :
135192 fail-fast : false
@@ -238,6 +295,10 @@ jobs:
238295 - name : Build runtime image and installer
239296 shell : bash
240297 run : ./gradlew -i -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" :jabgui:jpackage
298+ - name : Smoke test JabGui
299+ shell : bash
300+ run : |
301+ ./gradlew :jabgui:run --args="--help"
241302 - name : Package JabGui application image
242303 shell : bash
243304 run : |
@@ -261,9 +322,18 @@ jobs:
261322 rm debian-binary control.tar.* data.tar.*
262323 mv -f jabref_${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}${{ matrix.suffix }}${{ matrix.archForDebianRepack }}_repackaged.deb jabref_${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}${{ matrix.suffix }}.deb
263324
325+ - name : Smoke test JabSrv-CLI
326+ shell : bash
327+ run : |
328+ ./gradlew :jabsrv-cli:run --args="--help"
329+
264330 - name : Build JabKit
265331 shell : bash
266332 run : ./gradlew -i -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" :jabkit:jpackage
333+ - name : Smoke test JabKit
334+ shell : bash
335+ run : |
336+ ./gradlew :jabkit:run --args="--help"
267337 - name : Package JabKit application image
268338 shell : bash
269339 run : |
@@ -273,6 +343,10 @@ jobs:
273343 - name : Build JabLS-CLI
274344 shell : bash
275345 run : ./gradlew -i -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" :jabls-cli:jpackage
346+ - name : Smoke test JabLs-CLI
347+ shell : bash
348+ run : |
349+ ./gradlew :jabls-cli:run --args="--help"
276350 - name : Package JabLS-CLI application image
277351 shell : bash
278352 run : |
@@ -281,62 +355,49 @@ jobs:
281355
282356 # region Upload to builds.jabref.org / GitHub artifacts store
283357 - name : Setup SSH key
284- if : ( needs.conditions .outputs.upload-to-builds-jabref-org == 'true')
358+ if : ${{ needs.disk-space-check .outputs.available == 'true' }}
285359 run : |
286360 echo "${{ secrets.buildJabRefPrivateKey }}" > sshkey
287361 chmod 600 sshkey
288- - name : Check disk space on builds.jabref.org
289- if : (needs.conditions.outputs.upload-to-builds-jabref-org == 'true')
290- id : diskspace
291- shell : bash
292- run : |
293- USAGE=$(ssh -p 9922 -i sshkey -o StrictHostKeyChecking=no jrrsync@build-upload.jabref.org \
294- "df --output=pcent /var/www/builds.jabref.org | tail -n1 | tr -dc '0-9'")
295- echo "Remote usage: $USAGE%"
296- if [ "$USAGE" -lt 90 ]; then
297- echo "available=true" >> "$GITHUB_OUTPUT"
298- else
299- echo "available=false" >> "$GITHUB_OUTPUT"
300- fi
301362 - name : Setup rsync (macOS)
302- if : ${{ (steps.diskspace .outputs.available == 'true') && (startsWith(matrix.os, 'macos') && (needs.conditions.outputs.upload-to-builds-jabref-org == 'true')) }}
363+ if : ${{ (needs.disk-space-check .outputs.available == 'true') && (startsWith(matrix.os, 'macos') && (needs.conditions.outputs.upload-to-builds-jabref-org == 'true')) }}
303364 run : brew install rsync
304365 - name : Setup rsync (Windows)
305- if : ${{ (steps.diskspace .outputs.available == 'true') && (matrix.os == 'windows-latest') }}
366+ if : ${{ (needs.disk-space-check .outputs.available == 'true') && (matrix.os == 'windows-latest') }}
306367 # We want to have rsync available at this place to avoid uploading and downloading from GitHub artifact store (taking > 5 minutes in total)
307368 # We cannot use "action-rsyncer", because that requires Docker which is unavailable on Windows
308369 # We cannot use "setup-rsync", because that does not work on Windows
309370 # We do not use egor-tensin/setup-cygwin@v4, because it replaces the default shell
310371 # We need to use v6.4.4 as v6.4.5 misses "lib\rsync\tools\bin\ssh.exe"
311372 run : choco install rsync --version=6.4.4
312373 - name : Upload jabgui to builds.jabref.org (Windows)
313- if : ${{ (steps.diskspace .outputs.available == 'true') && (matrix.os == 'windows-latest') }}
374+ if : ${{ (needs.disk-space-check .outputs.available == 'true') && (matrix.os == 'windows-latest') }}
314375 shell : cmd
315376 # for rsync installed by chocolatey, we need the ssh.exe delivered with that installation
316377 run : |
317378 rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" -e 'C:\ProgramData\chocolatey\lib\rsync\tools\bin\ssh.exe -p 9922 -i sshkey -o StrictHostKeyChecking=no' jabgui/build/packages/${{ matrix.os }}/ jrrsync@build-upload.jabref.org:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/ || true
318379 - name : Upload jabkkit to builds.jabref.org (Windows)
319- if : ${{ (steps.diskspace .outputs.available == 'true') && (matrix.os == 'windows-latest') }}
380+ if : ${{ (needs.disk-space-check .outputs.available == 'true') && (matrix.os == 'windows-latest') }}
320381 shell : cmd
321382 run : |
322383 rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" -e 'C:\ProgramData\chocolatey\lib\rsync\tools\bin\ssh.exe -p 9922 -i sshkey -o StrictHostKeyChecking=no' jabkit/build/packages/${{ matrix.os }}/ jrrsync@build-upload.jabref.org:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/ || true
323384 - name : Upload jabls-cli to builds.jabref.org (Windows)
324- if : ${{ (steps.diskspace .outputs.available == 'true') && (matrix.os == 'windows-latest') }}
385+ if : ${{ (needs.disk-space-check .outputs.available == 'true') && (matrix.os == 'windows-latest') }}
325386 shell : cmd
326387 run : |
327388 rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" -e 'C:\ProgramData\chocolatey\lib\rsync\tools\bin\ssh.exe -p 9922 -i sshkey -o StrictHostKeyChecking=no' jabls-cli/build/packages/${{ matrix.os }}/ jrrsync@build-upload.jabref.org:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/ || true
328389 - name : Upload jabgui to builds.jabref.org (linux, macOS)
329- if : ${{ (steps.diskspace .outputs.available == 'true') && ((startsWith(matrix.os, 'macos') && (needs.conditions.outputs.should-notarize != 'true')) || startsWith(matrix.os, 'ubuntu')) }}
390+ if : ${{ (needs.disk-space-check .outputs.available == 'true') && ((startsWith(matrix.os, 'macos') && (needs.conditions.outputs.should-notarize != 'true')) || startsWith(matrix.os, 'ubuntu')) }}
330391 shell : bash
331392 run : |
332393 rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" -e 'ssh -p 9922 -i sshkey -o StrictHostKeyChecking=no' jabgui/build/packages/${{ matrix.os }}/ jrrsync@build-upload.jabref.org:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/ || true
333394 - name : Upload jabkit to builds.jabref.org (linux, macOS)
334- if : ${{ (steps.diskspace .outputs.available == 'true') && (startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')) }}
395+ if : ${{ (needs.disk-space-check .outputs.available == 'true') && (startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')) }}
335396 shell : bash
336397 run : |
337398 rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" -e 'ssh -p 9922 -i sshkey -o StrictHostKeyChecking=no' jabkit/build/packages/${{ matrix.os }}/ jrrsync@build-upload.jabref.org:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/ || true
338399 - name : Upload jabls-cli to builds.jabref.org (linux, macOS)
339- if : ${{ (steps.diskspace .outputs.available == 'true') && (startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')) }}
400+ if : ${{ (needs.disk-space-check .outputs.available == 'true') && (startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')) }}
340401 shell : bash
341402 run : |
342403 rsync -rt --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r --itemize-changes --stats --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" -e 'ssh -p 9922 -i sshkey -o StrictHostKeyChecking=no' jabls-cli/build/packages/${{ matrix.os }}/ jrrsync@build-upload.jabref.org:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/ || true
0 commit comments