Skip to content

Disable WavPack in sdl2-mixer. #482

Disable WavPack in sdl2-mixer.

Disable WavPack in sdl2-mixer. #482

Workflow file for this run

name: Windows
on:
push:
branches: [modernize]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
build:
runs-on: windows-latest
permissions:
contents: read
outputs:
is_release: ${{ steps.export.outputs.is_release }}
git_describe: ${{ steps.export.outputs.git_describe }}
strategy:
#fail-fast: false
matrix:
include:
- name: Windows x64
platform: x64
arch: amd64
preset: windows-x64-release
- name: Windows x64-avx2
platform: x64
arch: amd64
name_postfix: "-avx2"
preset: windows-x64-avx2-release
- name: Windows x86
platform: x86
arch: amd64_x86
preset: windows-x86-release
- name: Windows ARM64
platform: arm64
arch: amd64_arm64
preset: windows-arm64-release
steps:
- name: Fetch repo
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Get cmake and ninja
uses: lukka/get-cmake@latest
- name: Find MSVC (on Windows)
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.arch}}
- name: Export Environment
id: export
shell: pwsh
run: .\.github\scripts\windows-environment.ps1 '${{matrix.platform}}${{matrix.name_postfix}}'
- name: Restore artifacts, or setup vcpkg (do not install any package)
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: external/vcpkg/vcpkg
vcpkgJsonGlob: external/vcpkg/config/vcpkg.json
prependedCacheKey: "Windows/${{ matrix.platform }}${{ matrix.name_postfix }}"
- name: Configure
shell: cmd
run: >
cmake -G Ninja --preset "${{matrix.preset}}" "-DTARGET_MSI_NAME=%PROJECT_OUTPUT_NAME%" -S "%PROJECT_SOURCE%" -B "${{env.PROJECT_BUILD}}"
|| (dir "%PROJECT_SOURCE%/external/vcpkg/vcpkg/buildtrees/sdl2-mixer"
; type "%PROJECT_SOURCE%/external/vcpkg/vcpkg/buildtrees/sdl2-mixer/patch-x64-windows-ltcg-static-0-err.log"
; type "%PROJECT_SOURCE%/external/vcpkg/vcpkg/buildtrees/sdl2-mixer/stdout-x64-windows-ltcg-static.log"
- name: Compile
shell: cmd
working-directory: "${{ env.PROJECT_BUILD }}"
run: |
cmake --build .
- name: Block cache on failure
if: ${{ failure() || cancelled() }}
shell: bash
run: echo "RUNVCPKG_NO_CACHE=1" >> $GITHUB_ENV
- name: Test
shell: cmd
if: matrix.platform != 'arm64'
working-directory: "${{ env.PROJECT_BUILD }}"
run: |
cmake --build . --target test
- name: Build Installer
shell: cmd
working-directory: "${{ env.PROJECT_BUILD }}"
run: |
cpack -G ZIP -v
- name: Upload Binaries Artifact
uses: actions/upload-artifact@v3
with:
name: ${{env.PROJECT_ZIP_NAME}}
path: ${{env.PROJECT_ZIP}}
#- name: Upload Installer Artifact
#uses: actions/upload-artifact@v3
#with:
#name: Setup ${{env.PROJECT_OUTPUT_NAME}}
#path: ${{env.PROJECT_INSTALLER}}
release:
needs: build
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Collect artifacts
uses: actions/download-artifact@v3
with:
path: .
- name: Create Prerelease
if: contains(github.ref, 'modernize')
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: latest-windows
title: "Latest CI/canary Windows dunelegacy ${{needs.build.outputs.git_describe}}"
draft: false
prerelease: true
files: |
**/*.zip
- name: Create Release
if: needs.build.outputs.is_release == 'True'
uses: softprops/action-gh-release@v1
with:
name: "Windows dunelegacy ${{needs.build.outputs.git_describe}}"
files: |
**/*.zip
draft: true
prerelease: false