testbuild_win32 #31
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: Testbuild for Win32 | |
| run-name: testbuild_win32 | |
| on: | |
| push: | |
| branches: | |
| - 'master' | |
| tags: | |
| - "*" | |
| pull_request: | |
| types: | |
| - edited | |
| - opened | |
| - synchronize | |
| concurrency: | |
| # Cancel concurrent workflows for the same PR or commit hash. | |
| group: ${{github.workflow}}-${{github.event_name == 'pull_request' && github.head_ref || github.sha}} | |
| cancel-in-progress: true | |
| jobs: | |
| build_mingw_x86_32: | |
| runs-on: windows-latest | |
| permissions: | |
| actions: read | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { sys: mingw32, env: i686 } | |
| steps: | |
| - uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: ${{matrix.sys}} | |
| update: true | |
| install: >- | |
| git | |
| make | |
| zip | |
| unzip | |
| mingw-w64-${{matrix.env}}-gcc | |
| mingw-w64-${{matrix.env}}-make | |
| mingw-w64-${{matrix.env}}-vulkan-headers | |
| mingw-w64-${{matrix.env}}-pkgconf | |
| - name: Check out repository code | |
| uses: actions/checkout@v6 | |
| - name: Build | |
| shell: msys2 {0} | |
| run: | | |
| # Download and extract SDL3 devel files. | |
| wget -c https://github.com/libsdl-org/SDL/releases/download/release-3.2.24/SDL3-devel-3.2.24-mingw.tar.gz | |
| tar xf SDL3-devel-3.2.24-mingw.tar.gz | |
| mv SDL3-3.2.24 SDL3 | |
| # Public runners come with 4 CPUs. | |
| PKG_CONFIG_PATH=SDL3/i686-w64-mingw32/lib/pkgconfig make -j4 | |
| - name: Create testbuild package | |
| shell: msys2 {0} | |
| run: | | |
| # Create release directory tree | |
| mkdir -p publish/ref_vk-win32-${{github.sha}}/misc/docs | |
| # Copy release assets | |
| cp -r release/* publish/ref_vk-win32-${{github.sha}}/ | |
| # Copy misc assets | |
| cp LICENSE publish/ref_vk-win32-${{github.sha}}/misc/docs/LICENSE.txt | |
| cp README.md publish/ref_vk-win32-${{github.sha}}/misc/docs/README.txt | |
| - name: Upload testbuild package | |
| uses: actions/upload-artifact@v6 | |
| if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
| with: | |
| name: ref_vk-win32-${{github.sha}} | |
| path: publish/ | |
| if-no-files-found: error | |
| - name: Create testbuild package | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| shell: msys2 {0} | |
| run: | | |
| # create archive | |
| mkdir ref_vk-${{matrix.env}}-${{github.ref_name}} | |
| cp -rv publish/ref_vk-win32-${{github.sha}}/* ref_vk-${{matrix.env}}-${{github.ref_name}} | |
| zip -9r ref_vk-${{matrix.env}}-${{github.ref_name}}.zip ref_vk-${{matrix.env}}-${{github.ref_name}} | |
| - name: Upload Release Asset | |
| uses: softprops/action-gh-release@v2 | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| with: | |
| files: | | |
| ref_vk-${{matrix.env}}-${{github.ref_name}}.zip |