mirror of
https://github.com/upx/upx.git
synced 2025-08-11 22:52:30 +08:00
all: move testsuite to misc/testsuite; CI updates
This commit is contained in:
44
.github/workflows/ci.yml
vendored
44
.github/workflows/ci.yml
vendored
@ -123,7 +123,7 @@ jobs:
|
||||
- name: 'Run test suite build/extra/gcc/release'
|
||||
run: |
|
||||
export upx_testsuite_SRCDIR="$(readlink -en ../deps/upx-testsuite)"
|
||||
testsuite_1=$(readlink -en ./.github/travis_testsuite_1.sh)
|
||||
testsuite_1=$(readlink -en ./misc/testsuite/upx_testsuite_1.sh)
|
||||
env -C build/extra/gcc/release upx_exe=./upx bash "$testsuite_1"
|
||||
|
||||
job-macos-cmake:
|
||||
@ -195,7 +195,7 @@ jobs:
|
||||
run: |
|
||||
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
|
||||
export upx_testsuite_SRCDIR="$(readlink -en ../deps/upx-testsuite)"
|
||||
testsuite_1=$(readlink -en ./.github/travis_testsuite_1.sh)
|
||||
testsuite_1=$(readlink -en ./misc/testsuite/upx_testsuite_1.sh)
|
||||
env -C build/extra/clang/release upx_exe=./upx bash "$testsuite_1"
|
||||
|
||||
job-windows-cmake:
|
||||
@ -210,21 +210,19 @@ jobs:
|
||||
# windows-2019 used to work but got broken with the 20220821.1 runner-image
|
||||
# update; we cannot download that image for inspection, and debugging the
|
||||
# remote image is painful, so disable for now
|
||||
####- { name: windows-2019-amd64, os: windows-2019 }
|
||||
- { name: windows-2022-amd64, os: windows-2022 }
|
||||
####- { name: windows-2019-amd64, os: windows-2019, vsversion: 2019, arch: amd64 }
|
||||
- { name: windows-2022-amd64, os: windows-2022, vsversion: 2022, arch: amd64 }
|
||||
steps:
|
||||
- name: 'Check out code'
|
||||
uses: actions/checkout@v3
|
||||
with: { submodules: true }
|
||||
- name: 'Check out test suite'
|
||||
run: 'git clone --depth=1 https://github.com/upx/upx-testsuite ../deps/upx-testsuite'
|
||||
- name: 'Inspect runner-image settings'
|
||||
# debug remote image; see https://github.com/actions/runner-images.git
|
||||
if: ${{ false }}
|
||||
run: |
|
||||
Get-Command bash; Get-Command cmake; Get-Command make
|
||||
bash --version; cmake --version; make --version
|
||||
Get-Command cl -ErrorAction SilentlyContinue
|
||||
- name: 'Set up Developer Command Prompt'
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
vsversion: ${{ matrix.vsversion }}
|
||||
arch: ${{ matrix.arch }}
|
||||
- name: 'Build cmake debug'
|
||||
run: 'make build/debug'
|
||||
- name: 'Build cmake release'
|
||||
@ -252,7 +250,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
export upx_testsuite_SRCDIR="$(readlink -en ../deps/upx-testsuite)"
|
||||
testsuite_1=$(readlink -en ./.github/travis_testsuite_1.sh)
|
||||
testsuite_1=$(readlink -en ./misc/testsuite/upx_testsuite_1.sh)
|
||||
env -C build/release/Release upx_exe=./upx bash "$testsuite_1"
|
||||
|
||||
job-windows-toolchains:
|
||||
@ -261,21 +259,21 @@ jobs:
|
||||
name: ${{ format('windows {0}', matrix.name) }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
C: ${{ matrix.C }}
|
||||
C: ${{ matrix.name }}
|
||||
B: release
|
||||
H: 'd:\a\upx\upx'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- { name: amd64-win64-vs2019, vsversion: 2019, os: windows-2019, C: msvc-14.2-x64, arch: amd64 }
|
||||
- { name: amd64-win64-vs2022, vsversion: 2022, os: windows-2022, C: msvc-14.3-x64, arch: amd64 }
|
||||
- { name: arm64-win64-vs2019, vsversion: 2019, os: windows-2019, C: msvc-14.2-arm64, arch: amd64_arm64 }
|
||||
- { name: arm64-win64-vs2022, vsversion: 2022, os: windows-2022, C: msvc-14.3-arm64, arch: amd64_arm64 }
|
||||
- { name: arm64ec-win64-vs2022, vsversion: 2022, os: windows-2022, C: msvc-14.3-arm64ec, arch: amd64_arm64, cl_machine_flags: -arm64EC, link_machine_flags: '/machine:arm64ec' }
|
||||
####- { name: arm64x-win64-vs2022, vsversion: 2022, os: windows-2022, C: msvc-14.3-arm64x, arch: amd64_arm64, cl_machine_flags: -arm64EC, link_machine_flags: '/machine:arm64x' }
|
||||
- { name: i386-win32-vs2019, vsversion: 2019, os: windows-2019, C: msvc-14.2-x86, arch: amd64_x86 }
|
||||
- { name: i386-win32-vs2022, vsversion: 2022, os: windows-2022, C: msvc-14.3-x86, arch: amd64_x86 }
|
||||
- { name: amd64-win64-vs2019, os: windows-2019, vsversion: 2019, arch: amd64 }
|
||||
- { name: amd64-win64-vs2022, os: windows-2022, vsversion: 2022, arch: amd64 }
|
||||
- { name: arm64-win64-vs2019, os: windows-2019, vsversion: 2019, arch: amd64_arm64 }
|
||||
- { name: arm64-win64-vs2022, os: windows-2022, vsversion: 2022, arch: amd64_arm64 }
|
||||
- { name: arm64ec-win64-vs2022, os: windows-2022, vsversion: 2022, arch: amd64_arm64, cl_machine_flags: -arm64EC, link_machine_flags: '/machine:arm64ec' }
|
||||
# { name: arm64x-win64-vs2022, os: windows-2022, vsversion: 2022, arch: amd64_arm64, cl_machine_flags: -arm64EC, link_machine_flags: '/machine:arm64x' }
|
||||
- { name: i386-win32-vs2019, os: windows-2019, vsversion: 2019, arch: amd64_x86 }
|
||||
- { name: i386-win32-vs2022, os: windows-2022, vsversion: 2022, arch: amd64_x86 }
|
||||
steps:
|
||||
- name: 'Check out code'
|
||||
uses: actions/checkout@v3
|
||||
@ -290,8 +288,8 @@ jobs:
|
||||
- name: 'Set up Developer Command Prompt'
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
vsversion: ${{ matrix.vsversion }}
|
||||
arch: ${{ matrix.arch }}
|
||||
- name: 'Build'
|
||||
shell: cmd
|
||||
run: |
|
||||
@ -361,7 +359,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
export upx_testsuite_SRCDIR="$(readlink -en ../deps/upx-testsuite)"
|
||||
testsuite_1=$(readlink -en ./.github/travis_testsuite_1.sh)
|
||||
testsuite_1=$(readlink -en ./misc/testsuite/upx_testsuite_1.sh)
|
||||
env -C build/$C/$B/upx upx_exe=./upx.exe bash "$testsuite_1"
|
||||
|
||||
job-linux-zigcc:
|
||||
|
4
.github/workflows/test-cmake-default.yml
vendored
4
.github/workflows/test-cmake-default.yml
vendored
@ -58,8 +58,8 @@ jobs:
|
||||
- name: 'Set up Developer Command Prompt'
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: amd64
|
||||
vsversion: 2022
|
||||
arch: amd64
|
||||
- name: 'Config, build, test and install'
|
||||
run: |
|
||||
cmake -S . -B build/default -G "NMake Makefiles"
|
||||
@ -77,8 +77,8 @@ jobs:
|
||||
- name: 'Set up Developer Command Prompt'
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: amd64
|
||||
vsversion: 2022
|
||||
arch: amd64
|
||||
- name: 'Config, build and test'
|
||||
run: |
|
||||
cmake -S . -B build/default
|
||||
|
@ -28,8 +28,8 @@ jobs:
|
||||
- name: 'Set up Developer Command Prompt'
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
with:
|
||||
arch: ${{ matrix.arch }}
|
||||
vsversion: ${{ matrix.vsversion }}
|
||||
arch: ${{ matrix.arch }}
|
||||
- name: 'Build cmake NMake Debug'
|
||||
shell: cmd
|
||||
run: |
|
||||
|
@ -1,4 +1,4 @@
|
||||
#! /bin/bash
|
||||
#! /usr/bin/env bash
|
||||
## vim:set ts=4 sw=4 et:
|
||||
set -e; set -o pipefail
|
||||
argv0=$0; argv0abs=$(readlink -en -- "$0"); argv0dir=$(dirname "$argv0abs")
|
||||
@ -8,6 +8,8 @@ argv0=$0; argv0abs=$(readlink -en -- "$0"); argv0dir=$(dirname "$argv0abs")
|
||||
# $upx_testsuite_SRCDIR
|
||||
# $upx_testsuite_BUILDDIR (optional)
|
||||
# $BM_T (optional)
|
||||
#
|
||||
# see https://github.com/upx/upx-testsuite.git
|
||||
|
||||
# convenience
|
||||
[[ -z $upx_testsuite_BUILDDIR ]] && upx_testsuite_BUILDDIR=./tmp-upx-testsuite
|
||||
@ -17,7 +19,7 @@ argv0=$0; argv0abs=$(readlink -en -- "$0"); argv0dir=$(dirname "$argv0abs")
|
||||
upx_testsuite_SRCDIR=$(readlink -en -- "$upx_testsuite_SRCDIR")
|
||||
if [[ ! -d "$upx_testsuite_SRCDIR/files/packed" ]]; then
|
||||
echo 'invalid or missing $upx_testsuite_SRCDIR:'
|
||||
echo ' please git clone https://github.com/upx/upx-testsuite'
|
||||
echo ' please git clone https://github.com/upx/upx-testsuite.git'
|
||||
echo ' and set (export) the envvar upx_testsuite_SRCDIR to the local file path'
|
||||
exit 1
|
||||
fi
|
||||
@ -121,7 +123,7 @@ recreate_expected_sha256sums() {
|
||||
echo "########## end .sha256sums.recreate" >> "$o"
|
||||
}
|
||||
|
||||
source "$argv0dir/travis_testsuite_1-expected_sha256sums.sh" || exit 1
|
||||
source "$argv0dir/upx_testsuite_1-expected_sha256sums.sh" || exit 1
|
||||
|
||||
# /***********************************************************************
|
||||
# // init
|
11
src/Makefile
11
src/Makefile
@ -44,6 +44,7 @@ $(top_srcdir)/build/release/upx: PHONY
|
||||
|
||||
#
|
||||
# "make run-testsuite"
|
||||
# see https://github.com/upx/upx-testsuite.git
|
||||
#
|
||||
|
||||
# search for the UPX testsuite -- git clone https://github.com/upx/upx-testsuite.git
|
||||
@ -60,19 +61,19 @@ endif
|
||||
endif
|
||||
|
||||
# run the UPX testsuite
|
||||
# The expected (old) checksums are in $(top_srcdir)/.github/travis_testsuite_1-expected_sha256sums.sh
|
||||
# The expected (old) checksums are in $(top_srcdir)/misc/testsuite/upx_testsuite_1-expected_sha256sums.sh
|
||||
# The actual (new) checksums are in ./tmp-testsuite/testsuite_1/.sha256sums.recreate
|
||||
ifneq ($(wildcard $(upx_testsuite_SRCDIR)/files/packed/.),)
|
||||
ifneq ($(wildcard $(top_srcdir)/.github/travis_testsuite_1.sh),)
|
||||
ifneq ($(wildcard $(top_srcdir)/misc/testsuite/upx_testsuite_1.sh),)
|
||||
run-testsuite: run-testsuite-release
|
||||
run-testsuite-%: export upx_testsuite_SRCDIR := $(upx_testsuite_SRCDIR)
|
||||
run-testsuite-%: export upx_testsuite_BUILDDIR := ./tmp-testsuite
|
||||
run-testsuite-debug: export upx_exe := $(top_srcdir)/build/debug/upx
|
||||
run-testsuite-debug: PHONY $(top_srcdir)/build/debug/upx
|
||||
time -p bash $(top_srcdir)/.github/travis_testsuite_1.sh
|
||||
time -p bash $(top_srcdir)/misc/testsuite/upx_testsuite_1.sh
|
||||
run-testsuite-release: export upx_exe := $(top_srcdir)/build/release/upx
|
||||
run-testsuite-release: PHONY $(top_srcdir)/build/release/upx
|
||||
time -p bash $(top_srcdir)/.github/travis_testsuite_1.sh
|
||||
time -p bash $(top_srcdir)/misc/testsuite/upx_testsuite_1.sh
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -90,7 +91,7 @@ CLANG_FORMAT_FILES := $(sort $(wildcard *.[ch]* ../maint/src/*.[ch]* [cu]*/*.[ch
|
||||
CLANG_FORMAT_FILES := $(filter-out $(CLANG_FORMAT_EXCLUDE_FILES),$(CLANG_FORMAT_FILES))
|
||||
clang-format: PHONY $(CLANG_FORMAT_FILES)
|
||||
@echo "running upx-clang-format"
|
||||
@$(top_srcdir)/misc/scripts/upx-clang-format -i $(CLANG_FORMAT_FILES)
|
||||
@$(top_srcdir)/misc/scripts/upx-clang-format.sh -i $(CLANG_FORMAT_FILES)
|
||||
endif
|
||||
|
||||
#
|
||||
|
Reference in New Issue
Block a user