-
Notifications
You must be signed in to change notification settings - Fork 26
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: add a step which uninstalls all potentially left over packages #87
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -168,6 +168,23 @@ jobs: | |||||
msys2 -c 'pacman --noconfirm -Suu' | ||||||
msys2 -c 'pacman -Qkq' | ||||||
|
||||||
- name: Remove potentially left over packages | ||||||
if: ${{ runner.arch == 'ARM64' }} | ||||||
shell: msys2 {0} | ||||||
run: | | ||||||
# Remove everything not needed | ||||||
# XXX: this depends on marix.packages just being base+base-devel | ||||||
KEEP=("base" "base-devel") | ||||||
# https://github.com/msys2/msys2-autobuild/pull/87#issuecomment-2125614088 | ||||||
KEEP+=($(pacman -Sgq mingw-w64-clang-aarch64-toolchain) "zip" "unzip" "vim" "etc-update" "psmisc") | ||||||
pacman -S --noconfirm --needed "${KEEP[@]}" | ||||||
TO_REMOVE=$(comm -23 <(pacman -Qq | sort) <(for tokeep in "${KEEP[@]}"; do pactree -ul "$tokeep" | sed 's/[<>=].*//'; done | sort -u)) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also I don't know if |
||||||
if [[ -n "$TO_REMOVE" ]]; then | ||||||
pacman --noconfirm -Rddn $TO_REMOVE | ||||||
# This shouldn't install anything, but just in case | ||||||
pacman -S --noconfirm --needed ${{ matrix.packages }} "${KEEP[@]}" | ||||||
fi | ||||||
|
||||||
- name: Process build queue | ||||||
env: | ||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||
|
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.