name: Build And Publish on: push: branches: - master - develop env: PACKAGENAME: CsoundQt jobs: buildjob: name: Build CsoundQt on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: # os: [windows-latest, ubuntu-latest, macos-latest] os: [macos-latest] include: #- os: windows-latest # triplet: x64-windows #- os: ubuntu-latest # triplet: x64-linux - os: macos-latest triplet: x64-osx # os: [windows-2019] steps: - name: Checkout repository uses: actions/checkout@v4 with: submodules: true - name: update submodules run: | echo "Calling git submodule update" git submodule update --init --recursive git submodule status --recursive echo "Finished submodules" # - uses: lukka/get-cmake@latest # - uses: ilammy/msvc-dev-cmd@v1 - name: macos build if: runner.os == 'macOS' run: | set -o xtrace # echo each command before it is executed brew update brew install csound brew install qt5 brew link qt5 --force csound_brew_root=$(brew --prefix csound) echo "Csound brew root: $csound_brew_root" # download missing csPerthread.hpp curl -o $csound_brew_root/Frameworks/CsoundLib64.framework/Versions/6.0/Headers/csPerfThread.hpp https://raw.githubusercontent.com/csound/csound/master/interfaces/csPerfThread.hpp ls -R "$csound_brew_root" # qmake CONFIG+=rtmidi CONFIG+=release CSOUND_LIBRARY_DIR+="$csound_lib" qcs.pro qmake CONFIG+=rtmidi CONFIG+=release qcs.pro make -j4 make install_first make install_pythonlinks # not sure if cocoa and printsupport are necessary any more... # remove Csound from bundle rm -fr bin/CsoundQt-d-cs6.app/Contents/Frameworks/CsoundLib64.framework install_name_tool -change @executable_path/../Frameworks/libcsnd6.6.0.dylib libcsnd6.6.0.dylib bin/CsoundQt-d-cs6.app/Contents/MacOS/CsoundQt-d-cs6 install_name_tool -change /usr/local/opt/csound/Frameworks/CsoundLib64.framework/Versions/6.0/CsoundLib64 CsoundLib64.framework/Versions/6.0/CsoundLib64 bin/CsoundQt-d-cs6.app/Contents/MacOS/CsoundQt-d-cs6 otool -L bin/CsoundQt-d-cs6.app/Contents/MacOS/CsoundQt-d-cs6 hdiutil create -fs HFS+ -srcfolder bin/CsoundQt-d-cs6.app -volname CsoundQt CsoundQt.dmg #macdeployqt bin/CsoundQt-d-cs6.app -qmldir=src/QML -dmg find . #echo "mkdir build-macos" #mkdir build-macos #echo "copying app to build-macos" #cp -r bin/CsoundQt-d-cs6.app build-macos #echo "Creating .dmg file" #hdiutil create -fs HFS+ -srcfolder build-macos -volname CsoundQt "CsoundQt.dmg" echo "Creating artifacts folder" mkdir -p artifacts echo "Copying .dmg to artifacts" cp CsoundQt.dmg artifacts echo "Listing artifacts" ls artifacts echo "ready!" - name: linux build if: runner.os == 'linux' run: | sudo apt update echo "--- Root dir ---" ls rm -fr build-linux mkdir build-linux cd build-linux - uses: actions/upload-artifact@v4 with: name: CsoundQt path: artifacts/* publish: name: Publish artifacts as a Pre-Release # if: contains(github.ref, 'tags/v') needs: [buildjob] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Load Release URL File from release job uses: actions/download-artifact@v4 with: name: CsoundQt path: artifacts - name: List files run: | ls -R - name: Publish uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" automatic_release_tag: "latest" title: "Development Build" prerelease: True files: | artifacts/*