# Copyright (C) Markus Franz Xaver Johannes Oberhumer # BS BuildSystem: build with misc flags name: 'Weekly CI BS - Misc' on: schedule: [cron: '50 1 * * 3'] # run weekly Wednesday 01:50 UTC workflow_dispatch: env: CMAKE_REQUIRED_QUIET: "OFF" CTEST_OUTPUT_ON_FAILURE: "ON" DEBIAN_FRONTEND: noninteractive UPX_CMAKE_BUILD_FLAGS: --verbose jobs: BS0: if: github.repository_owner == 'upx' runs-on: ubuntu-latest container: 'alpine:edge' steps: - name: 'Install packages' run: | apk update && apk upgrade && apk add bash git perl yq git config --global --add safe.directory '*' git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" . - name: 'Misc checks' run: | cat ./.github/*.yml | yq > /dev/null cat ./.github/*/*.yml | yq > /dev/null bash ./misc/scripts/check_whitespace_git.sh echo "All done." BS1: # uses cmake + make if: github.repository_owner == 'upx' strategy: fail-fast: false matrix: container: - 'alpine:edge' - 'i386/alpine:edge' 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 {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 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" . git submodule update --init # prepare environment xflags="-static ${{ matrix.cppflags }}" case ${{ matrix.cc }} in clang) CC="clang $xflags"; CXX="clang++ $xflags" ;; gcc) CC="gcc $xflags"; CXX="g++ $xflags" ;; *) exit 99 ;; esac echo -e "CC=$CC\nCXX=$CXX" >> $GITHUB_ENV - name: 'Build and test Debug' run: 'echo -e "CC=$CC;\nCXX=$CXX;" && make build/debug && ctest --test-dir build/debug' - name: 'Build and test Release' if: success() || failure() # run this step even if the previous step failed run: 'echo -e "CC=$CC;\nCXX=$CXX;" && make build/release && ctest --test-dir build/release' BS2: # uses cmake + make if: github.repository_owner == 'upx' strategy: fail-fast: false matrix: container: - 'alpine:edge' cc: - 'clang' - 'gcc' cxxflags: - '-std=gnu++20' - '-std=gnu++23' 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 {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 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" . git submodule update --init # prepare environment xflags="-static" case ${{ matrix.cc }} in clang) CC="clang $xflags"; CXX="clang++ $xflags ${{ matrix.cxxflags }}" ;; gcc) CC="gcc $xflags"; CXX="g++ $xflags ${{ matrix.cxxflags }}" ;; *) exit 99 ;; esac echo -e "CC=$CC\nCXX=$CXX" >> $GITHUB_ENV echo "UPX_CONFIG_DISABLE_C_STANDARD=ON" >> $GITHUB_ENV echo "UPX_CONFIG_DISABLE_CXX_STANDARD=ON" >> $GITHUB_ENV - name: 'Build and test Debug' run: 'echo -e "CC=$CC;\nCXX=$CXX;" && make build/debug && ctest --test-dir build/debug' - name: 'Build and test Release' if: success() || failure() # run this step even if the previous step failed run: 'echo -e "CC=$CC;\nCXX=$CXX;" && make build/release && ctest --test-dir build/release'