From 446268b61ceca9c2630986bd33f99a0e5b9ea5e3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 28 Aug 2021 23:30:35 +0200 Subject: [PATCH 1/4] Rename ci_mac_selfhosted.yml to just ci_mac.yml We are going to have both self- and GitHub-hosted runners in this file soon, so rename it for clarity. No changes yet. --- .github/workflows/ci.yml | 4 ++-- .github/workflows/ci_cmake.yml | 4 ++-- .github/workflows/{ci_mac_selfhosted.yml => ci_mac.yml} | 0 .github/workflows/ci_msw.yml | 4 ++-- .github/workflows/ci_msw_cross.yml | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) rename .github/workflows/{ci_mac_selfhosted.yml => ci_mac.yml} (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8052a6427a..c95c7c202c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ on: branches: - master paths-ignore: - - '.github/workflows/ci_mac_selfhosted.yml' + - '.github/workflows/ci_mac.yml' - '.github/workflows/ci_cmake.yml' - '.github/workflows/ci_msw.yml' - '.github/workflows/ci_msw_cross.yml' @@ -25,7 +25,7 @@ on: branches: - master paths-ignore: - - '.github/workflows/ci_mac_selfhosted.yml' + - '.github/workflows/ci_mac.yml' - '.github/workflows/ci_cmake.yml' - '.github/workflows/ci_msw.yml' - '.github/workflows/ci_msw_cross.yml' diff --git a/.github/workflows/ci_cmake.yml b/.github/workflows/ci_cmake.yml index 4309ec34b5..755fdd7123 100644 --- a/.github/workflows/ci_cmake.yml +++ b/.github/workflows/ci_cmake.yml @@ -7,7 +7,7 @@ on: - master paths-ignore: - '.github/workflows/ci.yml' - - '.github/workflows/ci_mac_selfhosted.yml' + - '.github/workflows/ci_mac.yml' - '.github/workflows/ci_msw.yml' - '.github/workflows/ci_msw_cross.yml' - 'build/tools/appveyor*.bat' @@ -26,7 +26,7 @@ on: - master paths-ignore: - '.github/workflows/ci.yml' - - '.github/workflows/ci_mac_selfhosted.yml' + - '.github/workflows/ci_mac.yml' - '.github/workflows/ci_msw.yml' - '.github/workflows/ci_msw_cross.yml' - 'build/tools/appveyor*.bat' diff --git a/.github/workflows/ci_mac_selfhosted.yml b/.github/workflows/ci_mac.yml similarity index 100% rename from .github/workflows/ci_mac_selfhosted.yml rename to .github/workflows/ci_mac.yml diff --git a/.github/workflows/ci_msw.yml b/.github/workflows/ci_msw.yml index a4c9629c18..b322809307 100644 --- a/.github/workflows/ci_msw.yml +++ b/.github/workflows/ci_msw.yml @@ -8,7 +8,7 @@ on: paths-ignore: - '.github/workflows/ci.yml' - '.github/workflows/ci_cmake.yml' - - '.github/workflows/ci_mac_selfhosted.yml' + - '.github/workflows/ci_mac.yml' - '.github/workflows/ci_msw_cross.yml' - 'build/tools/appveyor*.bat' - 'distrib/**' @@ -27,7 +27,7 @@ on: paths-ignore: - '.github/workflows/ci.yml' - '.github/workflows/ci_cmake.yml' - - '.github/workflows/ci_mac_selfhosted.yml' + - '.github/workflows/ci_mac.yml' - '.github/workflows/ci_msw_cross.yml' - 'build/tools/appveyor*.bat' - 'distrib/**' diff --git a/.github/workflows/ci_msw_cross.yml b/.github/workflows/ci_msw_cross.yml index c27e062363..0edc18c01e 100644 --- a/.github/workflows/ci_msw_cross.yml +++ b/.github/workflows/ci_msw_cross.yml @@ -8,7 +8,7 @@ on: paths-ignore: - '.github/workflows/ci.yml' - '.github/workflows/ci_cmake.yml' - - '.github/workflows/ci_mac_selfhosted.yml' + - '.github/workflows/ci_mac.yml' - '.github/workflows/ci_msw.yml' - 'build/tools/appveyor*.bat' - 'distrib/**' @@ -29,7 +29,7 @@ on: paths-ignore: - '.github/workflows/ci.yml' - '.github/workflows/ci_cmake.yml' - - '.github/workflows/ci_mac_selfhosted.yml' + - '.github/workflows/ci_mac.yml' - '.github/workflows/ci_msw.yml' - 'build/tools/appveyor*.bat' - 'distrib/**' From dd33dc2d68b450f16126439fd3151275b2e283a0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 28 Aug 2021 23:38:53 +0200 Subject: [PATCH 2/4] Move wxMac and wxiOS builds to Mac CI workflow Still run them on GitHub runners, but do it using the same steps as for our own builds, as there should be no reason to have any difference in the build steps independently of where exactly they run. Also remove checks for matrix.skip_testing from the Unix CI workflow as they are not needed there any more because the tests are always run. This commit is best viewed with --color-moved git option. --- .github/workflows/ci.yml | 23 ++--------------------- .github/workflows/ci_mac.yml | 29 +++++++++++++++++++++++++---- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c95c7c202c..f2342ecc3e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,16 +98,6 @@ jobs: runner: ubuntu-18.04 configure_flags: --with-qt --enable-pch --without-opengl skip_samples: true - - name: macOS 10.15 wxMac - runner: macos-10.15 - configure_flags: --disable-sys-libs - - name: macOS 10.15 wxiOS - runner: macos-10.15 - configure_flags: --with-osx_iphone --enable-monolithic --disable-sys-libs --host=i686-apple-darwin_sim --build=x86_64-apple-darwin17.7.0 - xcode_sdk: iphonesimulator - skip_samples: true - skip_testing: true - allow_warnings: true env: wxGTK_VERSION: ${{ matrix.gtk_version && matrix.gtk_version || 3 }} @@ -170,11 +160,6 @@ jobs: wxCONFIGURE_OPTIONS="--with-gtk=${{ matrix.gtk_version }} $wxCONFIGURE_OPTIONS" fi - if [ -n "${{ matrix.xcode_sdk }}" ]; then - sdk_path=`xcrun --sdk ${{ matrix.xcode_sdk }} --show-sdk-path` - wxCONFIGURE_OPTIONS="--with-macosx-sdk=$sdk_path $wxCONFIGURE_OPTIONS" - fi - if [ ${{ matrix.use_asan }} ]; then wxASAN_CFLAGS="-fsanitize=address -fno-omit-frame-pointer" wxASAN_CXXFLAGS=$wxASAN_CFLAGS @@ -198,7 +183,6 @@ jobs: make -k $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_ERROR_CXXFLAGS" - name: Building tests - if: matrix.skip_testing != true working-directory: tests run: | if [ !${{ matrix.skip_gui }} ]; then @@ -207,7 +191,6 @@ jobs: make -k $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_CXXFLAGS" "LDFLAGS=$wxMAKEFILE_LDFLAGS" - name: Testing - if: matrix.skip_testing != true working-directory: tests run: | . ../build/tools/httpbin.sh @@ -234,7 +217,7 @@ jobs: fi - name: Testing GUI using Xvfb - if: matrix.skip_testing != true && matrix.skip_gui != true && matrix.use_xvfb + if: matrix.skip_gui != true && matrix.use_xvfb working-directory: tests run: | if [ ${{ matrix.use_asan }} ]; then @@ -264,17 +247,15 @@ jobs: fi - name: Building samples - if: matrix.skip_testing != true && matrix.skip_gui != true && matrix.skip_samples != true + if: 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" diff --git a/.github/workflows/ci_mac.yml b/.github/workflows/ci_mac.yml index f62e9f4c0f..02c0c5994a 100644 --- a/.github/workflows/ci_mac.yml +++ b/.github/workflows/ci_mac.yml @@ -65,7 +65,7 @@ jobs: run: shell: /usr/bin/arch -arch ${{ matrix.arch }} /bin/bash -l {0} - runs-on: self-hosted + runs-on: ${{ matrix.runner }} name: ${{ matrix.name }} @@ -73,16 +73,31 @@ jobs: fail-fast: false matrix: include: - - name: ARM C++11 + - name: wxMac ARM C++11 + runner: self-hosted arch: arm64 configure_flags: --with-cxx=11 use_asan: true - - name: Intel C++17 + - name: wxMac Intel C++17 + runner: self-hosted arch: x86_64 configure_flags: --with-cxx=17 --with-macosx-version-min=10.12 --enable-debug - - name: Universal C++14 + - name: wxMac Universal C++14 + runner: self-hosted arch: arm64 configure_flags: --with-cxx=14 --enable-universal_binary=arm64,x86_64 --disable-shared --disable-debug --enable-optimise + - name: wxMac macOS 10.15 + runner: macos-10.15 + arch: x86_64 + configure_flags: --disable-sys-libs + - name: wxiOS + runner: macos-10.15 + arch: x86_64 + configure_flags: --with-osx_iphone --enable-monolithic --disable-sys-libs --host=i686-apple-darwin_sim --build=x86_64-apple-darwin17.7.0 + xcode_sdk: iphonesimulator + skip_samples: true + skip_testing: true + allow_warnings: true env: wxCONFIGURE_FLAGS: --disable-sys-libs --without-liblzma ${{ matrix.configure_flags }} --prefix=${{ github.workspace }}/localbin_${{ matrix.arch }} @@ -137,6 +152,12 @@ jobs: - name: Configuring run: | wxCONFIGURE_OPTIONS="--disable-optimise $wxCONFIGURE_FLAGS" + + if [ -n "${{ matrix.xcode_sdk }}" ]; then + sdk_path=`xcrun --sdk ${{ matrix.xcode_sdk }} --show-sdk-path` + wxCONFIGURE_OPTIONS="--with-macosx-sdk=$sdk_path $wxCONFIGURE_OPTIONS" + fi + ./configure $wxCONFIGURE_OPTIONS --disable-debug_info || rc=$? if [ ${{ matrix.use_asan }} ]; then wxASAN_CFLAGS="-fsanitize=address -fno-omit-frame-pointer" From d81dc9f125b05a111f404c4005d9a977a541d066 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 28 Aug 2021 23:41:31 +0200 Subject: [PATCH 3/4] Remove tests for matrix.skip_gui in workflow files This setting is used, so just remove all the tests for it. --- .github/workflows/ci.yml | 8 +++----- .github/workflows/ci_mac.yml | 6 ++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2342ecc3e..2fcee94db3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -185,9 +185,7 @@ jobs: - name: Building tests working-directory: tests run: | - if [ !${{ matrix.skip_gui }} ]; then - make $wxBUILD_ARGS failtest - fi + make $wxBUILD_ARGS failtest make -k $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_CXXFLAGS" "LDFLAGS=$wxMAKEFILE_LDFLAGS" - name: Testing @@ -217,7 +215,7 @@ jobs: fi - name: Testing GUI using Xvfb - if: matrix.skip_gui != true && matrix.use_xvfb + if: matrix.use_xvfb working-directory: tests run: | if [ ${{ matrix.use_asan }} ]; then @@ -247,7 +245,7 @@ jobs: fi - name: Building samples - if: matrix.skip_gui != true && matrix.skip_samples != true + if: matrix.skip_samples != true run: | make -k $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_CXXFLAGS" "LDFLAGS=$wxMAKEFILE_LDFLAGS" samples diff --git a/.github/workflows/ci_mac.yml b/.github/workflows/ci_mac.yml index 02c0c5994a..0542f28ab5 100644 --- a/.github/workflows/ci_mac.yml +++ b/.github/workflows/ci_mac.yml @@ -182,9 +182,7 @@ jobs: - name: Building tests run: | - if [ !${{ matrix.skip_gui }} ]; then - make -C tests $wxBUILD_ARGS failtest - fi + make -C tests $wxBUILD_ARGS failtest make -k -C tests $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_CXXFLAGS" "LDFLAGS=$wxMAKEFILE_LDFLAGS" - name: Testing @@ -202,7 +200,7 @@ jobs: fi - name: Building samples - if: matrix.skip_testing != true && matrix.skip_gui != true && matrix.skip_samples != true + if: matrix.skip_testing != true && matrix.skip_samples != true run: | make -k $wxBUILD_ARGS "CXXFLAGS=$wxMAKEFILE_CXXFLAGS" "LDFLAGS=$wxMAKEFILE_LDFLAGS" samples From 43020136e97b7753a3bba75e3d8825acea08bf75 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 28 Aug 2021 23:43:39 +0200 Subject: [PATCH 4/4] Use different badges for different GitHub CI workflows This is more informative and should work more reliably, unlike the previously used shield which remained "Pending" for no clear reason. --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 01ee832073..71169ad99c 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,11 @@ Platforms --------- [![AppVeyor](https://img.shields.io/appveyor/build/wxWidgets/wxWidgets/master?label=AppVeyor&logo=appveyor)](https://ci.appveyor.com/project/wxWidgets/wxwidgets) -[![Github](https://img.shields.io/github/checks-status/wxWidgets/wxWidgets/master?label=GitHub&logo=github)](https://github.com/wxWidgets/wxWidgets/actions) +[![Unix (make)](https://github.com/wxWidgets/wxWidgets/actions/workflows/ci.yml/badge.svg)](https://github.com/wxWidgets/wxWidgets/actions/workflows/ci.yml) +[![Unix (CMake)](https://github.com/wxWidgets/wxWidgets/actions/workflows/ci_cmake.yml/badge.svg)](https://github.com/wxWidgets/wxWidgets/actions/workflows/ci_cmake.yml) +[![MSW (MSVC)](https://github.com/wxWidgets/wxWidgets/actions/workflows/ci_msw.yml/badge.svg)](https://github.com/wxWidgets/wxWidgets/actions/workflows/ci_msw.yml) +[![MSW (gcc)](https://github.com/wxWidgets/wxWidgets/actions/workflows/ci_msw_cross.yml/badge.svg)](https://github.com/wxWidgets/wxWidgets/actions/workflows/ci_msw_cross.yml) +[![Mac](https://github.com/wxWidgets/wxWidgets/actions/workflows/ci_mac.yml/badge.svg)](https://github.com/wxWidgets/wxWidgets/actions/workflows/ci_mac.yml) [![OSS-Fuzz](https://oss-fuzz-build-logs.storage.googleapis.com/badges/wxwidgets.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:wxwidgets) This version of wxWidgets supports the following primary platforms: