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

add macos qt5 build for older macos version. #894

Merged
merged 1 commit into from
Aug 18, 2024
Merged
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
94 changes: 94 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,99 @@ jobs:
name: ${{ env.APP_NAME }}-${{env.VERSION}}-linux-x86_64
path: ${{ env.APP_NAME }}-${{env.VERSION}}-linux-x86_64.AppImage

build-mac-intel-qt5:
runs-on: macos-12
needs: setup
strategy:
fail-fast: false
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable

- name: Set version environment variable
run: echo "VERSION=${{ needs.setup.outputs.version }}" >> $GITHUB_ENV

- name: Print version
run: echo "Qucs-S version is ${{ env.VERSION }}"

- uses: actions/checkout@v4
with:
submodules: recursive

#- name: 'Install Qt5'
# uses: jurplel/install-qt-action@v4
# with:
# version: '5.15.2'
# host: 'mac'
# target: 'desktop'
# cache: true
# arch: 'clang_64'
# install-deps: 'true'
# tools: 'tools_cmake'

- name: 'Install Dependencies'
shell: bash
run: |
brew install qt@5 gperf dos2unix bison flex ninja graphicsmagick
echo 'export PATH="$(brew --prefix bison)/bin:$PATH"' >> /Users/runner/.bashrc
export LDFLAGS="-L$(brew --prefix bison)/lib"
source ~/.bashrc
brew link bison --force


- name: 'Configure CMake'
run: |
cmake -B ${{github.workspace}}/build -G 'Ninja' \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_PREFIX_PATH=$(brew --prefix qt@5)

- name: 'Build Qucs-s'
run: |
cmake --build ${{github.workspace}}/build --parallel --config=${{env.BUILD_TYPE}}

#- name: Install
# run: |
# cd build
# make install DESTDIR=./deploy
# cd ..

- name: 'Package App Bundle'
run: |
mkdir -p ${{env.QUCS_MACOS_BIN}}
mkdir -p ${{env.QUCS_MACOS_RESOURCES}}/examples
mkdir -p ${{env.QUCS_MACOS_RESOURCES}}/library
mkdir -p ${{env.QUCS_MACOS_RESOURCES}}/symbols
cp -pR ./build/qucs-activefilter/qucs-sactivefilter.app ${{env.QUCS_MACOS_BIN}}
cp -pR ./build/qucs-attenuator/qucs-sattenuator.app ${{env.QUCS_MACOS_BIN}}
cp -pR ./build/qucs-filter/qucs-sfilter.app ${{env.QUCS_MACOS_BIN}}
cp -pR ./build/qucs-powercombining/qucs-spowercombining.app ${{env.QUCS_MACOS_BIN}}
cp -pR ./build/qucs-transcalc/qucs-strans.app ${{env.QUCS_MACOS_BIN}}
cp -pR ./build/qucsator_rf/src/qucsator_rf ${{env.QUCS_MACOS_BIN}}
cp -pR ./build/qucsator_rf/src/converter/qucsconv_rf ${{env.QUCS_MACOS_BIN}}
cp -pR ./examples/* ${{env.QUCS_MACOS_RESOURCES}}/examples
cp -pR ./library/*.lib ${{env.QUCS_MACOS_RESOURCES}}/library
cp -pR ./library/*.blacklist ${{env.QUCS_MACOS_RESOURCES}}/library
cp -pR ./library/symbols/* ${{env.QUCS_MACOS_RESOURCES}}/symbols
$(brew --prefix qt@5)/bin/macdeployqt ./build/qucs/qucs-s.app
$(brew --prefix qt@5)/bin/macdeployqt ${{env.QUCS_MACOS_BIN}}/qucs-sactivefilter.app
$(brew --prefix qt@5)/bin/macdeployqt ${{env.QUCS_MACOS_BIN}}/qucs-sattenuator.app
$(brew --prefix qt@5)/bin/macdeployqt ${{env.QUCS_MACOS_BIN}}/qucs-sfilter.app
$(brew --prefix qt@5)/bin/macdeployqt ${{env.QUCS_MACOS_BIN}}/qucs-spowercombining.app
$(brew --prefix qt@5)/bin/macdeployqt ${{env.QUCS_MACOS_BIN}}/qucs-strans.app
strip ${{env.QUCS_MACOS_BIN}}/qucsator_rf
strip ${{env.QUCS_MACOS_BIN}}/qucsconv_rf
codesign --force --deep --sign - ./build/qucs/qucs-s.app
npm install --global create-dmg
create-dmg ./build/qucs/qucs-s.app ./build/qucs/ || true
cp -pR ./build/qucs/qucs-*.dmg ./${{ env.APP_NAME }}-${{env.VERSION}}-macOS-qt5-x86_64.dmg

- name: 'Upload build artifacts'
uses: actions/upload-artifact@v4
with:
name: ${{ env.APP_NAME }}-${{env.VERSION}}-macOS-qt5-x86_64
path: ${{ env.APP_NAME }}-${{env.VERSION}}-macOS-qt5-x86_64.dmg


build-mac-intel:
runs-on: macos-12
Expand Down Expand Up @@ -378,6 +471,7 @@ jobs:
needs:
- setup
- build-linux-appimage-qt6
- build-mac-intel-qt5
- build-mac-intel
- build-mac-arm
- build-windows
Expand Down
Loading