mirror of
https://github.com/upx/upx
synced 2025-10-12 20:59:43 +08:00

Changes include: - extract headers.h from conf.h - use "byte" in some more places - unify "const" coding style - pefile.cpp: make sort order deterministic - simplify some other pefile.cpp code - CI updates
33 lines
1.7 KiB
YAML
33 lines
1.7 KiB
YAML
# minimal GitHub CI building UPX with clang and gcc in an Alpine Linux container
|
|
|
|
name: 'CI - Minimal CI with Alpine Linux'
|
|
|
|
on: [workflow_dispatch]
|
|
jobs:
|
|
job-alpine-cmake:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix: {container: ['alpine:3.12','alpine:3.17','alpine:edge','i386/alpine:edge']}
|
|
name: ${{ format('container {0}', matrix.container) }}
|
|
runs-on: ubuntu-latest
|
|
container: ${{ matrix.container }}
|
|
steps:
|
|
- name: ${{ format('Install packages {0}', matrix.container) }}
|
|
run: 'apk update && apk upgrade && apk add bash clang cmake g++ git make'
|
|
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
|
|
run: |
|
|
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx
|
|
git -C upx submodule update --init
|
|
echo "artifact_name=upx-${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}-minimal-ci-${{ matrix.container }}" | sed 's/[^=0-9a-zA-Z_.-]/-/g' >> $GITHUB_ENV
|
|
- { name: 'Build clang', run: 'make -C upx UPX_XTARGET=clang-static CC="clang -static" CXX="clang++ -static"' }
|
|
- { name: 'Build gcc', run: 'make -C upx UPX_XTARGET=gcc-static CC="gcc -static" CXX="g++ -static"' }
|
|
- { name: 'Strip release binaries', run: 'strip -p --strip-unneeded upx/build/*/*/release/upx' }
|
|
- name: ${{ format('Upload artifact {0}', env.artifact_name) }}
|
|
if: ${{ !startsWith(matrix.container, 'i386/alpine') }} # missing nodejs
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ env.artifact_name }}
|
|
path: 'upx*/build/*/*/*/upx'
|
|
- { name: 'Run basic tests clang', run: 'make -C upx/build/xtarget/clang-static/release test' }
|
|
- { name: 'Run basic tests gcc', run: 'make -C upx/build/xtarget/gcc-static/release test' }
|