CI updates and assorted cleanups

This commit is contained in:
Markus F.X.J. Oberhumer
2023-11-06 19:29:40 +01:00
parent b6dd61cea8
commit 283ab0e7ea
21 changed files with 462 additions and 85 deletions
+2 -2
View File
@@ -327,7 +327,7 @@ jobs:
git rev-parse --short=12 HEAD > %BDIR%\upx\.GITREV.txt
@REM ===== build bzip2 =====
cd %BDIR%\bzip2
@rem %RUN_CL% -J -O2 -W4 -wd4127 -wd4244 -wd4267 -WX %DEFS% -c %H%\vendor\bzip2\*.c
@rem %RUN_CL% -J -O2 -W4 -wd4127 -wd4244 -wd4267 -WX %DEFS% -DBZ_NO_STDIO -c %H%\vendor\bzip2\*.c
@rem %RUN_LIB% -out:bzip2.lib *.obj
@REM ===== build UCL =====
cd %BDIR%\ucl
@@ -348,7 +348,7 @@ jobs:
set s=%H%\src
cat .GITREV.txt
set /p GITREV=<.GITREV.txt
set UPX_DEFS=-DUPX_CONFIG_DISABLE_WSTRICT=0 -DUPX_CONFIG_DISABLE_WERROR=0 -DWITH_BZIP2=0 -DWITH_ZSTD=0
set UPX_DEFS=-DUPX_CONFIG_DISABLE_WSTRICT=0 -DUPX_CONFIG_DISABLE_WERROR=0 -DWITH_THREADS=0 -DWITH_BZIP2=0 -DWITH_ZSTD=0
set UPX_LIBS=%BDIR%\ucl\ucl.lib %BDIR%\zlib\zlib.lib
@rem set UPX_LIBS=%BDIR%\bzip2\bzip2.lib %BDIR%\ucl\ucl.lib %BDIR%\zlib\zlib.lib %BDIR%\zstd\zstd.lib
set sources=%s%\*.cpp %s%\check\*.cpp %s%\compress\*.cpp %s%\console\*.cpp %s%\filter\*.cpp %s%\util\*.cpp
+1 -1
View File
@@ -17,5 +17,5 @@ jobs:
uses: actions/checkout@v4
with: { submodules: false }
- name: 'Spell check with crate-ci/typos'
uses: crate-ci/typos@47dd2976043bd5c76a33aa9300b328a176a1d6f7 # v1.16.21
uses: crate-ci/typos@0d04ce91a7a8436a6e3c589750514ac586632192 # v1.16.22
with: { config: ./.github/typos_config.toml }
+68 -5
View File
@@ -142,7 +142,7 @@ jobs:
cd "upx with space"/build/by-hand
bash "$testsuite"
job-by-hand-windows: # uses a POSIX-compliant shell
job-by-hand-windows-clang: # uses a POSIX-compliant shell
# ...and also uses a subdirectory "upx with space" in order to detect possible quoting issues
if: github.repository_owner == 'upx'
strategy:
@@ -151,7 +151,7 @@ jobs:
include:
- { os: windows-2019 }
- { os: windows-2022 }
name: ${{ format('by-hand cc {0}', matrix.os) }}
name: ${{ format('by-hand clang {0}', matrix.os) }}
runs-on: ${{ matrix.os }}
steps:
- run: git config --global core.autocrlf false
@@ -160,7 +160,7 @@ jobs:
run: |
git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" "upx with space"
git -C "upx with space" submodule update --init
- name: 'Build by-hand with bash - clang'
- name: 'Build by-hand with bash'
shell: bash
run: |
xflags="-static -Wall -Wextra -Werror"
@@ -169,9 +169,72 @@ jobs:
export zlib_extra_flags="-DHAVE_VSNPRINTF"
export AR_LIBFILE=upx_submodules.lib
CC="clang $xflags" CXX="clang++ -std=gnu++17 $xflags" bash "./upx with space/misc/scripts/build_upx_by_hand.sh"
- name: 'Build by-hand with bash - gcc'
if: success() || failure() # run this step even if the previous step failed
job-by-hand-windows-gcc: # uses a POSIX-compliant shell
# ...and also uses a subdirectory "upx with space" in order to detect possible quoting issues
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix:
include:
- { os: windows-2019 }
- { os: windows-2022 }
name: ${{ format('by-hand gcc {0}', matrix.os) }}
runs-on: ${{ matrix.os }}
steps:
- run: git config --global core.autocrlf false
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
shell: bash
run: |
git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" "upx with space"
git -C "upx with space" submodule update --init
- name: 'Build by-hand with bash'
shell: bash
run: |
xflags="-static -Wall -Wextra -Werror"
CC="gcc $xflags" CXX="g++ -std=gnu++17 $xflags" bash "./upx with space/misc/scripts/build_upx_by_hand.sh"
job-by-hand-windows-msvc: # uses a POSIX-compliant shell
# ...and also uses a subdirectory "upx with space" in order to detect possible quoting issues
if: github.repository_owner == 'upx'
strategy:
fail-fast: false
matrix:
include:
# clang-cl
- { os: windows-2019, vsversion: 2019, arch: amd64, clang_cl: true }
- { os: windows-2022, vsversion: 2022, arch: amd64, clang_cl: true }
# msvc
- { os: windows-2019, vsversion: 2019, arch: amd64 }
- { os: windows-2019, vsversion: 2019, arch: amd64_arm64 }
- { os: windows-2019, vsversion: 2019, arch: amd64_x86 }
- { os: windows-2022, vsversion: 2022, arch: amd64 }
- { os: windows-2022, vsversion: 2022, arch: amd64_arm64 }
- { os: windows-2022, vsversion: 2022, arch: amd64_x86 }
name: ${{ format('by-hand vs{0} {1} {2}', matrix.vsversion, matrix.arch, matrix.clang_cl && 'clang-cl' || '') }}
runs-on: ${{ matrix.os }}
steps:
- run: git config --global core.autocrlf false
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
shell: bash
run: |
git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" "upx with space"
git -C "upx with space" submodule update --init
- name: 'Set up Developer Command Prompt'
uses: ilammy/msvc-dev-cmd@cec98b9d092141f74527d0afa6feb2af698cfe89 # v1.12.1
with:
vsversion: ${{ matrix.vsversion }}
arch: ${{ matrix.arch }}
- name: 'Build by-hand with bash'
shell: bash
run: |
X="${{ matrix.clang_cl && 'clang-cl' || 'cl' }}"
command -v cl clang-cl lib link
# using MSVC headers and libraries, so adjust settings
xflags="-MT -J -W3 -DWIN32_LEAN_AND_MEAN -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS"
export mandatory_flags=
export sensible_flags=
export zlib_extra_flags="-DHAVE_VSNPRINTF"
export AR=false
export obj_suffix=.obj
CC="$X $xflags" CXX="$X -std:c++17 -Zc:__cplusplus -EHsc $xflags" bash "./upx with space/misc/scripts/build_upx_by_hand.sh"