From 6a981ac5f78f8871d80f3460e5efdcd754814926 Mon Sep 17 00:00:00 2001 From: Scott Brenner Date: Mon, 12 May 2025 21:22:05 -0700 Subject: [PATCH] CI - replace Windows installation step with microsoft/setup-msbuild --- .github/workflows/ci.yml | 9 ++++++--- .github/workflows/nightly.yml | 11 ++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e559c71b59..200e91efe2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,9 +40,6 @@ jobs: - os: windows-latest name: Windows arch: x64 - install: | - $vsPath = &"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath - &"$vsPath\VC\Auxiliary\Build\vcvarsall.bat" x64 configure: cmake -B build -DWITH_FFMPEG_JOBS="$env:NUMBER_OF_PROCESSORS" build: cmake --build build --parallel "$env:NUMBER_OF_PROCESSORS" name: ${{ matrix.name }} @@ -59,7 +56,13 @@ jobs: restore-keys: | ${{ runner.os }}-${{ matrix.arch }}-cmake-build- - name: Install dependencies + if: matrix.os != 'windows-latest' run: ${{ matrix.install }} + - name: Add msbuild to PATH + if: matrix.os == 'windows-latest' + uses: microsoft/setup-msbuild@v2 + with: + msbuild-architecture: x64 - name: Configure run: ${{ matrix.configure }} - name: Build diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 3bcd849df1..6a20a26a21 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -45,9 +45,6 @@ jobs: - os: windows-latest name: Windows arch: x64 - install: | - $vsPath = &"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath - &"$vsPath\VC\Auxiliary\Build\vcvarsall.bat" x64 configure: cmake -B build -DWITH_FFMPEG_JOBS="$env:NUMBER_OF_PROCESSORS" release: | cmake -B build -DWITH_FULL_RELEASE=Off -DWITH_NIGHTLY_RELEASE=On -DWITH_CLUB_FANTASTIC=Off @@ -68,9 +65,13 @@ jobs: restore-keys: | ${{ runner.os }}-${{ matrix.arch }}-cmake-build- - name: Install dependencies + if: matrix.os != 'windows-latest' run: ${{ matrix.install }} - - name: Configure - run: ${{ matrix.configure }} + - name: Add msbuild to PATH + if: matrix.os == 'windows-latest' + uses: microsoft/setup-msbuild@v2 + with: + msbuild-architecture: x64 - name: Create nightly release run: ${{ matrix.release }} - name: Upload artifacts