-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (76 loc) · 3.14 KB
/
build_win32.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
73
74
75
76
77
78
79
name: Windows Build
on: push
env:
WAF_OPTS: -v -c yes
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
include:
- buildSystem: cmake
buildConfiguration: Debug
googletestVersion: 93748a946684defd1494d5585dbc912e451e83f8
- buildSystem: cmake
buildConfiguration: Debug
googletestVersion: 18f8200e3079b0e54fa00cb7ac55d4c39dcf6da6
- buildSystem: cmake
buildConfiguration: Release
googletestVersion: 93748a946684defd1494d5585dbc912e451e83f8
- buildSystem: cmake
buildConfiguration: Release
googletestVersion: 18f8200e3079b0e54fa00cb7ac55d4c39dcf6da6
- buildSystem: bazel
buildConfiguration: Release # configuration is ignored for bazel builds
googletestVersion: 93748a946684defd1494d5585dbc912e451e83f8
- buildSystem: bazel
buildConfiguration: Release # configuration is ignored for bazel builds
googletestVersion: 18f8200e3079b0e54fa00cb7ac55d4c39dcf6da6
steps:
- uses: actions/checkout@v2
- name: Install LLVM
run: choco install llvm --no-progress
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- uses: actions/cache@v2
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}-${{ matrix.buildSystem }}-${{ matrix.buildConfiguration }}-${{ matrix.googletestVersion }}
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- uses: seanmiddleditch/gha-setup-ninja@v3
if: matrix.buildSystem == 'bazel'
with:
version: 1.10.2
- uses: abhinavsingh/setup-bazel@v3
if: matrix.buildSystem == 'bazel'
with:
version: 3.7.1
- name: Add msbuild to PATH
if: matrix.buildSystem != 'bazel'
uses: microsoft/[email protected]
- name: "Restore googletest"
uses: actions/cache@v2
with:
path: ~/googletest
key: ${{ runner.os }}-googletest-${{ matrix.buildSystem }}-${{ matrix.buildConfiguration }}-${{ matrix.googletestVersion }}
- name: Project configuration
run: |
$env:Path="$env:Path;C:\Program Files\LLVM\bin;"
.\waf.bat configure --googletest-bootstrap --googletest-version ${{ matrix.googletestVersion }} --googletest-build-tool ${{ matrix.buildSystem }} --googletest-build-config ${{ matrix.buildConfiguration }} ${{ env.WAF_OPTS }}
- name: Project build
run: .\waf.bat build_bin ${{ env.WAF_OPTS }}
- name: Project test
run: .\waf.bat build_test ${{ env.WAF_OPTS }}
- name: Run clang-format
run: .\waf.bat clang-format --cf-arg --Werror --cf-arg --dry-run ${{ env.WAF_OPTS }}
- name: Project waf *
run: |
.\waf.bat clean_bin ${{ env.WAF_OPTS }}
.\waf.bat clean_test ${{ env.WAF_OPTS }}
.\waf.bat distclean ${{ env.WAF_OPTS }}
.\waf.bat dist ${{ env.WAF_OPTS }}