From e9cfd928699192b7d5ab4c8802b60a6339194e26 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 30 Dec 2022 16:25:07 +0100 Subject: [PATCH] Add a build using ARM to Cirrus CI Use matrix to perform the same build steps for different platforms and account for FreeBSD specific things by explicitly checking the OS name in the scripts. --- .cirrus.yml | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 2ff1492476..4a0d922152 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -9,9 +9,18 @@ env: task: skip: "changesIncludeOnly('appveyor.yml','CMakeLists.txt','.github/**','docs/**','interface/**','include/wx/{msw,osx,qt}/**','src/{msw,osx,qt}/**','build/{cmake,msw,osx}/**')" - name: Cirrus CI / FreeBSD 13 wxGTK 3 - freebsd_instance: - image_family: freebsd-13-0 + matrix: + - name: Cirrus CI / FreeBSD 13 wxGTK 3 + freebsd_instance: + image_family: freebsd-13-0 + env: + osname: FreeBSD + - name: Cirrus CI / Debian ARM wxGTK 3 + arm_container: + image: debian:11-slim + env: + osname: Linux + arch: arm before_script: | echo LD_LIBRARY_PATH=`pwd`/lib >> $CIRRUS_ENV @@ -34,17 +43,24 @@ task: # Rather than getting all submodules, get just the ones we need, as we can # use system libraries instead of the other ones. - update_submodues_script: | + update_submodules_script: | git submodule update --init 3rdparty/catch 3rdparty/nanosvg ccache_cache: folder: /tmp/ccache - # We need to pass flags so that libraries under /usr/local are found, because - # configure doesn't look for them there by default (it ought to always use - # pkg-config instead, but it currently doesn't do this either). configure_script: | - ./configure --disable-optimise --disable-debug_info CXXFLAGS=-Werror CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib + case "${osname}" in + FreeBSD) + # We need to pass these flags so that libraries under /usr/local are found, + # because configure doesn't look for them there by default (it ought to + # always use pkg-config instead, but it currently doesn't do this either). + CPPFLAGS=-I/usr/local/include + LDFLAGS=-L/usr/local/lib + ;; + esac + + ./configure --disable-optimise --disable-debug_info CXXFLAGS=-Werror CPPFLAGS=$CPPFLAGS LDFLAGS=$LDFLAGS build_library_script: | make -k $wxBUILD_ARGS @@ -59,10 +75,15 @@ task: build_samples_script: | make -k -C samples $wxBUILD_ARGS - # Building sample requires GNU make, so install it just for this. install_script: | make install - pkg install -q -y gmake + case "${osname}" in + FreeBSD) + # Building sample requires GNU make, so install it just for this. + pkg install -q -y gmake + ;; + esac + gmake -C samples/minimal -f makefile.unx clean gmake -C samples/minimal -f makefile.unx $wxBUILD_ARGS