2021-07-24 10:39:16 -04:00
|
|
|
# CI workflow for wxWidgets builds using CMake.
|
|
|
|
name: CMake builds
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2022-07-03 19:32:51 -04:00
|
|
|
- 3.2
|
2021-07-24 10:39:16 -04:00
|
|
|
paths-ignore:
|
2023-03-30 18:39:44 -04:00
|
|
|
- '.circleci/**'
|
2022-01-13 19:41:14 -05:00
|
|
|
- '.github/ISSUE_TEMPLATE/**'
|
2021-07-24 10:39:16 -04:00
|
|
|
- '.github/workflows/ci.yml'
|
2021-08-28 17:30:35 -04:00
|
|
|
- '.github/workflows/ci_mac.yml'
|
2021-08-24 09:53:40 -04:00
|
|
|
- '.github/workflows/ci_msw.yml'
|
2021-07-24 10:39:16 -04:00
|
|
|
- '.github/workflows/ci_msw_cross.yml'
|
2022-03-26 19:27:15 -04:00
|
|
|
- '.github/workflows/docs_update.yml'
|
2021-07-24 10:39:16 -04:00
|
|
|
- 'build/tools/appveyor*.bat'
|
|
|
|
- 'distrib/**'
|
|
|
|
- 'docs/**'
|
|
|
|
- 'interface/**'
|
|
|
|
- 'include/msvc/**'
|
|
|
|
- 'include/wx/msw/**'
|
|
|
|
- 'locale/**'
|
|
|
|
- 'src/msw/**'
|
|
|
|
- '*.md'
|
|
|
|
- '*.yml'
|
|
|
|
- 'wxwidgets.props'
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2022-07-03 19:32:51 -04:00
|
|
|
- 3.2
|
2021-07-24 10:39:16 -04:00
|
|
|
paths-ignore:
|
2023-03-30 18:39:44 -04:00
|
|
|
- '.circleci/**'
|
2022-01-13 19:41:14 -05:00
|
|
|
- '.github/ISSUE_TEMPLATE/**'
|
2021-07-24 10:39:16 -04:00
|
|
|
- '.github/workflows/ci.yml'
|
2021-08-28 17:30:35 -04:00
|
|
|
- '.github/workflows/ci_mac.yml'
|
2021-08-24 09:53:40 -04:00
|
|
|
- '.github/workflows/ci_msw.yml'
|
2021-07-24 10:39:16 -04:00
|
|
|
- '.github/workflows/ci_msw_cross.yml'
|
2022-03-26 19:27:15 -04:00
|
|
|
- '.github/workflows/docs_update.yml'
|
2021-07-24 10:39:16 -04:00
|
|
|
- 'build/tools/appveyor*.bat'
|
|
|
|
- 'distrib/**'
|
|
|
|
- 'docs/**'
|
|
|
|
- 'interface/**'
|
|
|
|
- 'include/msvc/**'
|
|
|
|
- 'include/wx/msw/**'
|
|
|
|
- 'locale/**'
|
|
|
|
- 'src/msw/**'
|
|
|
|
- '*.md'
|
|
|
|
- '*.yml'
|
|
|
|
- 'wxwidgets.props'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ${{ matrix.runner }}
|
|
|
|
name: ${{ matrix.name }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
2022-10-18 13:17:48 -04:00
|
|
|
- name: Ubuntu 22.04 wxGTK 3
|
|
|
|
runner: ubuntu-22.04
|
2021-07-24 10:39:16 -04:00
|
|
|
cmake_generator: Unix Makefiles
|
2021-10-11 13:03:15 -04:00
|
|
|
cmake_samples: ALL
|
2022-08-03 13:15:31 -04:00
|
|
|
- name: macOS 11 wxOSX
|
|
|
|
runner: macos-11
|
2021-07-24 10:39:16 -04:00
|
|
|
cmake_generator: Xcode
|
|
|
|
cmake_defines: -DCMAKE_CXX_STANDARD=11
|
2022-08-03 13:15:31 -04:00
|
|
|
- name: macOS 11 wxIOS
|
|
|
|
runner: macos-11
|
2021-07-24 10:39:16 -04:00
|
|
|
cmake_generator: Xcode
|
|
|
|
cmake_defines: -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_FIND_ROOT_PATH=/usr/local -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO
|
|
|
|
cmake_samples: OFF
|
|
|
|
cmake_tests: OFF
|
2021-08-07 02:12:40 -04:00
|
|
|
- name: Windows MSVC
|
|
|
|
runner: windows-latest
|
2021-12-10 12:00:38 -05:00
|
|
|
no_sudo: 1
|
2021-12-09 17:09:18 -05:00
|
|
|
cmake_defines: -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe
|
2021-08-07 02:12:40 -04:00
|
|
|
cmake_generator: Ninja
|
|
|
|
cmake_samples: SOME
|
|
|
|
cmake_tests: CONSOLE_ONLY
|
2021-07-24 10:39:16 -04:00
|
|
|
|
|
|
|
env:
|
|
|
|
wxGTK_VERSION: ${{ matrix.gtk_version && matrix.gtk_version || 3 }}
|
|
|
|
|
2021-12-09 14:22:48 -05:00
|
|
|
# Use bash as the shell, even under MSW where the default is PowerShell.
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
2021-07-24 10:39:16 -04:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-12-17 21:22:54 -05:00
|
|
|
uses: actions/checkout@v3
|
2021-07-24 10:39:16 -04:00
|
|
|
with:
|
|
|
|
submodules: 'recursive'
|
|
|
|
|
|
|
|
- name: Set environment variables
|
|
|
|
run: |
|
|
|
|
wxPROC_COUNT=`./build/tools/proc_count.sh`
|
|
|
|
if [ "${{ matrix.cmake_generator }}" == "Xcode" ]; then
|
|
|
|
# Xcode generates a lot of output, suppress it so only warnings and errors are visible
|
|
|
|
wxBUILD_ARGS="-jobs $wxPROC_COUNT -quiet"
|
|
|
|
else
|
|
|
|
wxBUILD_ARGS=-j$wxPROC_COUNT
|
|
|
|
fi
|
|
|
|
echo wxBUILD_ARGS=$wxBUILD_ARGS >> $GITHUB_ENV
|
|
|
|
|
|
|
|
cmake_tests=${{ matrix.cmake_tests }}
|
|
|
|
if [ -z $cmake_tests ]; then cmake_tests=CONSOLE_ONLY; fi
|
|
|
|
echo wxCMAKE_TESTS=$cmake_tests >> $GITHUB_ENV
|
|
|
|
|
|
|
|
cmake_samples=${{ matrix.cmake_samples }}
|
|
|
|
if [ -z $cmake_samples ]; then cmake_samples=SOME; fi
|
|
|
|
echo wxCMAKE_SAMPLES=$cmake_samples >> $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
|
|
|
|
|
|
|
|
- name: Before install
|
|
|
|
run: |
|
|
|
|
./build/tools/before_install.sh
|
|
|
|
|
2021-08-07 02:12:40 -04:00
|
|
|
# required for CMake to find Ninja
|
|
|
|
- name: "[Windows] Set up MSVC Developer Command Prompt"
|
|
|
|
if: runner.os == 'Windows'
|
2022-10-18 13:28:40 -04:00
|
|
|
uses: wxWidgets/gha-setup-vsdevenv@ac61ecb4b05909261f8f375601c0e15aabdd9f10
|
2021-08-07 02:12:40 -04:00
|
|
|
|
2021-07-24 10:39:16 -04:00
|
|
|
- name: Configuring
|
|
|
|
run: |
|
|
|
|
cmake --version
|
|
|
|
mkdir build_cmake
|
|
|
|
pushd build_cmake
|
|
|
|
cmake -G "${{ matrix.cmake_generator }}" ${{ matrix.cmake_defines }} -DwxBUILD_SAMPLES=$wxCMAKE_SAMPLES -DwxBUILD_TESTS=$wxCMAKE_TESTS ..
|
|
|
|
|
|
|
|
- name: Building
|
|
|
|
working-directory: build_cmake
|
|
|
|
run: |
|
|
|
|
cmake --build . -- $wxBUILD_ARGS
|
|
|
|
|
|
|
|
- name: Installing
|
|
|
|
working-directory: build_cmake
|
|
|
|
run: |
|
2021-12-10 12:00:38 -05:00
|
|
|
if [ -z "${{ matrix.no_sudo }}" ]; then
|
|
|
|
sudo cmake --build . --target install
|
|
|
|
else
|
|
|
|
cmake --build . --target install
|
|
|
|
fi
|
2021-07-24 10:39:16 -04:00
|
|
|
|
2022-08-17 15:15:42 -04:00
|
|
|
- name: Setup Python
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: '3.10'
|
|
|
|
|
2021-07-24 10:39:16 -04:00
|
|
|
- name: Testing
|
|
|
|
if: matrix.cmake_tests != 'OFF'
|
|
|
|
working-directory: build_cmake
|
|
|
|
run: |
|
|
|
|
. ../build/tools/httpbin.sh
|
|
|
|
|
|
|
|
httpbin_launch
|
|
|
|
|
|
|
|
ctest -V -C Debug --output-on-failure --interactive-debug-mode 0 . || rc=$?
|
|
|
|
if [ -n "$rc" ]; then
|
|
|
|
httpbin_show_log
|
|
|
|
exit $rc
|
|
|
|
fi
|
|
|
|
|
|
|
|
- name: Testing installation
|
|
|
|
run: |
|
|
|
|
mkdir build_cmake_install_test
|
|
|
|
pushd build_cmake_install_test
|
|
|
|
cmake -G "${{ matrix.cmake_generator }}" ${{ matrix.cmake_defines }} ../samples/minimal
|
|
|
|
cmake --build .
|