-
Notifications
You must be signed in to change notification settings - Fork 23
CI: optimize disk space and update Fedora base image #261
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b142a6c
Dockerfile: update baseimage
Wenzel a97ec45
ci: aggressive cleanup for check_docker_image and build for Linux jobs
Wenzel 10c06e3
ci: clean dnf cache to free some space on Linux job
Wenzel 5e4097b
ci: install ca-certificates in Dockerfile
Wenzel 665434d
ci: enforce x86_64-pc-windows-gnu target
Wenzel bc4753f
ci: free more space
Wenzel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -399,6 +399,53 @@ jobs: | |
| with: | ||
| egress-policy: audit | ||
|
|
||
| - name: Aggressive cleanup | ||
| run: | | ||
| # Remove Java (JDKs) | ||
| sudo rm -rf /usr/lib/jvm | ||
|
|
||
| # Remove .NET SDKs | ||
| sudo rm -rf /usr/share/dotnet | ||
|
|
||
| # Remove Swift toolchain | ||
| sudo rm -rf /usr/share/swift | ||
|
|
||
| # Remove Haskell (GHC) | ||
| sudo rm -rf /usr/local/.ghcup | ||
|
|
||
| # Rustup | ||
| sudo rm -rf /home/runner/.rustup | ||
|
|
||
| # Remove Julia | ||
| sudo rm -rf /usr/local/julia* | ||
|
|
||
| # Remove Android SDKs | ||
| sudo rm -rf /usr/local/lib/android | ||
|
|
||
| # Remove Chromium (optional if not using for browser tests) | ||
| sudo rm -rf /usr/local/share/chromium | ||
|
|
||
| # Google Cloud SDK | ||
| sudo rm -rf /usr/lib/google-cloud-sdk | ||
|
|
||
| # Remove Microsoft/Edge and Google Chrome builds | ||
| sudo rm -rf /opt/microsoft /opt/google | ||
|
|
||
| # Remove Azure CLI | ||
| sudo rm -rf /opt/az | ||
|
|
||
| # Remove PowerShell | ||
| sudo rm -rf /usr/local/share/powershell | ||
|
|
||
| # Remove tool cache (not needed, Rust installed via dtolnay action) | ||
| sudo rm -rf /opt/hostedtoolcache | ||
|
|
||
| # Remove GHC binaries | ||
| sudo rm -rf /opt/ghc | ||
|
|
||
| # Remove Homebrew for Linux | ||
| sudo rm -rf /home/linuxbrew | ||
|
|
||
| - name: Add ISPM to PATH | ||
| run: | | ||
| echo "${HOME}/simics/ispm/" >> "${GITHUB_PATH}" | ||
|
|
@@ -413,6 +460,8 @@ jobs: | |
| glibc-static.i686 gtk3 jq lld lld-devel lld-libs llvm llvm-libs \ | ||
| llvm-static make mesa-libgbm mtools ninja-build openssl \ | ||
| openssl-devel openssl-libs python3 python3-pip yamllint | ||
| dnf clean all | ||
| rm -rf /var/cache/dnf | ||
|
|
||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
|
|
@@ -489,6 +538,7 @@ jobs: | |
| "${{ env.PUBLIC_SIMICS_PKGS_URL }}" && \ | ||
| tar -C "${HOME}/simics/ispm" --strip-components=1 \ | ||
| -xvf "${HOME}/simics/ispm.tar.gz" | ||
| rm -f "${HOME}/simics/ispm.tar.gz" | ||
|
|
||
| - name: Set up SIMICS Install Directory | ||
| run: | | ||
|
|
@@ -499,6 +549,7 @@ jobs: | |
| run: | | ||
| ispm packages --install-bundle "${HOME}/simics/simics.ispm" \ | ||
| --non-interactive --trust-insecure-packages | ||
| rm "${HOME}/simics/simics.ispm" | ||
|
|
||
| - name: Install SIMICS Build | ||
| run: | | ||
|
|
@@ -507,6 +558,11 @@ jobs: | |
| - name: Build TSFFS Package | ||
| run: | | ||
| cargo simics-build -r | ||
| cargo clean | ||
| env: | ||
| CARGO_INCREMENTAL: 0 # Disable incremental compilation to save disk space | ||
| RUSTFLAGS: "-C debuginfo=0" # Disable debug info to reduces intermediate file sizes | ||
| CARGO_PROFILE_RELEASE_DEBUG: 0 | ||
|
|
||
| - name: CT39 - Clippy Check Project | ||
| run: | | ||
|
|
@@ -529,6 +585,10 @@ jobs: | |
| run: | | ||
| SIMICS_TEST_CLEANUP_EACH=1 SIMICS_TEST_LOCAL_PACKAGES_ONLY=1 cargo test --no-fail-fast -r _latest || ( echo "❗ Tests failed" && exit 1 ) | ||
| echo "✅ Tests passed" | ||
| env: | ||
| CARGO_INCREMENTAL: 0 # Disable incremental compilation to save disk space | ||
| RUSTFLAGS: "-C debuginfo=0" # Disable debug info to reduces intermediate file sizes | ||
|
Comment on lines
+589
to
+590
|
||
| CARGO_PROFILE_TEST_DEBUG: 0 | ||
|
|
||
| - name: Build Docs | ||
| run: | | ||
|
|
@@ -618,10 +678,11 @@ jobs: | |
| with: | ||
| lfs: true | ||
|
|
||
| # enforce the gnu target here, since cargo-simics-build isn't compatible with x86_64-pc-windows-msvc | ||
| - name: Setup, Build, and Install TSFFS | ||
| run: | | ||
| cargo install cargo-simics-build | ||
| cargo simics-build -r | ||
| cargo simics-build -r --target x86_64-pc-windows-gnu | ||
|
|
||
| - name: Upload Distribution Package | ||
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | ||
|
|
@@ -685,7 +746,7 @@ jobs: | |
| - name: Set up Python 3.11 | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: '3.11' | ||
| python-version: "3.11" | ||
|
|
||
| - name: Extract Rust channel from rust-toolchain.toml | ||
| id: rust-channel | ||
|
|
@@ -727,6 +788,38 @@ jobs: | |
| with: | ||
| egress-policy: audit | ||
|
|
||
| - name: Aggressive cleanup | ||
| run: | | ||
| # Remove Java (JDKs) | ||
| sudo rm -rf /usr/lib/jvm | ||
|
|
||
| # Remove .NET SDKs | ||
| sudo rm -rf /usr/share/dotnet | ||
|
|
||
| # Remove Swift toolchain | ||
| sudo rm -rf /usr/share/swift | ||
|
|
||
| # Remove Haskell (GHC) | ||
| sudo rm -rf /usr/local/.ghcup | ||
|
|
||
| # Remove Julia | ||
| sudo rm -rf /usr/local/julia* | ||
|
|
||
| # Remove Android SDKs | ||
| sudo rm -rf /usr/local/lib/android | ||
|
|
||
| # Remove Chromium (optional if not using for browser tests) | ||
| sudo rm -rf /usr/local/share/chromium | ||
|
|
||
| # Remove Microsoft/Edge and Google Chrome builds | ||
| sudo rm -rf /opt/microsoft /opt/google | ||
|
|
||
| # Remove Azure CLI | ||
| sudo rm -rf /opt/az | ||
|
|
||
| # Remove PowerShell | ||
| sudo rm -rf /usr/local/share/powershell | ||
|
|
||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'reduces' to 'reduce' in comment. Should be 'to reduce intermediate file sizes' for grammatical correctness.