Skip to content

Commit

Permalink
macos builds (#642)
Browse files Browse the repository at this point in the history
* Try build for osx

* Attempt 2

* attempt 3

* Where are we?

* Attempt 5

* print workspaces

* Use the github workspace

* Check current directory

* Build on macos-latest

* rm extra `cd build`

* rm TARGET_OS_IPHONE macro from RtMidi.cpp

* Dummy release

* Add tag requirement

Seems like they are needed after all.

* Add tag name to file version
  • Loading branch information
ryfactor authored Dec 23, 2021
1 parent 6267c82 commit 73d04a8
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build-osx-wizmode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: osx-wizmode
on: [push]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: make-build-dir
run: mkdir build
- name: Print github workspace
run: |
echo "PWD = $PWD"
echo "GITHUB_WORKSPACE = $GITHUB_WORKSPACE"
echo "github.workspace = ${{ github.workspace }}"
echo "${{runner.workspace}}"
echo "HOME = $HOME"
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Show git tag
run: |
echo $RELEASE_VERSION
echo ${{ env.RELEASE_VERSION }}
- name: CI-Build
shell: bash
working-directory: ${{github.workspace}}/build
env:
CXXFLAGS: -DWIZARD
run: |
export SDL2DIR="$HOME/Thirdparty/Frameworks"
export BUILD_MAC_APP=ON
export IVAN_BUILD_DIR="${{github.workspace}}/build"
export IVAN_FILE_VERSION=${RELEASE_VERSION#v}
../ci/osx/requirements.sh
../ci/osx/build.sh
make install
../ci/osx/package.sh
ls ./osx
# Attention: you perform the release step when you push a tag, neat huh?
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{github.workspace}}/build/osx/*.dmg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#GITHUB_REPOSITORY: attnam/ivan
2 changes: 2 additions & 0 deletions audio/RtMidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@
#include "RtMidi.h"
#include <sstream>

/*
#if defined(__MACOSX_CORE__)
#if TARGET_OS_IPHONE
#define AudioGetCurrentHostTime CAHostTimeBase::GetCurrentTime
#define AudioConvertHostTimeToNanos CAHostTimeBase::ConvertToNanos
#endif
#endif
*/

//*********************************************************************//
// RtMidi Definitions
Expand Down

0 comments on commit 73d04a8

Please sign in to comment.