-
Notifications
You must be signed in to change notification settings - Fork 11
72 lines (62 loc) · 2.41 KB
/
windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: windows
on:
push:
pull_request:
branches: [ master ]
jobs:
build-and-test:
name: Build and test ${{matrix.build-type}} mode
runs-on: windows-2022
strategy:
matrix:
build-type: [Release] # Debug disabled: link.exe hangs :(
steps:
- name: Clone recursively
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install LIT
shell: cmd
run: python -m pip install lit psutil
- name: Install FileCheck
uses: i3h/download-release-asset@v1
with:
owner: fodinabor
repo: FileCheckBuild
tag: latest
file: FileCheck-x86_64-win.exe
path: ${{github.workspace}}/bin
token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure
shell: cmd
run: |
cmake -E copy ${{github.workspace}}/bin/FileCheck-x86_64-win.exe ${{github.workspace}}/bin/FileCheck
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set CC=cl.exe
set CXX=cl.exe
python -c "import sys; import os; print(os.path.dirname(sys.executable))" > tmpPath
set /p PYTHON_PATH= < tmpPath
cmake -B ${{github.workspace}}/build -G Ninja -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -DTHORIN_BUILD_TESTING=ON -DTHORIN_BUILD_EXAMPLES=ON -DPython3_ROOT_DIR=%PYTHON_PATH%
- name: Install LLVM and Clang
uses: KyleMayes/[email protected]
with:
version: "14.0.0"
- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cmake --build ${{github.workspace}}/build -v
- name: Run lit test suite
working-directory: ${{github.workspace}}/build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set PATH=${{github.workspace}}/bin;%PATH%
cmake --build ${{github.workspace}}/build -v --target check
- name: Test
working-directory: ${{github.workspace}}/build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set PATH=${{github.workspace}}/bin;%PATH%
ctest --verbose -C ${{matrix.build-type}} --output-on-failure