Release preparations #15
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: Windows MSYS2 CI | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ "master", "devel" ] | |
| pull_request: | |
| branches: [ "master", "devel" ] | |
| env: | |
| BUILD_TYPE: RelWithDebInfo | |
| INSTALL_LOCATION: SonivoxV4 | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { icon: '🟫', sys: mingw32 } | |
| - { icon: '🟦', sys: mingw64 } | |
| - { icon: '🟨', sys: ucrt64 } | |
| - { icon: '🟧', sys: clang64 } | |
| name: 🚧${{ matrix.icon }} msys2 ${{ matrix.sys }} | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: '${{ matrix.icon }} Install NSIS' | |
| uses: repolevedavaj/install-nsis@v1.1.0 | |
| with: | |
| nsis-version: '3.11' | |
| - name: '${{ matrix.icon }} Setup MSYS2' | |
| uses: msys2/setup-msys2@v2 | |
| id: msys2 | |
| with: | |
| release: false | |
| msystem: ${{matrix.sys}} | |
| install: >- | |
| git | |
| make | |
| pacboy: >- | |
| toolchain:p | |
| cmake:p | |
| ninja:p | |
| gtest:p | |
| - name: '${{ matrix.icon }} TEMP Environment Variable' | |
| id: tmp | |
| run: | | |
| echo "cache_path=$(cygpath -m $TEMP)" >> $GITHUB_OUTPUT | |
| echo "dependencies=$(cygpath -m $MSYSTEM_PREFIX/bin)" >> $GITHUB_OUTPUT | |
| - name: '${{ matrix.icon }} Downloading a DLS file for testing' | |
| uses: ethanjli/cached-download-action@v0.1.3 | |
| with: | |
| url: http://www.ronimusic.com/sf2/Airfont_340.dls | |
| destination: ${{steps.tmp.outputs.cache_path}}/soundfont.dls | |
| cache-key: cached.soundfont.dls | |
| enable-cross-os-archive: true | |
| - name: '${{ matrix.icon }} Configure CMake' | |
| id: configuration | |
| run: > | |
| cmake -B build -G Ninja | |
| -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
| -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_LOCATION}} | |
| -DDEPENDENCY_DIRS=${{steps.tmp.outputs.dependencies}} | |
| -DCPACK_SYSTEM_NAME=${{matrix.sys}} | |
| -DINSTALL_DEPENDENCIES=ON | |
| - name: '${{ matrix.icon }} Build' | |
| run: cmake --build build --config ${{env.BUILD_TYPE}} | |
| - name: '${{ matrix.icon }} Test' | |
| working-directory: build | |
| run: ctest -C ${{env.BUILD_TYPE}} --verbose | |
| - name: '${{ matrix.icon }} Package' | |
| run: cmake --build build --target package | |
| - name: '${{ matrix.icon }} Install' | |
| run: cmake --install build --config ${{env.BUILD_TYPE}} | |
| - name: '${{ matrix.icon }} Create Archive' | |
| run: tar cvf ${{env.INSTALL_LOCATION}}.tar ${{env.INSTALL_LOCATION}} | |
| - name: '${{ matrix.icon }} Upload Artifacts' | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: ${{env.INSTALL_LOCATION}}-msys2-${{matrix.sys}} | |
| path: ${{env.INSTALL_LOCATION}}.tar | |
| retention-days: 90 | |
| overwrite: true | |
| - name: '${{ matrix.icon }} Upload Installer' | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: SonivoxV4-msys2-installer-${{matrix.sys}} | |
| path: ${{github.workspace}}/build/sonivox-${{steps.configuration.outputs.config_version}}-${{matrix.sys}}.exe | |
| retention-days: 90 | |
| overwrite: true |