CC - GitHub all macOS 13 #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (C) Markus Franz Xaver Johannes Oberhumer | |
# DO NOT EDIT, GENERATED AUTOMATICALLY | |
name: CC - GitHub all macOS 13 | |
"on": | |
schedule: | |
- cron: 10 2 * * 2 | |
workflow_dispatch: null | |
env: | |
CMAKE_REQUIRED_QUIET: "OFF" | |
CTEST_OUTPUT_ON_FAILURE: "ON" | |
DEBIAN_FRONTEND: noninteractive | |
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: macos-13 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- cc: clang | |
cxx: clang++ | |
- cc: clang-15 | |
cxx: clang++-15 | |
- cc: gcc-11 | |
cxx: g++-11 | |
- cc: gcc-12 | |
cxx: g++-12 | |
- cc: gcc-13 | |
cxx: g++-13 | |
- cc: gcc-11 -static-libgcc | |
cxx: g++-11 -static-libgcc -static-libstdc++ | |
- cc: gcc-12 -static-libgcc | |
cxx: g++-12 -static-libgcc -static-libstdc++ | |
- cc: gcc-13 -static-libgcc | |
cxx: g++-13 -static-libgcc -static-libstdc++ | |
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: brew list --versions | |
if: ${{ matrix.cc == 'clang' }} | |
- 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: Update PATH | |
if: ${{ startsWith(matrix.cc, 'clang-') }} | |
run: | | |
test -z "$HOMEBREW_PREFIX" && HOMEBREW_PREFIX=/usr/local | |
if test "$CC" = "clang-15"; then | |
echo "PATH=$HOMEBREW_PREFIX/opt/llvm@15/bin:$PATH" >> $GITHUB_ENV | |
echo "CXX=$HOMEBREW_PREFIX/opt/llvm@15/bin/clang++" >> $GITHUB_ENV | |
elif test "$CC" = "clang-16"; then | |
echo "PATH=$HOMEBREW_PREFIX/opt/llvm@16/bin:$PATH" >> $GITHUB_ENV | |
echo "CXX=$HOMEBREW_PREFIX/opt/llvm@16/bin/clang++" >> $GITHUB_ENV | |
fi | |
- name: ${{ format('Build Debug with {0} and {1}', matrix.cc, matrix.cxx) }} | |
run: make build/debug | |
- name: ${{ format('Build Release with {0} and {1}', matrix.cc, matrix.cxx) }} | |
run: make build/release | |
- name: Run tests | |
run: | | |
#ctest --test-dir build/debug | |
#ctest --test-dir build/release | |
if test -f ./misc/testsuite/test_symlinks.sh; then true; | |
(cd build/release && bash ../../misc/testsuite/test_symlinks.sh) | |
fi | |
true |