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

CI/CD: Switch from gzip to XZ for archive compression #1606

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
sudo du -hs / 2> /dev/null || true

- name: tarball build
run: tar czvf riscv.tar.gz -C /opt/ riscv/
run: XZ_OPT="--threads=0 -6e" tar cJf riscv.tar.xz -C /opt/ riscv/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious - how were the XZ_OPT options chosen?
Why --threads=0? Does "parallel" processing cause problems with the resulting output?
Isn't -6 compression level the default anyway so why specify it explicitly?

Could the XZ_OPT settings be specified once and reused elsewhere so that if they ever need to be tweaked it is just a single line change?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When T=0 xz uses all available cores/hardware threads, -e means extreme (so it's not 6 which is the default but 6e).


- name: generate prebuilt toolchain name
id: toolchain-name-generator
Expand All @@ -84,7 +84,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.toolchain-name-generator.outputs.TOOLCHAIN_NAME }}
path: riscv.tar.gz
path: riscv.tar.xz

test-sim:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
sudo make report-${{ matrix.mode }} -j $(nproc)

- name: tarball build
run: tar czvf riscv.tar.gz -C /opt/ riscv/
run: XZ_OPT="--threads=0 -6e" tar cJf riscv.tar.xz -C /opt/ riscv/

- name: generate prebuilt toolchain name
id: toolchain-name-generator
Expand All @@ -173,4 +173,4 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.toolchain-name-generator.outputs.TOOLCHAIN_NAME }}
path: riscv.tar.gz
path: riscv.tar.xz
4 changes: 2 additions & 2 deletions .github/workflows/nightly-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
sudo du -hs / 2> /dev/null || true

- name: tarball build
run: tar czvf riscv.tar.gz -C /opt/ riscv/
run: XZ_OPT="--threads=0 -6e" tar cJf riscv.tar.xz -C /opt/ riscv/

- name: generate prebuilt toolchain name
id: toolchain-name-generator
Expand All @@ -117,7 +117,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.toolchain-name-generator.outputs.TOOLCHAIN_NAME }}
path: riscv.tar.gz
path: riscv.tar.xz


create-release:
Expand Down