Skip to content

Commit

Permalink
build.yml: Fully enable MacOS builds
Browse files Browse the repository at this point in the history
  • Loading branch information
abraxa committed Mar 7, 2024
1 parent 54b1485 commit fcd3237
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 39 deletions.
47 changes: 19 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ jobs:
with:
name: artifact-pulseview-${{ matrix.target.target }}-mxe
path: pulseview/build/contrib/pulseview*installer.exe
overwrite: true


build_sigrok-cli_mxe:
Expand Down Expand Up @@ -177,7 +176,6 @@ jobs:
with:
name: artifact-sigrok-cli-${{ matrix.target.target }}-mxe
path: sigrok-cli/contrib/sigrok-cli*installer.exe
overwrite: true


build_pulseview_appimage:
Expand Down Expand Up @@ -276,7 +274,6 @@ jobs:
with:
name: artifact-pulseview-${{ matrix.target.target }}-appimage
path: sigrok-build/ci/appimage/appimage-build/pulseview-*.appimage
# overwrite: true


build_sigrok-cli_appimage:
Expand Down Expand Up @@ -367,26 +364,26 @@ jobs:
with:
name: artifact-sigrok-cli-x86_64-appimage
path: sigrok-build/ci/appimage/appimage-build/sigrok-cli-*.appimage
overwrite: true


build_pulseview_macos:
name: PulseView macOS build (${{ matrix.build_type.type }}) ${{ matrix.build_type.type }}
name: PulseView macOS build

runs-on: macos-12

strategy:
matrix:
build_type:
- { type: "Release", name: "release" }
- { type: "Debug", name: "debug" }
# Note: For now, we only supply debug builds
# strategy:
# matrix:
# build_type:
# - { type: "Release", name: "release" }
# - { type: "Debug", name: "debug" }

env:
TARGET: "x86"
BREW_PYTHON_VERSION: "python@3"
BREW_QT_VERSION: "qt"
# Artifact infos
ARTIFACT_TITLE: "PulseView"
ARTIFACT_TITLE: "pulseview"
ARTIFACT_BIN_NAME: "pulseview"
ARTIFACT_VERSION: "NIGHTLY"

Expand All @@ -397,9 +394,9 @@ jobs:
libzip libusb libftdi hidapi nettle check doxygen swig \
glib [email protected] cmake boost sdcc $BREW_PYTHON_VERSION $BREW_QT_VERSION
- name: Provide qt also in prefix directory as qt is using a keg
run: |
brew link -f $BREW_QT_VERSION
# - name: Provide qt also in prefix directory as qt is using a keg
# run: |
# brew link -f $BREW_QT_VERSION

- name: Checkout sigrok-build
uses: actions/checkout@v4
Expand All @@ -426,7 +423,7 @@ jobs:
cd pulseview/build
PKG_CONFIG_PATH=$P cmake \
-DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_DIR \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type.type }} \
-DCMAKE_BUILD_TYPE=Debug \
-DDISABLE_WERROR=FALSE \
-DENABLE_TESTS=FALSE \
..
Expand All @@ -442,32 +439,25 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: artifact-pulseview-${{ matrix.build_type.name }}-macos
name: artifact-pulseview-macos
path: sigrok-build/ci/macos/PulseView*.dmg
# overwrite: true


build_sigrok-cli_macos:
name: sigrok-cli macOS build

runs-on: macos-11
runs-on: macos-12

env:
TARGET: "x86"
# We use Homebrew Qt 5.15.x (current)
BREW_QT_VERSION: "qt@5"
# We use Homebrew Python 3.x (current)
BREW_QT_VERSION: "qt"
BREW_PYTHON_VERSION: "python@3"
# Artifact infos
ARTIFACT_TITLE: "sigrok-cli"
ARTIFACT_BIN_NAME: "sigrok-cli"
ARTIFACT_VERSION: "NIGHTLY"

steps:
- name: Abort run as OSX build is cancelled on github currently
run: |
exit 1
- name: Install dependencies
run: |
brew install autoconf automake autoconf-archive pkg-config sdcc \
Expand Down Expand Up @@ -512,7 +502,6 @@ jobs:
with:
name: artifact-sigrok-cli-macos
path: sigrok-build/ci/macos/sigrok-cli*.dmg
overwrite: true

release:
name: Create release and add artifacts
Expand All @@ -527,8 +516,8 @@ jobs:
- build_sigrok-cli_mxe
- build_pulseview_appimage
- build_sigrok-cli_appimage
# - build_pulseview_macos
# - build_sigrok-cli_macos
- build_pulseview_macos
- build_sigrok-cli_macos

steps:
- name: Download AppImage artifacts
Expand All @@ -545,9 +534,11 @@ jobs:
artifact-sigrok-cli-i686-mxe/sigrok-cli-*
artifact-sigrok-cli-x86_64-mxe/sigrok-cli-*
artifact-sigrok-cli-x86_64-appimage/sigrok-cli-*
artifact-sigrok-cli-macos/sigrok-cli-*
artifact-pulseview-i686-mxe/pulseview-*
artifact-pulseview-x86_64-mxe/pulseview-*
artifact-pulseview-x86_64-appimage/pulseview-*
artifact-pulseview-macos/pulseview-*
tag_name: continuous
generate_release_notes: false
draft: false
Expand Down
13 changes: 2 additions & 11 deletions ci/macos/sigrok-macos-create-dmg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,14 @@ set -e
set -x


echo "------------------------------------------"
echo $(brew --prefix "$BREW_QT_VERSION")
find /usr/local/opt/qt
echo "------------------------------------------"
echo $(brew --cellar "$BREW_QT_VERSION")
echo "------------------------------------------"
# Note: Turn "qt 6.6.1" into "qt/6.6.1"
QT_VER=$(brew list --versions qt)
QT_VER_PATH=$(echo $QT_VER | sed 's# #/#')
p=$(brew --cellar)/$QT_VER_PATH/share/qt/translations
find $p -iname "qt*.qm"
echo "------------------------------------------"
echo "------------------------------------------"

# Path to Qt5 binaries
QT_BIN_DIR=$(brew list "$BREW_QT_VERSION" | grep bin | head -n 1 | xargs dirname)
QT_TRANSLATIONS_DIR=$p
QT_TRANSLATIONS_DIR=$(brew --cellar)/$QT_VER_PATH/share/qt/translations


# Path to Python 3 framework
PYTHON_FRAMEWORK_DIR=$(brew list "$BREW_PYTHON_VERSION" | grep Python.framework/Python | head -n 1 | xargs dirname)
Expand Down

0 comments on commit fcd3237

Please sign in to comment.