Skip to content

Update C++ standard to C++14 so qOverload works #211

Update C++ standard to C++14 so qOverload works

Update C++ standard to C++14 so qOverload works #211

Workflow file for this run

name: macOS-CI
on:
push:
branches: [master]
pull_request:
jobs:
build:
runs-on: macos-11
name: "macOS-x86_64-Qt${{ matrix.cfg.qt_version }}"
strategy:
matrix:
cfg:
- kf_version: "5.115"
kf_fullver: "5.115.0"
qt_version: "5.15.2"
kf_cmake_args: ""
- kf_version: "6.0"
kf_fullver: "6.0.0"
qt_version: "6.5.3"
kf_cmake_args: "-DBUILD_WITH_QT6=ON"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
arch: clang_64
version: ${{ matrix.cfg.qt_version }}
- name: Build Qt Libs
env:
MACOSX_DEPLOYMENT_TARGET: "11.0"
run: |
mkdir -p $HOME/build-libs
cd $HOME/build-libs
curl -LO https://download.kde.org/stable/frameworks/${{ matrix.cfg.kf_version }}/extra-cmake-modules-${{ matrix.cfg.kf_fullver }}.tar.xz
curl -LO https://download.kde.org/stable/frameworks/${{ matrix.cfg.kf_version }}/syntax-highlighting-${{ matrix.cfg.kf_fullver }}.tar.xz
tar xf extra-cmake-modules-${{ matrix.cfg.kf_fullver }}.tar.xz
cd extra-cmake-modules-${{ matrix.cfg.kf_fullver }}
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$RUNNER_WORKSPACE/QtLibs \
-DCMAKE_BUILD_TYPE=Release \
${{ matrix.cfg.kf_cmake_args }} ..
make -j2 && make install
cd $HOME/build-libs
tar xf syntax-highlighting-${{ matrix.cfg.kf_fullver }}.tar.xz
cd syntax-highlighting-${{ matrix.cfg.kf_fullver }}
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$RUNNER_WORKSPACE/QtLibs \
-DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release \
${{ matrix.cfg.kf_cmake_args }} ..
make -j2 && make install
- name: Install ICU
run: brew install icu4c
- name: Build qtextpad
env:
MACOSX_DEPLOYMENT_TARGET: "${{ matrix.cfg.deploy_target }}"
run: |
cd $GITHUB_WORKSPACE
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="$RUNNER_WORKSPACE/QtLibs;$(brew --prefix)/opt/icu4c" \
-DCMAKE_INSTALL_PREFIX=$HOME/dist ..
make -j2
make install
- name: Create package
run: |
cd $HOME/dist
macdeployqt QTextPad.app -executable=QTextPad.app/Contents/MacOS/QTextPad
cp $GITHUB_WORKSPACE/COPYING ./
mkdir -p $GITHUB_WORKSPACE/macOS
cd $GITHUB_WORKSPACE/macOS
_qtver="${{ matrix.cfg.qt_version }}"
buildver="$(git describe --dirty)-qt${_qtver:0:1}"
hdiutil create qtextpad-macOS-${buildver}.dmg -srcfolder $HOME/dist \
-format UDZO -fs HFS+ -volname "QTextPad ${buildver}"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: QTextPad-macOS-qt${{ matrix.cfg.qt_version }}
path: macOS