Skip to content

CC - GitHub all Ubuntu 20.04 #74

CC - GitHub all Ubuntu 20.04

CC - GitHub all Ubuntu 20.04 #74

# Copyright (C) Markus Franz Xaver Johannes Oberhumer
# DO NOT EDIT, GENERATED AUTOMATICALLY
name: CC - GitHub all Ubuntu 20.04
"on":
schedule:
- cron: 20 4 * * 2
workflow_dispatch: null
env:
CMAKE_REQUIRED_QUIET: "OFF"
CMAKE_VERBOSE_MAKEFILE: "ON"
CTEST_OUTPUT_ON_FAILURE: "ON"
DEBIAN_FRONTEND: noninteractive
UPX_CMAKE_CONFIG_FLAGS: -Wdev --warn-uninitialized
UPX_CONFIG_HAVE_WORKING_BUILD_RPATH: "ON"
UPX_DEBUG_TEST_FLOAT_DIVISION_BY_ZERO: 1
UPX_DEBUG_TEST_LIBC_QSORT: 1
VERBOSE: 1
REMOTE_REF_NAME: devel
REMOTE_REF_TYPE: branch
REMOTE_REPOSITORY: upx/upx
REMOTE_SERVER_URL: https://github.com
REMOTE_SHA: "0000000000000000000000000000000000000000"
jobs:
CC:
if: github.repository_owner == 'upx'
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- cc: clang
cxx: clang++
- cc: gcc
cxx: g++
- cc: clang-10
cxx: clang++-10
- cc: clang-11
cxx: clang++-11
- cc: clang-12
cxx: clang++-12
- cc: gcc-9
cxx: g++-9
- cc: gcc-10
cxx: g++-10
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
steps:
- name: Display environment
run: |
uname -a; pwd; id; umask
env -0 | LC_ALL=C sort -z | tr '\000' '\n'
- run: dpkg -l
- run: set -x; $CC --version; $CXX --version
- run: $CC -E -x c -dM /dev/null
- run: $CXX -E -x c++ -dM /dev/null
- name: ${{ format('Check out {0}/{1} {2} {3} source code', env.REMOTE_SERVER_URL, env.REMOTE_REPOSITORY, env.REMOTE_REF_TYPE, env.REMOTE_REF_NAME) }}
run: |
# git config
git config --global core.autocrlf false
git config --global --add safe.directory '*'
# install Self, needed for config file below
##git clone --branch "$GITHUB_REF_NAME" --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" ../Self
git clone --branch "$REMOTE_REF_NAME" --depth 1 "$REMOTE_SERVER_URL/$REMOTE_REPOSITORY" .
test -f ./.gitmodules && git submodule update --init
# TODO: handle REMOTE_REF_TYPE == "tag"
# update environment
rev="$(git rev-parse HEAD)"
echo "REMOTE_SHA=$rev" >> $GITHUB_ENV
- name: ${{ format('Build Debug with {0} and {1}', env.CC, env.CXX) }}
run: make build/debug
- name: ${{ format('Build Release with {0} and {1}', env.CC, env.CXX) }}
run: make build/release
- name: Inspect binaries
run: |
ls -l build/*/upx
size build/*/upx
file build/*/upx
- name: Run ctest tests
run: |
ctest --test-dir build/debug --parallel ${CTEST_JOBS:-8}
ctest --test-dir build/release --parallel ${CTEST_JOBS:-8}
if test -f ./misc/testsuite/test_symlinks.sh; then true;
(cd build/release && bash ../../misc/testsuite/test_symlinks.sh)
fi
true