-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·145 lines (125 loc) · 4.83 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: Windows_CI
on:
push:
branches: [ master ]
paths-ignore:
- 'docs/**'
- 'resources/**'
- 'scripts/**'
- '**.md'
pull_request:
branches: [ master ]
paths-ignore:
- 'docs/**'
- 'resources/**'
- 'scripts/**'
- '**.md'
workflow_dispatch:
inputs:
ref_sha:
description: 'SHA of ref'
required: false
update_cache:
description: 'update cache'
required: false
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
CUDA_VERSION: 11.5.1
cuda_version_major_minor: 11.5
jobs:
build_cputest_win:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: windows-2019
steps:
- name: install conan
run: |
pip install conan
conan config set general.retry=4
conan config set general.retry_wait=9
conan config set storage.path=c:/conan_p
conan config set general.user_home_short=c:/conan_s
conan config set storage.download_cache=c:/conan_c
- name: checkout head
if: ${{ ! github.event.inputs.ref_sha}}
uses: actions/checkout@v2
- name: checkout with sha
if: ${{ github.event.inputs.ref_sha}}
uses: actions/checkout@v2
with:
ref: '${{github.event.inputs.ref_sha}}'
- name: conan install
run: |
conan install . --profile conan_release_profile.txt --build=missing -if build
- name: Load Cache VCPKG
id: cache_hits_vcpkg
uses: actions/cache@v2
continue-on-error: true
if: ${{! github.event.inputs.update_cache}}
env:
cache-name: cache-vcpkg
with:
path: |
C:/vcpkg
!C:/vcpkg/buildtrees
!C:/vcpkg/.git
key: ${{ runner.os }}−${{ env.cache-name }}-${{github.sha}}-${{ github.event.inputs.ref_sha}}
restore-keys: |
${{ runner.os }}−${{ env.cache-name }}-${{github.sha}}-
${{ runner.os }}−${{ env.cache-name }}-
- name: vcpkg
if: ${{(! steps.cache_hits_vcpkg.outputs.cache-hit) || github.event.inputs.update_cache}}
run: vcpkg install --triplet x64-windows "@.vcpkg_deps.txt"
- uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: '${{env.CUDA_VERSION}}'
- uses: msys2/setup-msys2@v2
with:
release: false
msystem: MSYS
install: gengetopt
- name: configure_cmake
run: |
C:\msys64\usr\bin\gengetopt -i 3rdparty/gengetopt/cmdline.ggo --file-name=src/3rdparty/gengetopt/cmdline
C:\msys64\usr\bin\gengetopt -i 3rdparty/gengetopt/call_gSMFRETda.ggo --file-name=src/3rdparty/gengetopt/call_gSMFRETda
$env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.."
Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
refreshenv
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DBUILD_TESTS=ON -G "Visual Studio 16" -T host=x64,version=14.25 -Dproto=OFF
- name: build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j -- /p:CharacterSet=Unicode
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# timeout-minutes: 50
# if: ${{ failure() }}
# with:
# limit-access-to-actor: true
- name: cpu_test
id: cpu-test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}} -R paraMatCheck_tests -O output.txt
- name: Save Cache VCPKG
id: cache_save_vcpkg
uses: actions/cache@v2
continue-on-error: true
if: ${{(! steps.cache_hits_vcpkg.outputs.cache-hit) || github.event.inputs.update_cache}}
env:
cache-name: cache-vcpkg
with:
path: |
C:/vcpkg
!C:/vcpkg/buildtrees
!C:/vcpkg/.git
key: ${{ runner.os }}−${{ env.cache-name }}-${{github.sha}}-${{ github.event.inputs.ref_sha}}
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: windowsBuild
path: ${{github.workspace}}/build/bin