GUI: update samples #6
Workflow file for this run
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 Installer | |
| on: | |
| push: | |
| tags: ['release-*'] # tagged release -> build + attach to the GitHub Release | |
| branches: ['em400-next'] # TEMPORARY: exercise the workflow on the dev branch (remove before merge) | |
| workflow_dispatch: {} # manual ad-hoc test build (artifact only) | |
| jobs: | |
| installer: | |
| name: Win64 installer | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| env: | |
| BUILD_TYPE: Release | |
| CC: gcc | |
| CXX: g++ | |
| INSTALL_PREFIX: /mingw64 | |
| steps: | |
| - uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: MINGW64 | |
| update: true | |
| install: >- | |
| base-devel | |
| git | |
| mingw-w64-x86_64-toolchain | |
| mingw-w64-x86_64-cmake | |
| mingw-w64-x86_64-libuv | |
| mingw-w64-x86_64-qt6-base | |
| mingw-w64-x86_64-qt6-multimedia | |
| mingw-w64-x86_64-qt6-multimedia-wmf | |
| mingw-w64-x86_64-qt6-tools | |
| mingw-w64-x86_64-nsis | |
| python | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 # so `git describe --tags` resolves the installer version | |
| - name: Build and install emawp | |
| run: git clone https://github.com/jakubfi/emawp && cmake -S emawp -B emawp/build -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} && cmake --build emawp/build && cmake --install emawp/build | |
| - name: Build and install emcrk | |
| run: git clone https://github.com/jakubfi/emcrk && cmake -S emcrk -B emcrk/build -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} && cmake --build emcrk/build && cmake --install emcrk/build | |
| - name: Build and install emdas | |
| run: git clone https://github.com/jakubfi/emdas && cmake -S emdas -B emdas/build -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} && cmake --build emdas/build && cmake --install emdas/build | |
| - name: Configure installer build | |
| run: cmake -S . -B build -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} -DEM400_BUILD_INSTALLER=ON | |
| - name: Build | |
| run: cmake --build build | |
| - name: Build installer | |
| run: cd build && cpack | |
| - name: Upload installer | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: em400-windows-installer | |
| path: build/em400-*-win64.exe | |
| if-no-files-found: error | |
| - name: Attach to release | |
| if: startsWith(github.ref, 'refs/tags/release-') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: build/em400-*-win64.exe |