Improve UPX install for CI

This commit is contained in:
Gabriel Simmer 2020-04-03 13:47:16 +01:00
parent a5494c8811
commit 2ab4de5526
No known key found for this signature in database
GPG key ID: 33BA4D83B160A0A9

View file

@ -16,11 +16,13 @@ jobs:
- run: - run:
name: Install UPX name: Install UPX
command: | command: |
echo 'export PATH=$PATH:/home/circleci/upx/bin' >> $BASH_ENV
if ! type "upx" > /dev/null; then if ! type "upx" > /dev/null; then
wget https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz wget https://github.com/upx/upx/releases/download/v3.96/upx-3.96-amd64_linux.tar.xz
tar xf upx-3.96-amd64_linux.tar.xz tar xf upx-3.96-amd64_linux.tar.xz
sudo mv upx-3.96-amd64_linux/upx /usr/local/bin mkdir -p /home/circleci/upx/bin
chmod +x /usr/local/bin/upx mv upx-3.96-amd64_linux/upx /home/circleci/upx/bin
chmod +x /home/circleci/upx/bin/upx
fi fi
- run: - run:
command: make dist command: make dist
@ -33,7 +35,7 @@ jobs:
- save_cache: - save_cache:
key: upx-3.96 key: upx-3.96
paths: paths:
- /usr/local/bin/upx - /home/circleci/upx
test: test:
docker: docker:
- image: cimg/go:1.14 - image: cimg/go:1.14