1
0
mirror of https://github.com/upx/upx synced 2025-10-05 19:20:23 +08:00

CI updates

This commit is contained in:
Markus F.X.J. Oberhumer 2023-11-01 11:28:35 +01:00
parent f6aedb35ce
commit ecb3f83e83
5 changed files with 23 additions and 10 deletions

View File

@ -1,5 +1,4 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'

View File

@ -102,7 +102,7 @@ jobs:
# IMPORTANT: do NOT run as user root!
chmod a+w . && sudo -u upx bash "$testsuite"
job-by-hand-macos: # uses a POSIX-compliant shell
job-by-hand-macos-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:
@ -112,9 +112,18 @@ jobs:
- { os: macos-11, run_fs_test: false } # macos-11 does not have "readlink -f"
- { os: macos-12, run_fs_test: true }
- { os: macos-13, run_fs_test: true }
name: ${{ format('by-hand cc {0}', matrix.os) }}
name: ${{ format('by-hand clang {0}', matrix.os) }}
runs-on: ${{ matrix.os }}
steps:
- name: 'Install brew packages'
run: |
# install ccache
if ! command -v ccache > /dev/null; then
# only run "brew update" if needed
if ! brew install ccache; then brew update && brew install ccache; fi
fi
xflags="-Wall -Wextra -Werror"
echo -e "CC=ccache clang $xflags\nCXX=ccache clang++ -std=gnu++17 $xflags" >> $GITHUB_ENV
- name: ${{ format('Check out UPX {0} source code', github.ref_name) }}
run: |
git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" "upx with space"
@ -123,6 +132,8 @@ jobs:
run: 'top_srcdir="$PWD/upx with space" /bin/sh "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with bash'
run: 'top_srcdir="$PWD/upx with space" bash "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Build by-hand with zsh'
run: 'top_srcdir="$PWD/upx with space" zsh "./upx with space/misc/scripts/build_upx_by_hand.sh"'
- name: 'Run file system test suite'
if: ${{ matrix.run_fs_test }}
run: |

View File

@ -21,7 +21,7 @@ jobs:
include:
# INFO: the following don't work with GNU make (probably some quoting problems with spaces or backslashes)
# => use Ninja generator instead; see weekly-ci-bs-cmake-windows-ninja.yml
# # cl (msvc)
# # cl (MSVC)
# - { os: windows-2019, cc: cl, cxx: cl, vsversion: 2019, arch: amd64 }
# - { os: windows-2019, cc: cl, cxx: cl, vsversion: 2019, arch: amd64_arm64 }
# - { os: windows-2019, cc: cl, cxx: cl, vsversion: 2019, arch: amd64_x86 }
@ -29,10 +29,13 @@ jobs:
# - { os: windows-2022, cc: cl, cxx: cl, vsversion: 2022, arch: amd64_arm64 }
# - { os: windows-2022, cc: cl, cxx: cl, vsversion: 2022, arch: amd64_x86 }
# # clang-cl
# - { 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 }
# clang
- { os: windows-2019, cc: clang, cxx: 'clang++', arch: amd64, xflags: '-static' }
- { os: windows-2022, cc: clang, cxx: 'clang++', arch: amd64, xflags: '-static' }
# 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' }
env:
CC: ${{ matrix.cc }} ${{ matrix.xflags }}
@ -52,7 +55,7 @@ jobs:
- name: 'Init environment'
shell: bash
run: |
xtarget="windows-make-${{ matrix.cc }}-${{ matrix.vsversion }}-${{ matrix.arch}}"
xtarget="${{ matrix.os }}-make-${{ matrix.cc }}-${{ matrix.vsversion }}-${{ matrix.arch}}"
echo "xtarget=$xtarget" >> $GITHUB_ENV
- name: 'Build cmake Make Debug'
shell: bash

View File

@ -64,10 +64,10 @@ jobs:
esac
echo -e "CC=$CC\nCXX=$CXX" >> $GITHUB_ENV
- name: 'Build and test Debug'
run: 'echo -e "CC=$CC;\nCXX=$CXX;" && make debug && ctest --test-dir build/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 release && ctest --test-dir build/release'
run: 'echo -e "CC=$CC;\nCXX=$CXX;" && make build/release && ctest --test-dir build/release'
BS2: # uses cmake + make
if: github.repository_owner == 'upx'
@ -104,7 +104,7 @@ jobs:
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'
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 release && ctest --test-dir build/release'
run: 'echo -e "CC=$CC;\nCXX=$CXX;" && make build/release && ctest --test-dir build/release'

View File

@ -25,7 +25,7 @@
*/
// lots of tests (and probably quite a number of redundant tests)
// modern compilers will optimize away quite a lot of this code
// modern compilers will optimize away much of this code
#include "../conf.h"