Mac / Qt 6.5.0 #499
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Mac / Qt 6.5.0 | |
on: | |
workflow_run: | |
workflows: ["Release setup"] | |
types: [completed] | |
jobs: | |
buildMac: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
build-type: [Release, Debug] | |
steps: | |
- name: checkout sources | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
fetch-depth: 0 | |
- name: setup Homebrew | |
run: brew install autoconf automake libtool xz pkg-config libgit2 libjpg libpng libmtp svg2png | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
aqtversion: '==3.1.*' | |
py7zrversion: '>=0.20.2' | |
version: '6.5.0' | |
host: 'mac' | |
target: 'desktop' | |
arch: 'clang_64' | |
modules: 'qtcharts' | |
- name: build Ripes | |
run: | | |
export QT_ROOT=${GITHUB_WORKSPACE}/Qt/5.13.0/clang_64 | |
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins | |
export PATH=$QT_ROOT/bin:$PATH | |
export CMAKE_PREFIX_PATH=$QT_ROOT/lib/cmake | |
DIR=$(pwd) | |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" . | |
make | |
- name: package artifacts | |
run: | | |
macdeployqt $(if [ ${{ matrix.build-type }} -eq Debug ]; then echo "-use-debug-libs"; fi) Ripes.app | |
# Enable HiDPI scaling for Retina systems | |
plutil -replace NSHighResolutionCapable -bool true Ripes.app/Contents/Info.plist | |
# Create icon bundle | |
sh .github/workflows/scripts/svg2icns.sh resources/icons/logo.svg | |
mv logo.icns Ripes.app/Contents/Resources | |
plutil -replace CFBundleIconFile -string logo.icns Ripes.app/Contents/Info.plist | |
source .github/workflows/scripts/set_version.sh | |
export APPNAME=Ripes-${RIPES_VERSION}-mac-universal2 | |
echo "APPNAME=${APPNAME}" >> $GITHUB_ENV | |
chmod +x Ripes.app/Contents/MacOS/Ripes | |
sudo mv Ripes.app ${APPNAME}.app | |
sudo zip -r ${APPNAME}.zip ${APPNAME}.app/ | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ matrix.build-type }}_executable | |
path: ${{ env.APPNAME }}.zip | |
- name: continuous release | |
uses: softprops/action-gh-release@v1 | |
if: github.ref == 'refs/heads/master' && matrix.build-type == 'Release' | |
with: | |
prerelease: true | |
files: ${{ env.APPNAME }}.zip | |
tag_name: continuous | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- if: (startsWith(github.ref, 'refs/tags/')) && (matrix.build-type == 'Release') | |
name: tagged release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: ${{ env.APPNAME }}.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |