From db49f840aba0fd7f1d86d8c032af6dc8a5258b76 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 16 Apr 2022 18:15:07 +0200 Subject: [PATCH] Add GitHub Actions workflow for CI builds using Xcode Also update the file used for Xcode builds to make them actually succeed. See #22321. --- .github/workflows/ci_mac_xcode.yml | 118 +++++++++++++++++++++++++++++ build/osx/wx.xcconfig | 6 +- 2 files changed, 121 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/ci_mac_xcode.yml diff --git a/.github/workflows/ci_mac_xcode.yml b/.github/workflows/ci_mac_xcode.yml new file mode 100644 index 0000000000..af76fbbd43 --- /dev/null +++ b/.github/workflows/ci_mac_xcode.yml @@ -0,0 +1,118 @@ +name: Mac Xcode builds + +on: + workflow_dispatch: + push: + branches: [ master ] + paths-ignore: + - '.github/ISSUE_TEMPLATE/**' + - '.github/workflows/ci.yml' + - '.github/workflows/ci_cmake.yml' + - '.github/workflows/ci_msw.yml' + - '.github/workflows/ci_msw_cross.yml' + - '.github/workflows/docs_update.yml' + - 'build/tools/appveyor*.bat' + - 'distrib/**' + - 'docs/**' + - 'interface/**' + - 'include/msvc/**' + - 'include/wx/dfb/**' + - 'include/wx/gtk/**' + - 'include/wx/gtk1/**' + - 'include/wx/motif/**' + - 'include/wx/msw/**' + - 'include/wx/x11/**' + - 'locale/**' + - 'src/dfb/**' + - 'src/gtk/**' + - 'src/gtk1/**' + - 'src/motif/**' + - 'src/msw/**' + - 'src/x11/**' + - '*.md' + - '*.yml' + - 'wxwidgets.props' + pull_request: + branches: [ master ] + paths-ignore: + - '.github/ISSUE_TEMPLATE/**' + - '.github/workflows/ci.yml' + - '.github/workflows/ci_cmake.yml' + - '.github/workflows/ci_msw.yml' + - '.github/workflows/ci_msw_cross.yml' + - '.github/workflows/docs_update.yml' + - 'build/tools/appveyor*.bat' + - 'distrib/**' + - 'docs/**' + - 'interface/**' + - 'include/msvc/**' + - 'include/wx/dfb/**' + - 'include/wx/gtk/**' + - 'include/wx/gtk1/**' + - 'include/wx/motif/**' + - 'include/wx/msw/**' + - 'include/wx/x11/**' + - 'locale/**' + - 'src/dfb/**' + - 'src/gtk/**' + - 'src/gtk1/**' + - 'src/motif/**' + - 'src/msw/**' + - 'src/x11/**' + - '*.md' + - '*.yml' + - 'wxwidgets.props' + +jobs: + build-and-test: + defaults: + run: + shell: /usr/bin/arch -arch ${{ matrix.arch }} /bin/bash --noprofile --norc -eo pipefail {0} + + runs-on: ${{ matrix.runner }} + + name: ${{ matrix.name }} + + strategy: + fail-fast: false + matrix: + include: + - name: macOS dynamic Release + runner: self-hosted + scheme: 'app-dynamic' + destination: 'generic/platform=macOS' + arch: x86_64 + configuration: 'Release' + project: samples/minimal/minimal_cocoa.xcodeproj + - name: iOS static Debug + runner: macos-latest + scheme: 'static' + destination: 'generic/platform=iOS' + arch: x86_64 + configuration: 'Debug' + project: build/osx/wxiphone.xcodeproj + - name: iOS Simulator static + runner: macos-latest + scheme: 'app-static' + destination: 'generic/platform=iOS Simulator' + arch: x86_64 + configuration: 'Release' + project: samples/minimal/minimal_iphone.xcodeproj + + env: + DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer + NSUnbufferedIO: YES + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Build + run: | + xcodebuild clean build ONLY_ACTIVE_ARCH=NO \ + CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO \ + -project '${{github.workspace}}/${{ matrix.project }}' \ + -scheme '${{ matrix.scheme }}' -configuration '${{ matrix.configuration}}' \ + -destination '${{ matrix.destination }}' | xcpretty --color --simple diff --git a/build/osx/wx.xcconfig b/build/osx/wx.xcconfig index 772be86fd2..eeafdb6021 100644 --- a/build/osx/wx.xcconfig +++ b/build/osx/wx.xcconfig @@ -5,13 +5,13 @@ WXPLATFORM = __WXOSX_$(WXTOOLKITUPPER)__ PRODUCT_NAME = wx_osx_$(WXTOOLKIT) -OTHER_CFLAGS = -Wall -Wno-undef -fno-strict-aliasing -fno-common -fvisibility=hidden -OTHER_CPLUSPLUSFLAGS = $(OTHER_CFLAGS) -fvisibility-inlines-hidden +OTHER_CFLAGS = -Wall -Wno-undef -fno-strict-aliasing -fno-common -fvisibility=hidden +OTHER_CPLUSPLUSFLAGS = $(OTHER_CFLAGS) -fvisibility-inlines-hidden -Wno-deprecated-declarations GCC_PREFIX_HEADER = $(WXROOT)/include/wx/wxprec.h GCC_PRECOMPILE_PREFIX_HEADER = YES HEADER_SEARCH_PATHS = "$(WXROOT)/src/tiff/libtiff" "$(WXROOT)/src/regex" "$(WXROOT)/3rdparty/pcre/src/wx" -USER_HEADER_SEARCH_PATHS = "$(WXROOT)/include" "$(WXROOT)/build/osx/setup/$(WXTOOLKIT)/include" "$(WXROOT)/src/zlib" "$(WXROOT)/src/jpeg" "$(WXROOT)/src/png" "$(WXROOT)/src/expat/expat/lib" "$(WXROOT)/src/tiff/libtiff" "$(WXROOT)/src/stc/scintilla/src" "$(WXROOT)/src/stc/scintilla/include" "$(WXROOT)/src/stc/scintilla/lexlib" +USER_HEADER_SEARCH_PATHS = "$(WXROOT)/include" "$(WXROOT)/build/osx/setup/$(WXTOOLKIT)/include" "$(WXROOT)/src/zlib" "$(WXROOT)/src/jpeg" "$(WXROOT)/src/png" "$(WXROOT)/src/expat/expat/lib" "$(WXROOT)/src/tiff/libtiff" "$(WXROOT)/src/stc/scintilla/src" "$(WXROOT)/src/stc/scintilla/include" "$(WXROOT)/src/stc/scintilla/lexlib" "$(WXROOT)/3rdparty/pcre/src/wx" ALWAYS_SEARCH_USER_PATHS = NO WX_PREPROCESSOR_DEFINITIONS = WXBUILDING $(WXPLATFORM) __WX__ _FILE_OFFSET_BITS=64 _LARGE_FILES MACOS_CLASSIC __WXMAC_XCODE__=1 SCI_LEXER NO_CXX11_REGEX WX_PRECOMP=1 wxUSE_UNICODE_UTF8=0 wxUSE_UNICODE_WCHAR=1 HAVE_CONFIG_H PNG_NO_CONFIG_H GCC_PREPROCESSOR_DEFINITIONS = $(WX_PREPROCESSOR_DEFINITIONS)