set path for clang #3532
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Windows no PCH | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Windows ${{matrix.config.name}} NoPCH Build | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- os: "windows-latest" | |
cxx-compiler: cl | |
c-compiler: cl | |
compiler-version: default | |
build-type: Release | |
nopch: 1 | |
ninja: 1 | |
name: CL Ninja | |
- os: "windows-latest" | |
cxx-compiler: clang-cl | |
c-compiler: clang-cl | |
compiler-version: default | |
build-type: Release | |
nopch: 1 | |
ninja: 1 | |
name: Clang Ninja | |
- os: "windows-latest" | |
cxx-compiler: cl | |
c-compiler: cl | |
compiler-version: default | |
build-type: Debug | |
nopch: 1 | |
ninja: 0 | |
name: CL msbuild | |
- os: "windows-latest" | |
cxx-compiler: clang-cl | |
c-compiler: clang-cl | |
compiler-version: default | |
build-type: Debug | |
nopch: 1 | |
ninja: 0 | |
name: Clang msbuild | |
runs-on: ${{ matrix.config.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
- uses: seanmiddleditch/gha-setup-vsdevenv@v4 | |
- name: Cache curl | |
uses: actions/cache@v3 | |
with: | |
path: lib/curl-8.2.1 | |
key: ${{ runner.os }}-${{ matrix.config.cxx-compiler }}-${{ matrix.config.compiler-version }}-${{ matrix.config.build-type }}-${{ matrix.config.nopch }}-${{ matrix.config.ninja }}-curl-8.2.1-1 | |
- name: Cache antlr | |
uses: actions/cache@v3 | |
with: | |
path: lib/antlr | |
key: ${{ runner.os }}-${{ matrix.config.cxx-compiler }}-${{ matrix.config.compiler-version }}-${{ matrix.config.build-type }}-${{ matrix.config.nopch }}-${{ matrix.config.ninja }}-antlr-4.13.1-2 | |
- name: Cache boost | |
uses: actions/cache@v3 | |
with: | |
path: lib/boost_1_83_0 | |
key: ${{ runner.os }}-${{ matrix.config.cxx-compiler }}-${{ matrix.config.compiler-version }}-${{ matrix.config.build-type }}-${{ matrix.config.nopch }}-${{ matrix.config.ninja }}-boost-1.83.2 | |
- name: Cache cppdap | |
uses: actions/cache@v3 | |
with: | |
path: lib/cppdap-2a4c7cf | |
key: ${{ runner.os }}-${{ matrix.config.cxx-compiler }}-${{ matrix.config.compiler-version }}-cppdap-2a4c7cf | |
- name: Install llvm | |
if: matrix.config.cxx-compiler == 'clang-cl' | |
shell: powershell | |
run: | | |
iwr -useb get.scoop.sh -outfile 'install.ps1' | |
.\install.ps1 -RunAsAdmin | |
scoop install llvm --global | |
echo "$env:PATH" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Force | |
- name: Set CXX and CC | |
shell: pwsh | |
run: | | |
$cxx_compiler = '${{ matrix.config.cxx-compiler }}' | |
$c_compiler = '${{ matrix.config.c-compiler }}' | |
$version = '${{ matrix.config.compiler-version }}' | |
if ($version -ne 'default') { | |
$cxx_compiler = "$cxx_compiler-$version" | |
$c_compiler = "$c_compiler-$version" | |
} | |
echo "CXX=$cxx_compiler" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
echo "CC=$c_compiler" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
- name: Windows Path Workaround | |
shell: cmd | |
run: | | |
rmdir /s /q C:\Strawberry | |
exit /b 0 | |
- name: Config (Ninja) | |
if: matrix.config.ninja == 1 | |
run: | | |
cd bin-build | |
cmake .. -GNinja -DNO_PCH=${{ matrix.config.nopch }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build-type }} | |
- name: Config (msbuild) | |
if: matrix.config.ninja == 0 | |
run: | | |
cd bin-build | |
cmake .. -DNO_PCH=${{ matrix.config.nopch }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build-type }} | |
- name: Build (Ninja) | |
if: matrix.config.ninja == 1 | |
run: | | |
cd bin-build | |
cmake --build . --config ${{ matrix.config.build-type }} -- -j 2 | |
- name: Build (msbuild) | |
if: matrix.config.ninja == 0 | |
run: | | |
cd bin-build | |
cmake --build . --config ${{ matrix.config.build-type }} -- /nologo /verbosity:minimal /maxcpucount | |
notify_on_failure: | |
needs: build | |
runs-on: "ubuntu-latest" | |
if: failure() | |
steps: | |
- name: Discord notification failure | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
uses: turleypol/actions-status-discord@master | |
with: | |
status: failure | |
job: Building (Windows no PCH) | |
notify_on_success: | |
needs: build | |
runs-on: "ubuntu-latest" | |
if: success() | |
steps: | |
- name: Discord notification success | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
uses: turleypol/actions-status-discord@master | |
with: | |
status: success | |
job: Building (Windows no PCH) | |
notify_on_cancel: | |
needs: build | |
runs-on: "ubuntu-latest" | |
if: cancelled() | |
steps: | |
- name: Discord notification cancelled | |
env: | |
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
uses: turleypol/actions-status-discord@master | |
with: | |
status: cancelled | |
job: Building (Windows no PCH) |