name: Windows # Controls when the action will run. Triggers the workflow on push or pull request # events but only for the master branch on: push: branches: - master pull_request: branches: - master jobs: build: strategy: # Prevent one build from failing everything (although maybe those should be included as experimental builds instead) fail-fast: false matrix: os: [windows-2022] config: [Release] compiler: [msvc, clang] experimental: [false] name: ${{ matrix.config }}-${{ matrix.compiler }} runs-on: ${{ matrix.os }} continue-on-error: ${{ matrix.experimental }} # Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them. timeout-minutes: 45 env: # overrides: https://github.com/mbitsnbites/buildcache/blob/master/doc/configuration.md BUILDCACHE_MAX_CACHE_SIZE: 1000000000 # 1gb BUILDCACHE_COMPRESS_FORMAT: ZSTD BUILDCACHE_COMPRESS_LEVEL: 19 BUILDCACHE_DIRECT_MODE: true BUILDCACHE_LOG_FILE: ${{ github.workspace }}/buildcache.log steps: # NOTE - useful for debugging # - name: Dump GitHub context # env: # GITHUB_CONTEXT: ${{ toJson(github) }} # run: | # echo "$GITHUB_CONTEXT" - name: Checkout Repository uses: actions/checkout@v2 - name: Checkout Submodules run: git submodule update --init --recursive -j 2 - name: Install Dependencies run: Choco-Install -PackageName nasm - name: Setup Buildcache uses: mikehardy/buildcache-action@v1.2.2 with: cache_key: ${{ matrix.os }}-${{ matrix.config }}-${{ matrix.compiler }} - name: CMake Generation shell: cmd # ideally id like everything to be powershell but running this bat file is finicky run: | if "${{ matrix.compiler }}" == "clang" ( call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" cmake -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER="${{ github.workspace }}"/buildcache/bin/buildcache.exe -DCMAKE_CXX_COMPILER_LAUNCHER="${{ github.workspace }}"/buildcache/bin/buildcache.exe "-DCMAKE_C_COMPILER=C:/Program Files/LLVM/bin/clang-cl.exe" "-DCMAKE_CXX_COMPILER=C:/Program Files/LLVM/bin/clang-cl.exe" . ) else ( call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" cmake -B build -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER="${{ github.workspace }}"/buildcache/bin/buildcache.exe -DCMAKE_CXX_COMPILER_LAUNCHER="${{ github.workspace }}"/buildcache/bin/buildcache.exe . ) - name: Build Project working-directory: ./build shell: cmd run: | call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat" if "${{ matrix.compiler }}" == "msvc" ( set CL=/MP ) nmake - name: Run Tests timeout-minutes: 5 env: NEXT_DIR: ${{ github.workspace }} run: ./build/bin/goalc-test.exe --gtest_color=yes --gtest_filter="-*MANUAL_TEST*"