name: YYCC Windows Build on: [workflow_dispatch] jobs: windows-build: strategy: matrix: include: - vs: '2022' msvc_arch: 'x64' runs-on: windows-2022 steps: - name: Checkout Repository uses: actions/checkout@v4 - name: Fetch Google Test uses: actions/checkout@v4 with: repository: 'google/googletest' ref: 'v1.17.0' path: 'extern/googletest' - name: Build Google Test shell: cmd run: | CD extern\googletest :: Build Google Test CALL ..\..\.github\scripts\gtest\windows.bat :: Idk why I can't use $GITHUB_ENV, so I use this stupid way to do this. :: This is first entry so we override it. ECHO SET GTest_ROOT=%GTest_ROOT% > ..\envs.bat CD ..\.. - name: Fetch Google Benchmark uses: actions/checkout@v4 with: repository: 'google/benchmark' ref: 'v1.9.4' path: 'extern/benchmark' - name: Build Google Benchmark shell: cmd run: | CD extern\benchmark :: Create symlink to googletest as required by benchmark mklink /D googletest ..\googletest :: Build Google Benchmark CALL ..\..\.github\scripts\gbenchmark\windows.bat :: This is second entry so we append it. ECHO SET benchmark_ROOT=%benchmark_ROOT% >> ..\envs.bat CD ..\.. - name: Build YYCC shell: cmd run: | :: Prepare Visual Studio set VS=${{ matrix.vs }} set VCVARS="C:\Program Files (x86)\Microsoft Visual Studio\%VS%\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" if not exist %VCVARS% set VCVARS="C:\Program Files\Microsoft Visual Studio\%VS%\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" call %VCVARS% ${{ matrix.msvc_arch }} :: Extract saved environment variables CALL .\extern\envs.bat :: Build Project CALL .\.github\scripts\windows.bat - name: Run YYCC Test shell: cmd run: | .\bin\install\bin\YYCCTest.exe - name: Run YYCC Benchmark shell: cmd run: | .\bin\install\bin\YYCCBenchmark.exe - name: Upload Built Artifact uses: actions/upload-artifact@v4 with: name: YYCC-windows-build path: bin/install/* retention-days: 30