Creation of a windows workflow with msys2 #1
This file contains 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: Build on Windows with MSYS2 | |
on: | |
push: | |
branches: [ "devel", "master" ] | |
pull_request: | |
branches: [ "devel", "master" ] | |
env: | |
BUILD_TYPE: RelWithDebInfo | |
DRUMSTICK: DrumstickV2 | |
SONIVOX: SonivoxV3 | |
jobs: | |
build: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# { icon: 'β¬', sys: mingw32 } # There are no 32 bit packages for Qt6 in msys2 anymore | |
- { icon: 'π¦', sys: mingw64 } | |
- { icon: 'π¨', sys: ucrt64 } | |
- { icon: 'π§', sys: clang64 } | |
name: π§${{ matrix.icon }} ${{ matrix.sys }} | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- name: '${{ matrix.icon }} Checkout' | |
uses: actions/checkout@v4 | |
- name: '${{ matrix.icon }} Download Sonivox' | |
uses: dawidd6/action-download-artifact@v3 | |
with: | |
name: ${{env.SONIVOX}}-${{matrix.sys}} | |
github_token: ${{secrets.GH_PAT}} | |
repo: pedrolcl/sonivox | |
workflow: cmake-win.yml | |
- name: '${{ matrix.icon }} Extract Sonivox' | |
run: tar xvf ${{env.SONIVOX}}.tar | |
- name: '${{ matrix.icon }} Download Drumstick' | |
uses: dawidd6/action-download-artifact@v3 | |
with: | |
name: ${{env.DRUMSTICK}}-${{matrix.sys}} | |
github_token: ${{secrets.GH_PAT}} | |
repo: pedrolcl/drumstick | |
workflow: cmake-win.yml | |
- name: '${{ matrix.icon }} Extract Drumstick' | |
run: tar xvf ${{env.DRUMSTICK}}.tar | |
- name: '${{ matrix.icon }} Setup MSYS2' | |
uses: msys2/setup-msys2@v2 | |
with: | |
release: false | |
msystem: ${{matrix.sys}} | |
install: >- | |
git | |
make | |
pacboy: >- | |
toolchain:p | |
cmake:p | |
ninja:p | |
qt6-base:p | |
qt6-tools:p | |
qt6-translations:p | |
- name: '${{ matrix.icon }} Configure CMake' | |
run: cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_PREFIX_PATH="${{env.DRUMSTICK}};${{env.SONIVOX}}" | |
- name: '${{ matrix.icon }} Build' | |
run: cmake --build build --config ${{env.BUILD_TYPE}} |