diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f52a42a2f..e93cad2aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -130,16 +130,22 @@ jobs: # ninja version to download. Default: 1.10.0 version: 1.10.0 dest: ${{ github.workspace }}/ninja_bin + + - name: Add prebuilt llvm install dir to PATH + run: | + "${{ github.workspace }}/llvm-install-${{ env.LLVM_VER }}/bin\n" + (Get-Content $env:GITHUB_PATH -Raw) | Set-Content $env:GITHUB_PATH + Add-Content $env:GITHUB_ENV "CXX_COMPILER_BIN=${{ github.workspace }}/llvm-install-${{ env.LLVM_VER }}/bin" + - name: Configure CMake env: CMAKE_PREFIX_PATH: ${{ github.workspace }}/llvm-install-${{ env.LLVM_VER }} - run: cmake -B build -G Ninja -DFINAL_STAGE=1 -DCMAKE_CXX_COMPILER=clang.exe -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=jakt-install + run: cmake -B build -G Ninja -DFINAL_STAGE=1 -DCMAKE_CXX_COMPILER=clang -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=jakt-install - name: Build Jakt Stage 1 Selfhost run: cmake --build build - name: Test Jakt Stage 1 - run: .\build\bin\jakttest.exe + run: .\build\bin\jakttest.exe --cpp-compiler "$env:CXX_COMPILER_BIN/clang++.exe" # FIXME: Share this better with unix job? - name: Install jakt @@ -151,7 +157,7 @@ jobs: run: | ./jakt-install/bin/jakt.exe --create TestProjectJakt cd TestProjectJakt - ../jakt-install/bin/jakt.exe -O src/main.jakt -o TestProjectJakt + ../jakt-install/bin/jakt.exe -O src/main.jakt -o TestProjectJakt -C "$CXX_COMPILER_BIN/clang-cl" if ! ./build/TestProjectJakt.exe | grep -q "Hello, World!"; then echo "::error :^( failed, failing job" @@ -161,6 +167,7 @@ jobs: working-directory: ${{ github.workspace }} shell: bash run: | + export PATH="$CXX_COMPILER_BIN:$PATH" ./jakt-install/bin/jakt.exe --create TestProjectCMake cd TestProjectCMake cmake -GNinja -B build \