# Copyright (C) Markus Franz Xaver Johannes Oberhumer # BS BuildSystem: build misc name: 'Weekly CI BS - Misc' on: schedule: [cron: '40 1 * * 3'] # run weekly Wednesday 01:50 UTC workflow_dispatch: env: CMAKE_REQUIRED_QUIET: "OFF" CTEST_OUTPUT_ON_FAILURE: "ON" DEBIAN_FRONTEND: noninteractive jobs: job-bs-misc: # uses cmake + make if: github.repository_owner == 'upx' strategy: fail-fast: false matrix: container: - 'alpine:3.18' - 'i386/alpine:3.18' cc: - 'clang' - 'gcc' cppflags: - '-DWITH_XSPAN=0' - '-DWITH_XSPAN=1' - '-DWITH_XSPAN=2' - '-DDOCTEST_CONFIG_DISABLE' runs-on: ubuntu-latest container: ${{ matrix.container }} 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: | # this seems to be needed when running in a container (beause of UID mismatch??) git config --global --add safe.directory '*' git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx . git submodule update --init # set environment xflags="-static ${{ matrix.cppflags }}" case ${{ matrix.cc }} in clang) CC="clang $xflags"; CXX="clang++ $xflags" ;; gcc) CC="gcc $xflags"; CXX="g++ $xflags" ;; *) CC=false; CXX=false ;; esac echo -e "CC=$CC\nCXX=$CXX" >> $GITHUB_ENV - name: 'Build Debug' run: 'make debug && ctest --test-dir build/debug' - name: 'Build Release' if: success() || failure() # run this step even if the previous step failed run: 'make release && ctest --test-dir build/debug'