Skip to content

Commit

Permalink
CI: Optimize packaging in workflow
Browse files Browse the repository at this point in the history
Add garbage collector and compress package before sending to Artifactory
Switched from tar gzip to 7z

Signed-off-by: Jakub Ciesla <[email protected]>
  • Loading branch information
jaci-nordic authored and DatGizmo committed Sep 26, 2024
1 parent 125d58f commit 13fb600
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/src-mirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,17 @@ jobs:
with:
git-fetch-depth: 0
path: workspace/nrf
west-update-args: '--group-filter=+babblesim,+sidewalk'

- name: Create tar
run: >
tar -C ./workspace -cvf src.tar.gz .
- name: Configure git and run garbage collection
run: |
cd workspace/nrf
git config --global pack.windowMemory "32m" &&
west forall -c 'git gc --prune --aggressive'
- name: Create 7z archive
run: |
7z a -t7z src.7z ./workspace/
- name: Set up JFrog CLI
uses: jfrog/setup-jfrog-cli@v4
Expand All @@ -25,7 +32,7 @@ jobs:
env:
ARTIFACTORY_URL: https://eu.files.nordicsemi.com/artifactory
REPOSITORY: ncs-src-mirror
FILE_PATH: src.tar.gz
FILE_PATH: src.7z
TARGET_PATH: external/${{ github.ref_name }}/
run: >
jfrog rt u $FILE_PATH $REPOSITORY/$TARGET_PATH
Expand Down

0 comments on commit 13fb600

Please sign in to comment.