Skip to content

build: fix packages aged out of mirrors breaking MSVC build #6399

build: fix packages aged out of mirrors breaking MSVC build

build: fix packages aged out of mirrors breaking MSVC build #6399

name: Cataclysm Windows build (MSVC)
on:
push:
branches:
- main
paths-ignore:
- 'android/**'
- 'build-data/osx/**'
- 'doc/**'
- 'doxygen_doc/**'
- 'gfx/**'
- 'lang/**'
- 'lgtm/**'
- 'tools/**'
- '!tools/format/**'
- 'utilities/**'
- 'scripts/**'
pull_request:
branches:
- main
paths-ignore:
- 'android/**'
- 'build-data/osx/**'
- 'doc/**'
- 'doxygen_doc/**'
- 'gfx/**'
- 'lang/**'
- 'lgtm/**'
- 'tools/**'
- '!tools/format/**'
- 'utilities/**'
- 'scripts/**'
# We only care about the latest revision, so cancel previous instances.
concurrency:
group: msvc-build-${{ github.ref_name }}
cancel-in-progress: true
env:
# There's not enough disk space to build both release and debug versions of
# our dependencies, so we hack the triplet file to build only release versions
# Have to use github.workspace because runner namespace isn't available yet.
VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}\.github\vcpkg_triplets
ZSTD_CLEVEL: 17
jobs:
build_catatclysm:
name: Build
runs-on: windows-2019
if: github.event.pull_request.draft == false
steps:
- name: checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: Remove Strawberry Perl from PATH
run: |
echo $env:PATH
echo =========================
$env:PATH = $env:PATH -replace "C:\\Strawberry\\c\\bin;", ""
$env:PATH = $env:PATH -replace "C:\\Strawberry\\perl\\site\\bin;", ""
$env:PATH = $env:PATH -replace "C:\\Strawberry\\perl\\bin;", ""
"PATH=$env:PATH" | Out-File -FilePath $env:GITHUB_ENV -Append
echo =========================
echo $env:PATH
- name: Setup msys2 (windows msvc)
if: runner.os == 'Windows'
uses: msys2/setup-msys2@v2
with: { msystem: mingw64, install: gettext }
- name: Compile translations (windows msvc)
shell: msys2 {0}
run: lang/compile_mo.sh all
- name: Install vcpkg
uses: lukka/run-vcpkg@main
id: runvcpkg
with:
vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg'
- name: Integrate vcpkg
run: |
vcpkg integrate install
- uses: ammaraskar/msvc-problem-matcher@master
- name: Build
run: |
msbuild -m -p:Configuration=Release -p:Platform=x64 "-target:Cataclysm-vcpkg-static;JsonFormatter-vcpkg-static;Cataclysm-test-vcpkg-static" msvc-full-features\Cataclysm-vcpkg-static.sln
- name: Run tests
run: |
.\Cataclysm-test-vcpkg-static-Release-x64.exe --rng-seed time