2020-12-29 19:15:38 -05:00
|
|
|
# Continuous integration workflow for wxWidgets.
|
|
|
|
name: GitHub CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2021-01-30 15:40:11 -05:00
|
|
|
paths-ignore:
|
2021-02-01 04:47:23 -05:00
|
|
|
- 'distrib'
|
2021-01-30 15:40:11 -05:00
|
|
|
- 'docs'
|
|
|
|
- 'interface'
|
2021-02-01 04:47:23 -05:00
|
|
|
- '*.md'
|
|
|
|
- '*.yml'
|
2020-12-29 19:15:38 -05:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
2021-01-30 15:40:11 -05:00
|
|
|
paths-ignore:
|
2021-02-01 04:47:23 -05:00
|
|
|
- 'distrib'
|
2021-01-30 15:40:11 -05:00
|
|
|
- 'docs'
|
|
|
|
- 'interface'
|
2021-02-01 04:47:23 -05:00
|
|
|
- '*.md'
|
|
|
|
- '*.yml'
|
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-01-30 16:40:10 -05:00
|
|
|
- name: Ubuntu 16.04 wxGTK 2
|
2021-01-30 15:36:14 -05:00
|
|
|
runner: ubuntu-16.04
|
|
|
|
gtk_version: 2
|
2021-01-30 16:53:43 -05:00
|
|
|
use_xvfb: true
|
2021-01-30 16:40:10 -05:00
|
|
|
- name: Ubuntu 16.04 wxGTK 3 static
|
2021-01-30 15:36:14 -05:00
|
|
|
runner: ubuntu-16.04
|
|
|
|
configure_flags: --disable-shared
|
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-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'
|
|
|
|
|
|
|
|
- name: Set environment variables
|
|
|
|
run: |
|
|
|
|
echo LD_LIBRARY_PATH=`pwd`/lib >> $GITHUB_ENV
|
|
|
|
|
|
|
|
wxPROC_COUNT=`nproc`
|
|
|
|
((wxPROC_COUNT++))
|
|
|
|
echo wxPROC_COUNT=$wxPROC_COUNT >> $GITHUB_ENV
|
|
|
|
echo wxBUILD_ARGS=-j$wxPROC_COUNT >> $GITHUB_ENV
|
|
|
|
|
|
|
|
# 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
|
|
|
|
echo CXX=clang++ >> $GITHUB_ENV
|
|
|
|
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
|
|
|
|
|
|
|
|
- name: Before install
|
|
|
|
run: |
|
|
|
|
./build/tools/before_install.sh
|
|
|
|
|
|
|
|
- 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
|
|
|
|
run: |
|
|
|
|
if [ !${{ matrix.skip_gui }} ]; then
|
|
|
|
make -C tests $wxBUILD_ARGS failtest
|
|
|
|
fi
|
|
|
|
make -k -C tests $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_CXXFLAGS" "LDFLAGS=$wxMAKEFILE_LDFLAGS"
|
|
|
|
|
2021-01-27 17:58:58 -05:00
|
|
|
- name: Launching httpbin
|
|
|
|
if: matrix.skip_testing != true
|
|
|
|
run: |
|
|
|
|
pip install httpbin
|
|
|
|
python -m httpbin.core 2>&1 >httpbin.log &
|
|
|
|
echo 'WX_TEST_WEBREQUEST_URL=http://localhost:5000' >> $GITHUB_ENV
|
|
|
|
|
2020-12-29 19:15:38 -05:00
|
|
|
- name: Testing
|
|
|
|
if: matrix.skip_testing != true
|
2021-02-05 13:04:14 -05:00
|
|
|
working-directory: tests
|
2020-12-29 19:15:38 -05:00
|
|
|
run: |
|
2021-01-27 17:58:58 -05:00
|
|
|
./test || rc=$?
|
|
|
|
if [ -n "$rc" ]; then
|
|
|
|
echo '*** Tests failed, contents of httpbin.log follows: ***'
|
|
|
|
echo '-----------------------------------------------------------'
|
|
|
|
cat httpbin.log
|
|
|
|
echo '-----------------------------------------------------------'
|
|
|
|
exit $rc
|
|
|
|
fi
|
2020-12-29 19:15:38 -05:00
|
|
|
|
|
|
|
- name: Testing GUI using Xvfb
|
|
|
|
if: matrix.skip_testing != true && matrix.skip_gui != true && matrix.use_xvfb
|
|
|
|
run: |
|
2021-01-30 18:14:28 -05:00
|
|
|
if [ ${{ matrix.use_asan }} ]; then
|
|
|
|
export LSAN_OPTIONS=suppressions=$(pwd)/misc/suppressions/lsan
|
2021-01-31 08:34:01 -05:00
|
|
|
export ASAN_OPTIONS=fast_unwind_on_malloc=0
|
2021-01-30 18:14:28 -05:00
|
|
|
fi
|
2020-12-29 19:15:38 -05:00
|
|
|
pushd tests
|
|
|
|
xvfb-run -a -s '-screen 0 1600x1200x24' ./test_gui
|
|
|
|
popd
|
|
|
|
|
|
|
|
- name: Building samples
|
|
|
|
if: matrix.skip_testing != true && matrix.skip_gui != true && matrix.skip_samples != true
|
|
|
|
run: |
|
|
|
|
make -k $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_CXXFLAGS" "LDFLAGS=$wxMAKEFILE_LDFLAGS" samples
|
|
|
|
|
|
|
|
- name: Installing
|
|
|
|
if: matrix.skip_testing != true
|
|
|
|
run: |
|
|
|
|
sudo make install
|
|
|
|
|
|
|
|
- name: Testing installation
|
|
|
|
if: matrix.skip_testing != true
|
|
|
|
run: |
|
|
|
|
make -C samples/minimal -f makefile.unx clean
|
|
|
|
make -C samples/minimal -f makefile.unx $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_CXXFLAGS" "LDFLAGS=$wxMAKEFILE_LDFLAGS"
|