2021-07-03 11:57:43 -04:00
|
|
|
# CI workflow for wxWidgets builds using configure+make under Unix.
|
|
|
|
name: Unix builds
|
2020-12-29 19:15:38 -05:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2021-01-30 15:40:11 -05:00
|
|
|
paths-ignore:
|
2022-01-13 19:41:14 -05:00
|
|
|
- '.github/ISSUE_TEMPLATE/**'
|
2021-08-28 17:30:35 -04:00
|
|
|
- '.github/workflows/ci_mac.yml'
|
2021-07-24 10:39:16 -04:00
|
|
|
- '.github/workflows/ci_cmake.yml'
|
2021-08-24 09:53:40 -04:00
|
|
|
- '.github/workflows/ci_msw.yml'
|
2021-06-27 07:16:08 -04:00
|
|
|
- '.github/workflows/ci_msw_cross.yml'
|
2022-03-26 19:27:15 -04:00
|
|
|
- '.github/workflows/docs_update.yml'
|
2021-02-15 10:04:51 -05:00
|
|
|
- 'build/tools/appveyor*.bat'
|
2021-02-05 15:35:51 -05:00
|
|
|
- 'distrib/**'
|
|
|
|
- 'docs/**'
|
|
|
|
- 'interface/**'
|
2021-03-02 14:30:46 -05:00
|
|
|
- 'include/msvc/**'
|
|
|
|
- 'include/wx/msw/**'
|
2021-03-07 17:48:25 -05:00
|
|
|
- 'locale/**'
|
2021-03-11 04:59:27 -05:00
|
|
|
- 'src/msw/**'
|
2021-02-01 04:47:23 -05:00
|
|
|
- '*.md'
|
|
|
|
- '*.yml'
|
2021-03-02 14:30:46 -05:00
|
|
|
- 'wxwidgets.props'
|
2020-12-29 19:15:38 -05:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
2021-01-30 15:40:11 -05:00
|
|
|
paths-ignore:
|
2022-01-13 19:41:14 -05:00
|
|
|
- '.github/ISSUE_TEMPLATE/**'
|
2021-08-28 17:30:35 -04:00
|
|
|
- '.github/workflows/ci_mac.yml'
|
2021-07-24 10:39:16 -04:00
|
|
|
- '.github/workflows/ci_cmake.yml'
|
2021-08-24 09:53:40 -04:00
|
|
|
- '.github/workflows/ci_msw.yml'
|
2021-06-27 07:16:08 -04:00
|
|
|
- '.github/workflows/ci_msw_cross.yml'
|
2022-03-26 19:27:15 -04:00
|
|
|
- '.github/workflows/docs_update.yml'
|
2021-02-15 10:04:51 -05:00
|
|
|
- 'build/tools/appveyor*.bat'
|
2021-02-05 15:35:51 -05:00
|
|
|
- 'distrib/**'
|
|
|
|
- 'docs/**'
|
|
|
|
- 'interface/**'
|
2021-03-07 17:47:27 -05:00
|
|
|
- 'include/msvc/**'
|
|
|
|
- 'include/wx/msw/**'
|
2021-03-07 17:48:25 -05:00
|
|
|
- 'locale/**'
|
2021-03-11 04:59:27 -05:00
|
|
|
- 'src/msw/**'
|
2021-02-01 04:47:23 -05:00
|
|
|
- '*.md'
|
|
|
|
- '*.yml'
|
2021-03-07 17:47:27 -05:00
|
|
|
- 'wxwidgets.props'
|
2020-12-29 19:15:38 -05:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ${{ matrix.runner }}
|
|
|
|
name: ${{ matrix.name }}
|
|
|
|
strategy:
|
2021-01-30 15:36:14 -05:00
|
|
|
fail-fast: false
|
2020-12-29 19:15:38 -05:00
|
|
|
matrix:
|
|
|
|
include:
|
2021-09-23 02:45:37 -04:00
|
|
|
- name: Ubuntu 18.04 wxGTK 2
|
|
|
|
runner: ubuntu-18.04
|
2021-01-30 15:36:14 -05:00
|
|
|
gtk_version: 2
|
2021-01-30 16:53:43 -05:00
|
|
|
use_xvfb: true
|
2021-01-30 16:40:10 -05:00
|
|
|
- name: Ubuntu 18.04 wxGTK 2 UTF-8
|
2021-01-30 15:36:14 -05:00
|
|
|
runner: ubuntu-18.04
|
|
|
|
gtk_version: 2
|
|
|
|
configure_flags: --enable-utf8 --enable-utf8only --enable-monolithic
|
2021-01-30 16:53:43 -05:00
|
|
|
use_xvfb: true
|
2021-09-23 02:45:37 -04:00
|
|
|
- name: Ubuntu 18.04 wxGTK3 static
|
|
|
|
runner: ubuntu-18.04
|
|
|
|
configure_flags: --disable-shared
|
|
|
|
use_xvfb: true
|
2021-01-30 16:40:10 -05:00
|
|
|
- name: Ubuntu 18.04 wxGTK 3 STL
|
2021-01-30 15:36:14 -05:00
|
|
|
runner: ubuntu-18.04
|
|
|
|
configure_flags: --enable-cxx11 --enable-stl --disable-compat30
|
2021-01-30 16:53:43 -05:00
|
|
|
use_xvfb: true
|
2021-01-30 16:40:10 -05:00
|
|
|
- name: Ubuntu 18.04 wxGTK 3 with clang
|
2021-01-30 15:36:14 -05:00
|
|
|
runner: ubuntu-18.04
|
|
|
|
compiler: clang
|
2021-02-01 15:14:31 -05:00
|
|
|
configure_flags: --disable-sys-libs
|
2021-01-30 16:53:43 -05:00
|
|
|
use_xvfb: true
|
2021-01-30 16:40:10 -05:00
|
|
|
- name: Ubuntu 20.04 wxGTK ANSI
|
2021-01-30 15:36:14 -05:00
|
|
|
runner: ubuntu-20.04
|
|
|
|
configure_flags: --disable-unicode
|
|
|
|
skip_samples: true
|
2021-01-30 16:40:10 -05:00
|
|
|
- name: Ubuntu 20.04 wxGTK with ASAN
|
2020-12-29 19:15:38 -05:00
|
|
|
runner: ubuntu-20.04
|
2021-02-01 15:14:31 -05:00
|
|
|
configure_flags: --disable-compat30 --disable-sys-libs --disable-webview
|
2020-12-29 19:15:38 -05:00
|
|
|
skip_samples: true
|
|
|
|
use_asan: true
|
2021-01-30 16:53:43 -05:00
|
|
|
use_xvfb: true
|
2021-01-30 16:40:10 -05:00
|
|
|
- name: Ubuntu 18.04 wxX11
|
2021-01-30 15:36:14 -05:00
|
|
|
runner: ubuntu-18.04
|
|
|
|
configure_flags: --with-x11 --enable-pch --disable-stc
|
|
|
|
skip_samples: true
|
2021-01-30 16:40:10 -05:00
|
|
|
- name: Ubuntu 18.04 wxDFB
|
2021-01-30 15:36:14 -05:00
|
|
|
runner: ubuntu-18.04
|
|
|
|
configure_flags: --with-directfb --enable-pch --disable-stc
|
|
|
|
skip_samples: true
|
|
|
|
allow_warnings: true
|
2021-01-30 16:40:10 -05:00
|
|
|
- name: Ubuntu 18.04 wxMotif
|
2021-01-30 15:36:14 -05:00
|
|
|
runner: ubuntu-18.04
|
|
|
|
configure_flags: --with-motif --enable-pch --disable-stc
|
|
|
|
skip_samples: true
|
2021-01-30 16:40:10 -05:00
|
|
|
- name: Ubuntu 18.04 wxQt
|
2021-01-30 15:36:14 -05:00
|
|
|
runner: ubuntu-18.04
|
|
|
|
configure_flags: --with-qt --enable-pch --without-opengl
|
|
|
|
skip_samples: true
|
|
|
|
|
2020-12-29 19:15:38 -05:00
|
|
|
env:
|
2021-01-30 15:32:37 -05:00
|
|
|
wxGTK_VERSION: ${{ matrix.gtk_version && matrix.gtk_version || 3 }}
|
2020-12-29 19:15:38 -05:00
|
|
|
wxCONFIGURE_FLAGS: ${{ matrix.configure_flags }}
|
|
|
|
wxUSE_ASAN: ${{ matrix.use_asan && 1 || 0 }}
|
2021-01-30 15:41:50 -05:00
|
|
|
wxUSE_XVFB: ${{ matrix.use_xvfb && 1 || 0 }}
|
2020-12-29 19:15:38 -05:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: 'recursive'
|
|
|
|
|
2021-10-27 16:58:19 -04:00
|
|
|
- name: Install CCache
|
2022-04-16 10:07:20 -04:00
|
|
|
uses: hendrikmuhs/ccache-action@578e14bc3f06099346125f52ed0008433eccbedf
|
2021-10-27 16:58:19 -04:00
|
|
|
with:
|
|
|
|
key: ${{ matrix.name }}
|
|
|
|
|
2021-10-27 17:32:16 -04:00
|
|
|
- name: Set up build environment
|
2020-12-29 19:15:38 -05:00
|
|
|
run: |
|
|
|
|
echo LD_LIBRARY_PATH=`pwd`/lib >> $GITHUB_ENV
|
|
|
|
|
2021-07-21 16:32:03 -04:00
|
|
|
wxPROC_COUNT=`./build/tools/proc_count.sh`
|
2020-12-29 19:15:38 -05:00
|
|
|
echo wxBUILD_ARGS=-j$wxPROC_COUNT >> $GITHUB_ENV
|
|
|
|
|
2021-10-27 16:58:19 -04:00
|
|
|
echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
|
|
|
|
|
2020-12-29 19:15:38 -05:00
|
|
|
# Setting this variable suppresses "Error retrieving accessibility bus address"
|
|
|
|
# messages from WebKit tests that we're not interested in.
|
|
|
|
echo NO_AT_BRIDGE=1 >> $GITHUB_ENV
|
|
|
|
|
|
|
|
case "${{ matrix.compiler }}" in
|
|
|
|
clang)
|
|
|
|
echo CC=clang >> $GITHUB_ENV
|
2021-03-22 13:44:34 -04:00
|
|
|
echo CXX='clang++ -stdlib=libc++' >> $GITHUB_ENV
|
2020-12-29 19:15:38 -05:00
|
|
|
echo LD=clang++ >> $GITHUB_ENV
|
|
|
|
|
|
|
|
allow_warn_opt="-Wno-error=#warnings"
|
|
|
|
;;
|
|
|
|
|
2021-01-30 15:31:55 -05:00
|
|
|
'')
|
|
|
|
# Assume gcc.
|
2020-12-29 19:15:38 -05:00
|
|
|
allow_warn_opt="-Wno-error=cpp"
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
echo "*** Unknown compiler: ${{ matrix.compiler }} ***"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2021-01-30 15:35:35 -05:00
|
|
|
if [ -z ${{ matrix.allow_warnings }} ]; then
|
2020-12-29 19:15:38 -05:00
|
|
|
error_opts="-Werror $allow_warn_opt"
|
|
|
|
echo "wxMAKEFILE_ERROR_CXXFLAGS=$error_opts" >> $GITHUB_ENV
|
|
|
|
echo "wxMAKEFILE_CXXFLAGS=$wxMAKEFILE_CXXFLAGS $error_opts" >> $GITHUB_ENV
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "wxMAKEFILE_CXXFLAGS=$wxMAKEFILE_CXXFLAGS $error_opts" >> $GITHUB_ENV
|
|
|
|
|
2021-08-30 18:59:58 -04:00
|
|
|
# Install locales used by our tests to run all the tests instead of
|
|
|
|
# skipping them.
|
|
|
|
sudo locale-gen de_DE.utf8 de_CH.utf8 en_US.utf8 fr_FR.utf8 sv_SE.utf8
|
|
|
|
|
2020-12-29 19:15:38 -05:00
|
|
|
./build/tools/before_install.sh
|
|
|
|
|
2021-10-27 17:32:16 -04:00
|
|
|
- name: Show build environment
|
|
|
|
run: |
|
|
|
|
echo "Environment:"
|
|
|
|
env | sort
|
|
|
|
echo
|
|
|
|
|
|
|
|
echo "Compiler version:"
|
|
|
|
${CXX-g++} --version
|
|
|
|
echo
|
|
|
|
|
2021-11-09 07:28:19 -05:00
|
|
|
echo "ccache version:"
|
2021-10-27 17:32:16 -04:00
|
|
|
ccache --version
|
|
|
|
echo
|
|
|
|
|
2020-12-29 19:15:38 -05:00
|
|
|
- name: Configuring
|
|
|
|
run: |
|
|
|
|
wxCONFIGURE_OPTIONS="--disable-optimise $wxCONFIGURE_FLAGS"
|
|
|
|
if [ -n "${{ matrix.gtk_version }}" ]; then
|
|
|
|
wxCONFIGURE_OPTIONS="--with-gtk=${{ matrix.gtk_version }} $wxCONFIGURE_OPTIONS"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ${{ matrix.use_asan }} ]; then
|
|
|
|
wxASAN_CFLAGS="-fsanitize=address -fno-omit-frame-pointer"
|
|
|
|
wxASAN_CXXFLAGS=$wxASAN_CFLAGS
|
|
|
|
wxASAN_LDFLAGS="-fsanitize=address"
|
|
|
|
|
|
|
|
./configure $wxCONFIGURE_OPTIONS --enable-debug "CFLAGS=$wxASAN_CFLAGS" "CXXFLAGS=$wxASAN_CXXFLAGS" "LDFLAGS=$wxASAN_LDFLAGS" || rc=$?
|
|
|
|
else
|
|
|
|
./configure $wxCONFIGURE_OPTIONS --disable-debug_info || rc=$?
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$rc" ]; then
|
|
|
|
echo '*** Configuring failed, contents of config.log follows: ***'
|
|
|
|
echo '-----------------------------------------------------------'
|
|
|
|
cat config.log
|
|
|
|
echo '-----------------------------------------------------------'
|
|
|
|
exit $rc
|
|
|
|
fi
|
|
|
|
|
|
|
|
- name: Building
|
|
|
|
run: |
|
|
|
|
make -k $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_ERROR_CXXFLAGS"
|
|
|
|
|
|
|
|
- name: Building tests
|
2021-06-26 10:16:17 -04:00
|
|
|
working-directory: tests
|
2020-12-29 19:15:38 -05:00
|
|
|
run: |
|
2021-08-28 17:41:31 -04:00
|
|
|
make $wxBUILD_ARGS failtest
|
2021-06-26 10:16:17 -04:00
|
|
|
make -k $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_CXXFLAGS" "LDFLAGS=$wxMAKEFILE_LDFLAGS"
|
2020-12-29 19:15:38 -05:00
|
|
|
|
2021-03-23 09:59:53 -04:00
|
|
|
- name: Testing
|
|
|
|
working-directory: tests
|
2021-01-27 17:58:58 -05:00
|
|
|
run: |
|
2021-04-03 18:18:50 -04:00
|
|
|
. ../build/tools/httpbin.sh
|
|
|
|
|
|
|
|
httpbin_launch
|
2021-01-27 17:58:58 -05:00
|
|
|
|
2021-03-23 10:00:41 -04:00
|
|
|
export ASAN_OPTIONS=fast_unwind_on_malloc=0
|
|
|
|
|
2021-02-05 13:14:06 -05:00
|
|
|
# Explicitly use bash because /bin/sh doesn't have pipefail option
|
2021-03-23 09:56:45 -04:00
|
|
|
/bin/bash -o pipefail -c './test 2>&1 | tee test.out' || rc=$?
|
2021-02-05 13:14:06 -05:00
|
|
|
if [ ${{ matrix.use_asan }} ]; then
|
|
|
|
# Work around spurious crashes by running the test again.
|
|
|
|
# See https://github.com/google/sanitizers/issues/1353
|
|
|
|
if fgrep -q 'LeakSanitizer has encountered a fatal error' test.out; then
|
|
|
|
echo '+++ Rerunning the tests once again after LeakSanitizer crash +++'
|
2021-03-23 10:32:38 -04:00
|
|
|
unset rc
|
2021-03-23 09:56:45 -04:00
|
|
|
./test || rc=$?
|
2021-02-05 13:14:06 -05:00
|
|
|
fi
|
|
|
|
fi
|
2021-04-03 18:18:50 -04:00
|
|
|
|
2021-03-23 09:56:45 -04:00
|
|
|
if [ -n "$rc" ]; then
|
2021-04-03 18:18:50 -04:00
|
|
|
httpbin_show_log
|
2021-01-27 17:58:58 -05:00
|
|
|
exit $rc
|
|
|
|
fi
|
2020-12-29 19:15:38 -05:00
|
|
|
|
|
|
|
- name: Testing GUI using Xvfb
|
2021-08-28 17:41:31 -04:00
|
|
|
if: matrix.use_xvfb
|
2021-03-23 10:33:51 -04:00
|
|
|
working-directory: tests
|
2020-12-29 19:15:38 -05:00
|
|
|
run: |
|
2021-01-30 18:14:28 -05:00
|
|
|
if [ ${{ matrix.use_asan }} ]; then
|
2021-03-23 08:36:48 -04:00
|
|
|
# Leak suppression only works if we have debug symbols available,
|
|
|
|
# otherwise we disable it to avoid tons of reports about leaks in
|
|
|
|
# libfontconfig etc.
|
|
|
|
if [ -f wx_dbgsym_available ]; then
|
|
|
|
export LSAN_OPTIONS=suppressions=$(pwd)/misc/suppressions/lsan
|
|
|
|
else
|
|
|
|
ASAN_OPTIONS=detect_leaks=0
|
|
|
|
fi
|
|
|
|
export ASAN_OPTIONS="$ASAN_OPTIONS fast_unwind_on_malloc=0"
|
2021-07-22 12:53:09 -04:00
|
|
|
|
|
|
|
# Running all tests at once fails, apparently due to running out of
|
|
|
|
# memory when using ASAN, work around this problem by excluding
|
|
|
|
# RichTextCtrlTestCase whose Table sub-test seems to be problematic.
|
|
|
|
wx_tests_selection='~[.] ~RichTextCtrlTestCase'
|
2021-01-30 18:14:28 -05:00
|
|
|
fi
|
2021-03-23 10:39:26 -04:00
|
|
|
ulimit -c unlimited
|
2021-07-22 12:53:09 -04:00
|
|
|
/bin/bash -o pipefail -c "xvfb-run -a -s '-screen 0 1600x1200x24' ./test_gui -d 1 $wx_tests_selection 2>&1 | tee -a test_gui.out" || rc=$?
|
2021-03-23 10:39:26 -04:00
|
|
|
if [ -n "$rc" ]; then
|
|
|
|
if fgrep -q '(core dumped)' test_gui.out; then
|
|
|
|
echo '*** Test crashed, trying to get more information ***'
|
|
|
|
gdb --quiet --core=core -ex 'where' -ex 'thread apply all bt' -ex 'q' ./test_gui
|
|
|
|
fi
|
|
|
|
exit $rc
|
|
|
|
fi
|
2020-12-29 19:15:38 -05:00
|
|
|
|
|
|
|
- name: Building samples
|
2021-08-28 17:41:31 -04:00
|
|
|
if: matrix.skip_samples != true
|
2020-12-29 19:15:38 -05:00
|
|
|
run: |
|
|
|
|
make -k $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_CXXFLAGS" "LDFLAGS=$wxMAKEFILE_LDFLAGS" samples
|
|
|
|
|
|
|
|
- name: Installing
|
|
|
|
run: |
|
|
|
|
sudo make install
|
|
|
|
|
|
|
|
- name: Testing installation
|
|
|
|
run: |
|
|
|
|
make -C samples/minimal -f makefile.unx clean
|
|
|
|
make -C samples/minimal -f makefile.unx $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_CXXFLAGS" "LDFLAGS=$wxMAKEFILE_LDFLAGS"
|