Merge pull request #1742 from FluidSynth/cmake-fixes-1737 #97
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: FluidSynth iOS | |
| on: | |
| pull_request: | |
| push: | |
| paths-ignore: | |
| - '.azure/**' | |
| - '.circleci/**' | |
| - '.github/workflows/linux.yml' | |
| - '.github/workflows/solaris.yml' | |
| - '.github/workflows/windows.yml' | |
| - '.github/workflows/sonarcloud.yml' | |
| - '.cirrus.yml' | |
| - 'README.md' | |
| release: | |
| types: [published] | |
| env: | |
| # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
| BUILD_TYPE: RelWithDebInfo | |
| INSTALL_LOCATION: ${{github.workspace}}/fluidsynth_install | |
| # Use a bash shell so we can use the same syntax for environment variable | |
| # access regardless of the host operating system | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| ios-build: | |
| # The CMake configure and build commands are platform agnostic and should work equally | |
| # well on Windows or Mac. You can convert this to a matrix build if you need | |
| # cross-platform coverage. | |
| # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
| runs-on: macos-latest | |
| outputs: | |
| artifact_name: ${{ steps.artifact_name.outputs.name }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Build | |
| run: bash contrib/ios_build.sh | |
| - name: Set artifact name | |
| shell: bash | |
| id: artifact_name | |
| run: | | |
| if [[ "${{ github.event_name }}" == "release" ]]; then | |
| echo "name=fluidsynth-${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT | |
| else | |
| echo "name=fluidsynth-${{ github.run_id }}" >> $GITHUB_OUTPUT | |
| fi | |
| mkdir publish | |
| ls -la . | |
| cp -r build/FluidSynth.xcframework publish/ | |
| ls -la publish | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: ${{ steps.artifact_name.outputs.name }}-iOS | |
| path: publish/ | |
| retention-days: 14 | |
| overwrite: true | |
| # Publish artifacts to GitHub releases (only on release events) | |
| publish-release-ios: | |
| if: github.event_name == 'release' && github.event.action == 'published' | |
| needs: | |
| - ios-build | |
| runs-on: ubuntu-latest | |
| name: 🚀 Publish Release Artifacts | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v7 | |
| with: | |
| path: ${{ needs.ios-build.outputs.artifact_name }}-iOS | |
| pattern: ${{ needs.ios-build.outputs.artifact_name }}-iOS | |
| merge-multiple: false | |
| - name: Create release archives | |
| run: | | |
| ls -la | |
| zip -r "${{ needs.ios-build.outputs.artifact_name }}-iOS.zip" "${{ needs.ios-build.outputs.artifact_name }}-iOS" | |
| - name: Upload release assets | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| *.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |