NSDistributedNotificationCenter: Throw a descriptive exception when gdnc could not be found #1045
Workflow file for this run
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
name: CI | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
ci: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
# don't run pull requests from local branches twice | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: Ubuntu GCC | |
os: ubuntu-latest | |
library-combo: gnu-gnu-gnu | |
CC: gcc | |
CXX: g++ | |
- name: Ubuntu Clang gnustep-1.9 | |
os: ubuntu-latest | |
library-combo: ng-gnu-gnu | |
runtime-version: gnustep-1.9 | |
CC: clang | |
CXX: clang++ | |
- name: Ubuntu Clang gnustep-2.0 | |
os: ubuntu-latest | |
library-combo: ng-gnu-gnu | |
runtime-version: gnustep-2.0 | |
CC: clang | |
CXX: clang++ | |
- name: Windows MinGW GCC i686 | |
allow-test-failures: true | |
os: windows-2019 | |
arch: i686 | |
msystem: MINGW32 | |
library-combo: gnu-gnu-gnu | |
CC: gcc | |
CXX: g++ | |
- name: Windows MinGW GCC x86_64 | |
os: windows-2019 | |
arch: x86_64 | |
msystem: MINGW64 | |
library-combo: gnu-gnu-gnu | |
CC: gcc | |
CXX: g++ | |
- name: Windows MSVC Clang gnustep-2.0 i686 | |
allow-test-failures: true | |
os: windows-2019 | |
arch: x86 | |
host: i686-pc-windows | |
library-combo: ng-gnu-gnu | |
runtime-version: gnustep-2.0 | |
configure-opts: --disable-tls | |
CC: clang -m32 | |
CXX: clang++ -m32 | |
LDFLAGS: -fuse-ld=lld | |
- name: Windows MSVC Clang gnustep-2.0 x86_64 | |
os: windows-2019 | |
arch: x64 | |
host: x86_64-pc-windows | |
library-combo: ng-gnu-gnu | |
runtime-version: gnustep-2.0 | |
configure-opts: --disable-tls | |
CC: clang -m64 | |
CXX: clang++ -m64 | |
LDFLAGS: -fuse-ld=lld | |
env: | |
SRC_PATH: ${{ github.workspace }}${{ startsWith(matrix.os, 'windows') && '\' || '/' }}source | |
DEPS_PATH: ${{ github.workspace }}${{ startsWith(matrix.os, 'windows') && '\' || '/' }}dependencies | |
INSTALL_PATH: ${{ github.workspace }}${{ startsWith(matrix.os, 'windows') && '\' || '/' }}build | |
IS_WINDOWS_MINGW: ${{ startsWith(matrix.os, 'windows') && startsWith(matrix.msystem, 'MINGW') }} | |
IS_WINDOWS_MSVC: ${{ startsWith(matrix.os, 'windows') && endsWith(matrix.host, '-pc-windows') }} | |
CC: ${{ matrix.CC }} | |
CXX: ${{ matrix.CXX }} | |
LDFLAGS: ${{ matrix.LDFLAGS }} | |
HOST: ${{ matrix.host }} | |
ARCH: ${{ matrix.arch }} | |
LIBRARY_COMBO: ${{ matrix.library-combo }} | |
RUNTIME_VERSION: ${{ matrix.runtime-version }} | |
CONFIGURE_OPTS: ${{ matrix.configure-opts }} | |
# MSYS2: disable conversion to native-form paths when configuring GNUstep Make | |
# https://www.msys2.org/wiki/Porting/#filesystem-namespaces | |
MSYS2_ARG_CONV_EXCL: --prefix= | |
defaults: | |
run: | |
shell: ${{ startsWith(matrix.os, 'windows') && 'msys2 {0}' || 'bash' }} | |
working-directory: ${{ env.SRC_PATH }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
path: ${{ env.SRC_PATH }} | |
- name: Install packages (Linux) | |
if: runner.os == 'Linux' | |
run: | | |
PACKAGES="cmake pkg-config libgnutls28-dev libffi-dev libicu-dev libxml2-dev libxslt1-dev libssl-dev libavahi-client-dev zlib1g-dev gnutls-bin libcurl4-gnutls-dev" | |
case $LIBRARY_COMBO in | |
gnu-gnu-gnu) | |
# GCC Objective-C runtime | |
PACKAGES="$PACKAGES libobjc-9-dev libblocksruntime-dev gobjc" | |
;; | |
ng-gnu-gnu) | |
# packages for libdispatch | |
PACKAGES="$PACKAGES libkqueue-dev libpthread-workqueue-dev" | |
# gnustep-2.0 runtime requires ld.gold or lld | |
if [ "$RUNTIME_VERSION" = "gnustep-2.0" ]; then | |
sudo update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 10 | |
fi | |
;; | |
esac | |
sudo apt-get update | |
sudo apt-get install $PACKAGES | |
- name: Set up MSYS2 (Windows MinGW) | |
uses: msys2/setup-msys2@v2 | |
if: env.IS_WINDOWS_MINGW == 'true' | |
with: | |
msystem: ${{ matrix.msystem }} | |
install: > | |
git | |
make | |
pkg-config | |
libxml2-devel | |
libxslt-devel | |
libffi-devel | |
libgnutls-devel | |
icu-devel | |
mingw-w64-${{matrix.arch}}-gcc-objc | |
mingw-w64-${{matrix.arch}}-pkg-config | |
mingw-w64-${{matrix.arch}}-libxml2 | |
mingw-w64-${{matrix.arch}}-libxslt | |
mingw-w64-${{matrix.arch}}-libffi | |
mingw-w64-${{matrix.arch}}-gnutls | |
mingw-w64-${{matrix.arch}}-icu | |
- name: Set up MSYS2 (Windows MSVC) | |
uses: msys2/setup-msys2@v2 | |
if: env.IS_WINDOWS_MSVC == 'true' | |
with: | |
msystem: MSYS | |
install: make autoconf automake libtool | |
# make Windows packages like Clang available in MSYS | |
path-type: inherit | |
- name: Delete MinGW gmake (Windows MSVC) | |
if: env.IS_WINDOWS_MSVC == 'true' | |
# delete /c/Strawberry/c/bin/gmake built for MinGW that is found on runners, because we must use make built for MSYS | |
run: if GMAKE_PATH=`which gmake`; then rm -f "$GMAKE_PATH"; fi | |
- name: Install Windows packages (Windows MSVC) | |
if: env.IS_WINDOWS_MSVC == 'true' | |
shell: cmd | |
run: choco install ninja | |
- name: Set up VS Developer Command Prompt (Windows MSVC) | |
if: env.IS_WINDOWS_MSVC == 'true' | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: ${{ matrix.arch }} | |
- name: Install dependencies (Windows MSVC) | |
if: env.IS_WINDOWS_MSVC == 'true' | |
shell: cmd | |
run: | | |
mkdir %DEPS_PATH% & cd %DEPS_PATH% | |
git clone https://github.com/gnustep/tools-windows-msvc.git || exit /b 1 | |
cd tools-windows-msvc | |
:: use msys2.cmd from setup-msys2 as Bash shell, as it doesn't have msys2_shell.cmd used normally by build.bat | |
set "BASH=msys2 -c" | |
build.bat --prefix=%INSTALL_PATH% --type Release --only-dependencies | |
- name: Set environment variables (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
# MSVC: update install path to include [x86|x64]/Release subdir used by build.bat above | |
if [ "$IS_WINDOWS_MSVC" = "true" ]; then | |
INSTALL_PATH=$INSTALL_PATH\\$ARCH\\Release | |
fi | |
# convert Windows paths to Unix paths for MSYS2 shell | |
echo "INSTALL_PATH=`cygpath -u $INSTALL_PATH`" >> $GITHUB_ENV | |
echo "DEPS_PATH=`cygpath -u $DEPS_PATH`" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: | | |
./.github/scripts/dependencies.sh | |
- name: Build source | |
run: | | |
. $INSTALL_PATH/share/GNUstep/Makefiles/GNUstep.sh | |
if [ -n "$HOST" ]; then | |
CONFIGURE_OPTS="$CONFIGURE_OPTS --host=$HOST" | |
fi | |
./configure $CONFIGURE_OPTS | |
make && make install | |
- name: Run tests | |
continue-on-error: ${{ matrix.allow-test-failures || false }} | |
run: | | |
. $INSTALL_PATH/share/GNUstep/Makefiles/GNUstep.sh | |
# MSVC: build tests for release to match CRT of DLLs | |
if [ "$IS_WINDOWS_MSVC" = "true" ]; then | |
sed -i -e 's/ debug=yes//g' `which gnustep-tests` | |
fi | |
make check | |
- name: Upload logs | |
uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: Logs - ${{ matrix.name }} | |
path: | | |
${{ env.SRC_PATH }}/config.log | |
${{ env.SRC_PATH }}/Tests/tests.log |