Modify .gitea/workflows/BuildTestPublish.yaml
Some checks failed
Build-Test-Publish / build (linux/amd64) (push) Failing after 11s
Build-Test-Publish / build (linux/arm64) (push) Successful in 49s
Build-Test-Publish / test-install-from-scratch (linux/amd64) (push) Has been skipped
Build-Test-Publish / test-install-from-scratch (linux/arm64) (push) Has been skipped

This commit is contained in:
Your Name 2025-06-22 18:19:30 +12:00
parent 492a72275d
commit 41ceab9686
2 changed files with 41 additions and 2 deletions

View File

@ -25,8 +25,7 @@ jobs:
username: DoesntMatter
password: ${{ secrets.DOCKER_PUSH_TOKEN }}
- name: install upx
run: |
sudo apt-get install -y upx
run: ./install_upx.sh
- name: Build Test Publish All
run: |
SOS_WRITE_TOKEN=${{ secrets.SOS_WRITE_TOKEN }} ./buildtestpublish_all.sh

40
install_upx.sh Executable file
View File

@ -0,0 +1,40 @@
#!/bin/bash
set -euo pipefail
# Determine architecture
ARCH=$(uname -m)
case $ARCH in
x86_64)
UPX_ARCH="amd64"
;;
aarch64)
UPX_ARCH="arm64"
;;
*)
echo "Unsupported architecture: $ARCH"
exit 1
;;
esac
# Download and install UPX v5.0.1
UPX_VERSION="5.0.1"
UPX_FILE="upx-${UPX_VERSION}-${UPX_ARCH}_linux.tar.xz"
UPX_URL="https://github.com/upx/upx/releases/download/v${UPX_VERSION}/${UPX_FILE}"
echo "Downloading UPX ${UPX_VERSION} for ${UPX_ARCH}..."
curl -L -o "${UPX_FILE}" "${UPX_URL}"
# Extract UPX
tar -xf "${UPX_FILE}"
# Install to /usr/local/bin
sudo cp "upx-${UPX_VERSION}-${UPX_ARCH}_linux/upx" /usr/local/bin/
sudo chmod +x /usr/local/bin/upx
# Verify installation
upx --version
# Cleanup
rm -rf "${UPX_FILE}" "upx-${UPX_VERSION}-${UPX_ARCH}_linux"
echo "UPX ${UPX_VERSION} installed successfully!"