Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI and MacOS build script with Qt 6.5.2 and include link to Applications folder in MacOS dmg file #631

Merged
merged 2 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 2 additions & 36 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
types: [ created ]

env:
QT_VERSION: '6.4.2'
QT_VERSION: '6.5.2'

jobs:
Linux:
Expand Down Expand Up @@ -71,37 +71,6 @@ jobs:
title: "Development Build (Flatpak)"
files: org.fedoraproject.MediaWriter.flatpak

#Flatpak:
#if: github.event_name == 'release'
#runs-on: ubuntu-latest
#steps:
#- uses: actions/checkout@v1
#with:
#fetch-depth: 1
#- name: Install dependencies
#run: |
#sudo apt update
#sudo apt install flatpak flatpak-builder
#- name: Install Flatpak KDE SDK
#run: |
#sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
#sudo flatpak install --system -y flathub org.kde.Platform//5.15
#sudo flatpak install --system -y flathub org.kde.Sdk//5.15
#- name: Build the Flatpak package
#run: |
#TAG_NAME=$(bash ./dist/get-tag-name.sh)
#pushd dist/flatpak
#sudo flatpak-builder --repo=flatpak-repo --force-clean flatpak-build org.fedoraproject.MediaWriter.json
#flatpak build-bundle flatpak-repo org.fedoraproject.MediaWriter.flatpak org.fedoraproject.MediaWriter
#mv org.fedoraproject.MediaWriter.flatpak ../../org.fedoraproject.MediaWriter-$TAG_NAME.flatpak
#popd
#- name: Upload to GitHub
#if: github.event_name == 'release'
#shell: bash
#run: |
#TAG_NAME=$(bash ./dist/get-tag-name.sh)
#bash ./dist/upload-to-github.sh github_api_token=${{ secrets.GITHUB_TOKEN }} tag="$TAG_NAME" filename="org.fedoraproject.MediaWriter-$TAG_NAME.flatpak"

macOS:
runs-on: macos-latest
steps:
Expand All @@ -114,27 +83,24 @@ jobs:
version: ${{env.QT_VERSION}}
modules: qtimageformats
- name: Set env (push)
if: github.event_name == 'push' || github.event_name == 'release'
if: github.event_name == 'push' || github.event_name == 'pull_request'
run: echo "TAG_NAME=$(git rev-parse HEAD | cut -c 1-8)" >> $GITHUB_ENV
- name: Set env (release)
if: github.event_name == 'release'
run: echo "TAG_NAME=$(bash ./dist/get-tag-name.sh)" >> $GITHUB_ENV
- name: Build
if: github.event_name == 'push' || github.event_name == 'release'
env:
TAG_NAME: ${{ env.TAG_NAME }}
run: |
bash dist/mac/build.sh build
- name: Insert dependencies
if: github.event_name == 'push' || github.event_name == 'release'
run: |
bash dist/mac/build.sh deps
- name: Sign (TBD)
if: github.event_name == 'release'
run: |
true # bash dist/mac/build.sh sign
- name: Package
if: github.event_name == 'push' || github.event_name == 'release'
env:
TAG_NAME: ${{ env.TAG_NAME }}
run: |
Expand Down
15 changes: 10 additions & 5 deletions dist/mac/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ set -x
set -e

# TODO: add your Qt location into LD_LIBRARY_PATH
PATH="/usr/local/opt/qt/6.2.4/macos/bin:$PATH"
LD_LIBRARY_PATH="/usr/local/opt/qt/6.2.4/macos/lib:$LD_LIBRARY_PATH"
Qt6_DIR="/usr/local/opt/qt/6.2.4/macos"
PATH="/usr/local/opt/qt/6.5.2/macos/bin:$PATH"
LD_LIBRARY_PATH="/usr/local/opt/qt/6.5.2/macos/lib:$LD_LIBRARY_PATH"
Qt6_DIR="/usr/local/opt/qt/6.5.2/macos"

# === SIGNING ===
# TODO: set in order to sign binaries
Expand Down Expand Up @@ -35,7 +35,7 @@ function install_deps() {
mkdir -p /usr/local/opt/qt
pushd /usr/local/opt/qt >/dev/null
pip3 install aqtinstall
aqt install-qt mac desktop 6.2.4 -m qtimageformats
aqt install-qt mac desktop 6.5.2 -m qtimageformats
popd >/dev/null
}

Expand Down Expand Up @@ -94,7 +94,12 @@ function dmg() {
echo "=== Creating a disk image ==="
# create the .dmg package - beware, it won't work while FMW is running (blocks partition mounting)
rm -f "../*.dmg"
hdiutil create -srcfolder src/app/Fedora\ Media\ Writer.app -format UDCO -imagekey zlib-level=9 -scrub -volname FedoraMediaWriter-osx ../FedoraMediaWriter-osx-$VERSION.unnotarized.dmg
STAGING_DIR="$SCRIPTDIR/staging"
mkdir -p $STAGING_DIR
cp -R src/app/Fedora\ Media\ Writer.app $STAGING_DIR
ln -s /Applications $STAGING_DIR/Applications
hdiutil create -srcfolder $STAGING_DIR -format UDCO -imagekey zlib-level=9 -scrub -volname FedoraMediaWriter-osx ../FedoraMediaWriter-osx-$VERSION.unnotarized.dmg
rm -rf $STAGING_DIR
popd >/dev/null
}

Expand Down
Loading