[build-win] #76
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: CMake on Windows MSVC/Clang x64 | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| env: | |
| BUILD_DIR: "build" | |
| BUILD_DIR_RELEASE: "build-release" | |
| CONTAINER_IMAGE: ghcr.io/kataglyphis/kataglyphis_beschleuniger:winamd64 | |
| defaults: | |
| run: | |
| shell: pwsh # Set PowerShell as default shell for all steps | |
| jobs: | |
| build: | |
| if: github.event_name == 'push' && contains(github.event.head_commit.message, '[build-win]') | |
| runs-on: windows-2025 | |
| steps: | |
| # - name: Enable Git long paths | |
| # run: git config --global core.longpaths true | |
| - name: Checkout | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| # my windows container is quite big ... so remove runner packages for enough | |
| # dis space | |
| - name: Cleanup disk space | |
| uses: ./.github/actions/cleanup-disk-space | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v4.1.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GHCR_PAT }} | |
| - name: Pull container image | |
| run: | | |
| docker pull "${{ env.CONTAINER_IMAGE }}" | |
| - name: Run build inside container | |
| run: | | |
| docker run --rm --memory 16g --cpus 4 ` | |
| --mount "type=bind,source=${{ github.workspace }},target=C:\workspace" ` | |
| -w "C:\workspace" ` | |
| "${{ env.CONTAINER_IMAGE }}" ` | |
| powershell -NoProfile -ExecutionPolicy Bypass -File "C:\workspace\scripts\windows\Build-Windows.ps1" -Configurations "clangcl-debug,clangcl-profile,clangcl-release" | |
| - name: Upload Installers & Zip | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: windows-installers | |
| path: | | |
| ${{ github.workspace }}/${{ env.BUILD_DIR_RELEASE }}/**/*.msi | |
| ${{ github.workspace }}/${{ env.BUILD_DIR_RELEASE }}/**/*.exe | |
| ${{ github.workspace }}/${{ env.BUILD_DIR_RELEASE }}/**/*.zip | |
| ${{ github.workspace }}/${{ env.BUILD_DIR_RELEASE }}/**/*.msix | |
| ${{ github.workspace }}/${{ env.BUILD_DIR_RELEASE }}/**/*.dll | |
| ${{ github.workspace }}/${{ env.BUILD_DIR_RELEASE }}/**/*.lib |