Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Try to reduce image size #5748

Closed
wants to merge 46 commits into from
Closed
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
54fe80d
Change to rsync
koppor Dec 19, 2019
a12f15a
rsync container runs on linux only -- collect builds and then upload …
koppor Dec 19, 2019
d13d238
Remove obsolete cahce keys - the key is used for both storing and res…
koppor Dec 19, 2019
b803981
jars should be cross-plattform - have cache re-used accross operating…
koppor Dec 19, 2019
d600345
Try to optimize rsync flags
koppor Dec 19, 2019
a745916
Try to use a
koppor Dec 19, 2019
9dea505
Use itemiize-changes
koppor Dec 19, 2019
e2ab3a3
Revert "jars should be cross-plattform - have cache re-used accross o…
koppor Dec 19, 2019
81b26bb
Gralde wrapper is too large on Mac OS X
koppor Dec 19, 2019
de033a4
Try small block size
koppor Dec 19, 2019
d82e83c
Compress more rsync-friendly
koppor Dec 19, 2019
bca3e97
Fix workflow name
koppor Dec 19, 2019
3e167e6
Try to use pigz
koppor Dec 20, 2019
e258aef
pigz already installed
koppor Dec 20, 2019
d7a19f9
Remove very small blocksize argument again
koppor Dec 20, 2019
b643f27
Merge remote-tracking branch 'origin/master' into change-upload-back-…
koppor Dec 20, 2019
c2d093b
Fix indent
koppor Dec 20, 2019
554b781
Try to fix timestamp
koppor Dec 20, 2019
583d8fc
Adress comments and fix yml
koppor Dec 20, 2019
8d597ad
Do not use print(f of Python 3.6
koppor Dec 20, 2019
8dd8b63
Try to fix pyhton
koppor Dec 20, 2019
63beb35
Fix pyhton
koppor Dec 20, 2019
2a1e1a2
Fix format for touch
koppor Dec 20, 2019
d868698
Fix parameters for touch
koppor Dec 20, 2019
3d292c1
Try to streamline time stamps
koppor Dec 20, 2019
3538e13
Should work now
koppor Dec 20, 2019
3075f53
Upload master branch only
koppor Dec 20, 2019
69d93fe
Reorder and upload portable jar
koppor Dec 20, 2019
b8063ab
Fix
koppor Dec 20, 2019
338385c
Fix path
koppor Dec 20, 2019
5132616
Merge remote-tracking branch 'origin/master' into change-upload-back-…
koppor Dec 20, 2019
4c9514c
Debug file massage
koppor Dec 20, 2019
b4e5853
Fix path
koppor Dec 20, 2019
48df7bd
Fix path
koppor Dec 20, 2019
0296fc3
Try to fix windows and Mac OS X build
koppor Dec 20, 2019
09d06d2
Fix order
koppor Dec 20, 2019
cab9cf6
Use cache config from test.yml
koppor Dec 20, 2019
a803cce
Merge remote-tracking branch 'origin/master' into change-upload-back-…
koppor Dec 20, 2019
d86d7f3
Merge remote-tracking branch 'origin/master' into change-upload-back-…
koppor Dec 20, 2019
8960972
Remove obsolete find call
koppor Dec 20, 2019
a33c8b3
Fix upload names
koppor Dec 20, 2019
3137c2a
Locate jars which will be deleted (will be the basis to remove them b…
koppor Dec 21, 2019
092bd7e
Quick idea: update jlink to 2.17.0
koppor Dec 21, 2019
3e2b8f0
Merge remote-tracking branch 'origin/master' into change-upload-back-…
koppor Dec 22, 2019
64a1dca
Add debug statement
koppor Dec 22, 2019
37ca3f8
Merge remote-tracking branch 'origin/master' into change-upload-back-…
koppor Mar 21, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 46 additions & 1 deletion .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,50 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Build runtime image
run: ./gradlew -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" jlinkZip
- name: Debug state after build
run: |
find build -name "JabRef*.jar"
shell: bash
- name: Build installer
run: ./gradlew -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" jpackage
shell: bash
- name: Package application image
- name: Save portable jar, fix and output filename of portable jar
id: portablejar
if: matrix.displayName == 'linux'
run: |
mv build/distribution/JabRef/lib/app/mods/JabRef.merged*.jar JabRef-${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}.jar
echo "::set-output name=file::$(ls JabRef*.jar)"
shell: bash
- name: Upload portable jar
if: matrix.displayName == 'linux'
uses: actions/upload-artifact@master
with:
name: JabRef-jar
path: ${{ steps.portablejar.outputs.file }}
# In case the timestamp of a file changes, the tar archive changes, because tar also stores file meta such as the file name and the file creation date.
# Therefore, the gzip file changes.
# Therefore, data needs to be synced by rsync.
# To prevent that, we set the timestamp to something "OKish" (not confiusing users that hard)
# We use "last monday", 00:00 as time stamp
- name: Determine timestamp for build
id: timestampforbuild
run: |
from datetime import datetime
from datetime import date
from datetime import timedelta
lastmonday = date.today().toordinal()
lastmonday = lastmonday - (lastmonday % 7) + 1
timestamp = datetime.fromordinal(lastmonday).strftime("%y%m%d")
print("::set-output name=timestamp::" + timestamp)
shell: python
- name: Post-process build
# Remove obsolete jar, update timestamps
run: |
find build -name "JabRef*.jar"
find build -name "JabRef*.jar" | xargs rm
find build -type f -exec touch -t ${{ steps.timestampforbuild.outputs.timestamp }}0000 {} \;
shell: bash
- name: Package application image
run: ${{ matrix.archivePortable }}
shell: bash
- name: Rename files
Expand Down Expand Up @@ -119,6 +159,11 @@ jobs:
with:
name: JabRef-macOS
path: build/distribution/
- name: Get portable JAR
uses: actions/download-artifact@master
with:
name: JabRef-jar
path: build/distribution/
- name: Deploy to builds.jabref.org
id: deploy
uses: Pendect/action-rsyncer@v1.1.0
Expand Down