diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6b06ae9..80fd516 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,6 +59,23 @@ jobs: echo "CC=clang" >> $GITHUB_ENV echo "CXX=clang++" >> $GITHUB_ENV + - name: Add msbuild to PATH (Windows) + if: startsWith(runner.os, 'Windows') + uses: microsoft/setup-msbuild@v2 + + - name: Install (Windows) + if: startsWith(runner.os, 'Windows') + shell: cmd + run: | + :: See https://github.com/microsoft/vswhere/wiki/Find-VC + for /f "usebackq delims=*" %%i in (`vswhere -latest -property installationPath`) do ( + call "%%i"\Common7\Tools\vsdevcmd.bat -arch=x86 -host_arch=x64 + ) + :: Loop over all environment variables and make them global. + for /f "delims== tokens=1,2" %%a in ('set') do ( + echo>>"%GITHUB_ENV%" %%a=%%b + ) + - name: Checking out MM:Source uses: actions/checkout@v4 with: @@ -74,7 +91,7 @@ jobs: - name: Setting up ambuild run: | python -m pip install wheel - pip install git+https://github.com/accelerator74/ambuild@nog3 + pip install git+https://github.com/accelerator74/ambuild - name: Checking out hl2sdk-l4d uses: actions/checkout@v4 @@ -96,7 +113,6 @@ jobs: path: src - name: Compiling ${{ github.event.repository.name }}-l4d files - shell: bash working-directory: src run: | mkdir build_l4d @@ -105,7 +121,6 @@ jobs: ambuild - name: Compiling ${{ github.event.repository.name }}-l4d2 files - shell: bash working-directory: src run: | mkdir build_l4d2