mirror of https://github.com/upx/upx.git
CI updates
This commit is contained in:
parent
3b7d25ac49
commit
f6aedb35ce
|
@ -32,7 +32,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
# this seems to be needed when running in a container (beause of UID mismatch??)
|
# this seems to be needed when running in a container (beause of UID mismatch??)
|
||||||
git config --global --add safe.directory '*'
|
git config --global --add safe.directory '*'
|
||||||
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx .
|
git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" .
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
- name: 'Perform clang-analyzer scan-build Analysis Debug'
|
- name: 'Perform clang-analyzer scan-build Analysis Debug'
|
||||||
run: 'make build/analyze/clang-analyzer/debug'
|
run: 'make build/analyze/clang-analyzer/debug'
|
||||||
|
|
|
@ -30,7 +30,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
# this seems to be needed when running in a container (beause of UID mismatch??)
|
# this seems to be needed when running in a container (beause of UID mismatch??)
|
||||||
git config --global --add safe.directory '*'
|
git config --global --add safe.directory '*'
|
||||||
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx .
|
git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" .
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
- name: 'Perform clang-tidy Analysis Debug'
|
- name: 'Perform clang-tidy Analysis Debug'
|
||||||
run: 'make -k build/analyze/clang-tidy/debug'
|
run: 'make -k build/analyze/clang-tidy/debug'
|
||||||
|
|
|
@ -39,7 +39,7 @@ jobs:
|
||||||
adduser upx -u 2000 -D && cd /home/upx && chmod 00700 . && chown -R upx:upx .
|
adduser upx -u 2000 -D && cd /home/upx && chmod 00700 . && chown -R upx:upx .
|
||||||
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
|
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
|
||||||
run: |
|
run: |
|
||||||
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx "upx with space"
|
git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" "upx with space"
|
||||||
git -C "upx with space" submodule update --init
|
git -C "upx with space" submodule update --init
|
||||||
- name: 'Build by-hand with /bin/sh'
|
- name: 'Build by-hand with /bin/sh'
|
||||||
run: '/bin/sh "./upx with space/misc/scripts/build_upx_by_hand.sh"'
|
run: '/bin/sh "./upx with space/misc/scripts/build_upx_by_hand.sh"'
|
||||||
|
@ -117,7 +117,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
|
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
|
||||||
run: |
|
run: |
|
||||||
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx "upx with space"
|
git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" "upx with space"
|
||||||
git -C "upx with space" submodule update --init
|
git -C "upx with space" submodule update --init
|
||||||
- name: 'Build by-hand with /bin/sh'
|
- name: 'Build by-hand with /bin/sh'
|
||||||
run: 'top_srcdir="$PWD/upx with space" /bin/sh "./upx with space/misc/scripts/build_upx_by_hand.sh"'
|
run: 'top_srcdir="$PWD/upx with space" /bin/sh "./upx with space/misc/scripts/build_upx_by_hand.sh"'
|
||||||
|
@ -145,7 +145,7 @@ jobs:
|
||||||
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
|
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx "upx with space"
|
git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" "upx with space"
|
||||||
git -C "upx with space" submodule update --init
|
git -C "upx with space" submodule update --init
|
||||||
- name: 'Build by-hand with bash'
|
- name: 'Build by-hand with bash'
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
@ -26,12 +26,14 @@ jobs:
|
||||||
- { os: windows-2022, cc: cl, cxx: cl, vsversion: 2022, arch: amd64 }
|
- { os: windows-2022, cc: cl, cxx: cl, vsversion: 2022, arch: amd64 }
|
||||||
- { os: windows-2022, cc: cl, cxx: cl, vsversion: 2022, arch: amd64_arm64 }
|
- { os: windows-2022, cc: cl, cxx: cl, vsversion: 2022, arch: amd64_arm64 }
|
||||||
- { os: windows-2022, cc: cl, cxx: cl, vsversion: 2022, arch: amd64_x86 }
|
- { os: windows-2022, cc: cl, cxx: cl, vsversion: 2022, arch: amd64_x86 }
|
||||||
# clang-cl (from MSVC)
|
# clang-cl
|
||||||
- { os: windows-2019, cc: clang-cl, cxx: clang-cl, vsversion: 2019, arch: amd64 }
|
- { os: windows-2019, cc: clang-cl, cxx: clang-cl, vsversion: 2019, arch: amd64 }
|
||||||
- { os: windows-2022, cc: clang-cl, cxx: clang-cl, vsversion: 2022, arch: amd64 }
|
- { os: windows-2022, cc: clang-cl, cxx: clang-cl, vsversion: 2022, arch: amd64 }
|
||||||
# clang
|
# clang
|
||||||
|
- { os: windows-2019, cc: clang, cxx: 'clang++', arch: amd64, xflags: '-static' }
|
||||||
- { os: windows-2022, cc: clang, cxx: 'clang++', arch: amd64, xflags: '-static' }
|
- { os: windows-2022, cc: clang, cxx: 'clang++', arch: amd64, xflags: '-static' }
|
||||||
# gcc (mingw-gcc)
|
# gcc (mingw-gcc)
|
||||||
|
- { os: windows-2019, cc: gcc, cxx: 'g++', arch: amd64, xflags: '-static' }
|
||||||
- { os: windows-2022, cc: gcc, cxx: 'g++', arch: amd64, xflags: '-static' }
|
- { os: windows-2022, cc: gcc, cxx: 'g++', arch: amd64, xflags: '-static' }
|
||||||
env:
|
env:
|
||||||
CC: ${{ matrix.cc }} ${{ matrix.xflags }}
|
CC: ${{ matrix.cc }} ${{ matrix.xflags }}
|
||||||
|
@ -52,7 +54,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
command -v ninja >/dev/null || choco install -y --no-progress ninja
|
command -v ninja >/dev/null || choco install -y --no-progress ninja
|
||||||
xtarget="windows-ninja-${{ matrix.cc }}-${{ matrix.vsversion }}-${{ matrix.arch}}"
|
xtarget="${{ matrix.os }}-ninja-${{ matrix.cc }}-${{ matrix.vsversion }}-${{ matrix.arch}}"
|
||||||
echo "xtarget=$xtarget" >> $GITHUB_ENV
|
echo "xtarget=$xtarget" >> $GITHUB_ENV
|
||||||
- name: 'Build cmake Ninja Debug'
|
- name: 'Build cmake Ninja Debug'
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
@ -1,24 +1,41 @@
|
||||||
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
|
# Copyright (C) Markus Franz Xaver Johannes Oberhumer
|
||||||
# BS BuildSystem: build misc
|
# BS BuildSystem: build with misc flags
|
||||||
|
|
||||||
name: 'Weekly CI BS - Misc'
|
name: 'Weekly CI BS - Misc'
|
||||||
on:
|
on:
|
||||||
schedule: [cron: '40 1 * * 3'] # run weekly Wednesday 01:50 UTC
|
schedule: [cron: '50 1 * * 3'] # run weekly Wednesday 01:50 UTC
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
env:
|
env:
|
||||||
CMAKE_REQUIRED_QUIET: "OFF"
|
CMAKE_REQUIRED_QUIET: "OFF"
|
||||||
CTEST_OUTPUT_ON_FAILURE: "ON"
|
CTEST_OUTPUT_ON_FAILURE: "ON"
|
||||||
DEBIAN_FRONTEND: noninteractive
|
DEBIAN_FRONTEND: noninteractive
|
||||||
|
UPX_CMAKE_BUILD_FLAGS: --verbose
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
job-bs-misc: # uses cmake + make
|
BS0:
|
||||||
|
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'
|
if: github.repository_owner == 'upx'
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
container:
|
container:
|
||||||
- 'alpine:3.18'
|
- 'alpine:edge'
|
||||||
- 'i386/alpine:3.18'
|
- 'i386/alpine:edge'
|
||||||
cc:
|
cc:
|
||||||
- 'clang'
|
- 'clang'
|
||||||
- 'gcc'
|
- 'gcc'
|
||||||
|
@ -32,22 +49,62 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: ${{ format('Install packages {0}', matrix.container) }}
|
- name: ${{ format('Install packages {0}', matrix.container) }}
|
||||||
run: 'apk update && apk upgrade && apk add clang cmake g++ git make'
|
run: 'apk update && apk upgrade && apk add clang cmake g++ git make'
|
||||||
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
|
- name: ${{ format('Check out {0} source code', github.ref_name) }}
|
||||||
run: |
|
run: |
|
||||||
# this seems to be needed when running in a container (beause of UID mismatch??)
|
# this seems to be needed when running in a container (beause of UID mismatch??)
|
||||||
git config --global --add safe.directory '*'
|
git config --global --add safe.directory '*'
|
||||||
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx .
|
git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" .
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
# set environment
|
# prepare environment
|
||||||
xflags="-static ${{ matrix.cppflags }}"
|
xflags="-static ${{ matrix.cppflags }}"
|
||||||
case ${{ matrix.cc }} in
|
case ${{ matrix.cc }} in
|
||||||
clang) CC="clang $xflags"; CXX="clang++ $xflags" ;;
|
clang) CC="clang $xflags"; CXX="clang++ $xflags" ;;
|
||||||
gcc) CC="gcc $xflags"; CXX="g++ $xflags" ;;
|
gcc) CC="gcc $xflags"; CXX="g++ $xflags" ;;
|
||||||
*) CC=false; CXX=false ;;
|
*) exit 99 ;;
|
||||||
esac
|
esac
|
||||||
echo -e "CC=$CC\nCXX=$CXX" >> $GITHUB_ENV
|
echo -e "CC=$CC\nCXX=$CXX" >> $GITHUB_ENV
|
||||||
- name: 'Build Debug'
|
- name: 'Build and test Debug'
|
||||||
run: 'make debug && ctest --test-dir build/debug'
|
run: 'echo -e "CC=$CC;\nCXX=$CXX;" && make debug && ctest --test-dir build/debug'
|
||||||
- name: 'Build Release'
|
- name: 'Build and test Release'
|
||||||
if: success() || failure() # run this step even if the previous step failed
|
if: success() || failure() # run this step even if the previous step failed
|
||||||
run: 'make release && ctest --test-dir build/debug'
|
run: 'echo -e "CC=$CC;\nCXX=$CXX;" && make 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 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 release && ctest --test-dir build/release'
|
||||||
|
|
|
@ -75,7 +75,7 @@ jobs:
|
||||||
adduser upx -u 2000 -D && cd /home/upx && chmod 00700 . && chown -R upx:upx .
|
adduser upx -u 2000 -D && cd /home/upx && chmod 00700 . && chown -R upx:upx .
|
||||||
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
|
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
|
||||||
run: |
|
run: |
|
||||||
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx "upx with space"
|
git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" "upx with space"
|
||||||
git -C "upx with space" submodule update --init
|
git -C "upx with space" submodule update --init
|
||||||
|
|
||||||
# build with default C11 and C++17
|
# build with default C11 and C++17
|
||||||
|
|
|
@ -45,7 +45,7 @@ jobs:
|
||||||
mkdir -p -v ~/.wine
|
mkdir -p -v ~/.wine
|
||||||
# this seems to be needed when running in a container (beause of UID mismatch??)
|
# this seems to be needed when running in a container (beause of UID mismatch??)
|
||||||
git config --global --add safe.directory '*'
|
git config --global --add safe.directory '*'
|
||||||
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx .
|
git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" .
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
- name: 'Build cmake extra/cross-windows-mingw32/debug'
|
- name: 'Build cmake extra/cross-windows-mingw32/debug'
|
||||||
if: ${{ matrix.i686_mingw }}
|
if: ${{ matrix.i686_mingw }}
|
||||||
|
|
|
@ -37,7 +37,7 @@ jobs:
|
||||||
git config --global --add safe.directory '*'
|
git config --global --add safe.directory '*'
|
||||||
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
|
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
|
||||||
run: |
|
run: |
|
||||||
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx .
|
git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" .
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
git clone --depth=1 https://github.com/upx/upx-testsuite ../upx-testsuite
|
git clone --depth=1 https://github.com/upx/upx-testsuite ../upx-testsuite
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue