mirror of https://github.com/upx/upx.git
48 lines
3.0 KiB
YAML
48 lines
3.0 KiB
YAML
# build under various Alpine Linux versions with clang and gcc
|
|
|
|
name: 'Weekly CI - Alpine Linux'
|
|
|
|
on:
|
|
schedule: [cron: '10 4 * * 3'] # run weekly Wednesday 04:10 UTC
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
job-alpine-cmake:
|
|
strategy:
|
|
fail-fast: false
|
|
# matrix: { container: ['alpine:3.12','alpine:3.18','alpine:edge','i386/alpine:edge'] }
|
|
matrix: { container: ['alpine:3.9','alpine:3.10','alpine:3.11','alpine:3.12','alpine:3.13','alpine:3.14','alpine:3.15','alpine:3.16','alpine:3.17','alpine:3.18','alpine:edge','i386/alpine:edge'] }
|
|
name: ${{ format('container {0}', matrix.container) }}
|
|
runs-on: ubuntu-latest
|
|
container: ${{ matrix.container }}
|
|
env: { UPX_CMAKE_CONFIG_FLAGS: '-DCMAKE_VERBOSE_MAKEFILE=ON' }
|
|
steps:
|
|
- name: ${{ format('Install packages {0}', matrix.container) }}
|
|
run: 'apk update && apk upgrade && apk add 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
|
|
x="$(apk list -I "$(apk info -Wq "$(which clang)")")"; echo "clang_package=${x%% *}" >> $GITHUB_ENV
|
|
x="$(apk list -I "$(apk info -Wq "$(which gcc)")")"; echo "gcc_package=${x%% *}" >> $GITHUB_ENV
|
|
echo "artifact_name=upx-${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}-weekly-ci-alpine-${{ matrix.container }}" | sed 's/[^=0-9a-zA-Z_.-]/-/g' >> $GITHUB_ENV
|
|
- name: ${{ format('Build clang Release with {0}', env.clang_package) }}
|
|
run: 'make -C upx UPX_XTARGET=clang-static CC="clang -static" CXX="clang++ -static"'
|
|
- name: ${{ format('Build clang Debug with {0}', env.clang_package) }}
|
|
run: 'make -C upx UPX_XTARGET=clang-static CC="clang -static" CXX="clang++ -static" xtarget/debug'
|
|
- name: ${{ format('Build gcc Release with {0}', env.gcc_package) }}
|
|
run: 'make -C upx UPX_XTARGET=gcc-static CC="gcc -static" CXX="g++ -static"'
|
|
- name: ${{ format('Build gcc Debug with {0}', env.gcc_package) }}
|
|
run: 'make -C upx UPX_XTARGET=gcc-static CC="gcc -static" CXX="g++ -static" xtarget/debug'
|
|
- { 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/') }} # i386: missing nodejs on host
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ env.artifact_name }}
|
|
path: 'upx*/build/*/*/*/upx'
|
|
- { name: 'Run basic tests clang Release', run: 'make -C upx/build/xtarget/clang-static/release test' }
|
|
- { name: 'Run basic tests clang Debug', run: 'make -C upx/build/xtarget/clang-static/debug test' }
|
|
- { name: 'Run basic tests gcc Release', run: 'make -C upx/build/xtarget/gcc-static/release test' }
|
|
- { name: 'Run basic tests gcc Debug', run: 'make -C upx/build/xtarget/gcc-static/debug test' }
|