Skip to content

Commit

Permalink
Fix conditionals in mac workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew J. Milner <[email protected]>
  • Loading branch information
matterhorn103 committed Dec 16, 2024
1 parent 713da70 commit 20ab9fe
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions .github/workflows/build_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
config:
- {
name: "macOS Intel", artifact: "macOS-x86_64.dmg",
os: macos-latest,
os: macos-13,
cc: "clang", cxx: "clang++",
build_type: "Release",
cmake_flags: "-G Ninja -DCMAKE_OSX_ARCHITECTURES='x86_64'",
Expand Down Expand Up @@ -51,14 +51,13 @@ jobs:

steps:

- name: Install Dependencies (macOS)
if: runner.os == 'macOS'
run: |
if uname -p | grep -q "arm" ; then
export PATH=/opt/homebrew/bin:$PATH
else # not self-hosted runner
brew install ninja eigen glew
fi
- name: Install Dependencies
if: matrix.config.name != 'macOS Apple Silicon'
run: brew install ninja eigen glew

- name: Set PATH (self-hosted)
if: matrix.config.name == 'macOS Apple Silicon'
run: export PATH=/opt/homebrew/bin:$PATH

- name: Checkout openchemistry
uses: actions/checkout@v4
Expand Down Expand Up @@ -110,7 +109,7 @@ jobs:

- name: Install Qt
# Only if not self-hosted
if: runner.name != 'macOS Apple Silicon'
if: matrix.config.name != 'macOS Apple Silicon'
uses: jurplel/install-qt-action@v4
with:
version: ${{ env.QT_VERSION }}
Expand All @@ -130,7 +129,6 @@ jobs:
working-directory: ${{ runner.workspace }}/build

- name: Fix Mac plugins
if: runner.os == 'macOS'
working-directory: ${{ runner.workspace }}/build/prefix/lib/openbabel
run: |
for plugin in *.so; do
Expand Down Expand Up @@ -163,7 +161,6 @@ jobs:
- name: Install the Apple certificate
# From GitHub docs: https://docs.github.com/en/actions/guides/installing-an-apple-certificate-on-macos-runners-for-xcode-development
if: runner.os == 'macOS'
working-directory: ${{ runner.workspace }}/build
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
Expand Down Expand Up @@ -212,7 +209,6 @@ jobs:
CODESIGN_IDENTITY: ${{ secrets.CODESIGN_ID }}

- name: Notarize Mac DMG
if: runner.os == 'macOS'
run: |
# check if we have the password and the username
if [ -n "${NOTARIZE_PASSWORD}" ] && [ -n "${NOTARIZE_USERNAME}" ]; then
Expand Down

0 comments on commit 20ab9fe

Please sign in to comment.