-
Notifications
You must be signed in to change notification settings - Fork 222
86 lines (73 loc) · 3.2 KB
/
Copy pathtest-windows.yml
File metadata and controls
86 lines (73 loc) · 3.2 KB
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
name: Test Windows
on: [push, pull_request]
jobs:
build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7]
env:
VCPKG_ROOT: '${{ github.workspace }}/vcpkg'
VCPKG_ASSET_SOURCES: "${{ github.workspace }}/vcpkgAssets"
X_VCPKG_ASSET_SOURCES: clear;x-azurl,file:///${{ github.workspace }}/vcpkgAssets,,readwrite
VCPKG_BINARY_SOURCES: clear;files,${{ github.workspace }}/vcpkgBin,readwrite
VCPKG_BUILD_TREES: "${{ github.workspace }}/vcpkgBuild"
VCPKG_INSTALLED_DIR: "${{ github.workspace }}/vcpkgInstalled"
VCPKG_INSTALL_OPTIONS: "--x-buildtrees-root=${{ github.workspace }}/vcpkgBuild"
VCPKG_DEFAULT_TRIPLET: 'x64-windows'
VCPKG_DEFAULT_HOST_TRIPLET: 'x64-windows'
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Restore vcpkg cache
id: cache-vcpkg-restore
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
"${{ github.workspace }}/vcpkgAssets"
"${{ github.workspace }}/vcpkgBCache"
"${{ github.workspace }}/vcpkgBin"
"${{ github.workspace }}/vcpkgBuild"
key: vcpkgCache-${{ github.repository_owner }}-${{ matrix.os }}-${{ matrix.triplet }}-${{ hashFiles('vcpkg.json') }}
- name: Create directories on cache miss
run: |
mkdir -p "${{ github.workspace }}/vcpkgAssets"
mkdir -p "${{ github.workspace }}/vcpkgBCache"
mkdir -p "${{ github.workspace }}/vcpkgBin"
mkdir -p "${{ github.workspace }}/vcpkgBuild"
if: steps.cache-vcpkg-restore.outputs.cache-hit != 'true'
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- uses: microsoft/setup-msbuild@30375c66a4eea26614e0d39710365f22f8b0af57 # v3.0.0
- name: setup boost prerequisites
uses: lukka/run-vcpkg@b1a0dd252f06b9e25b3c022a9a03bd7a427fb6a2 # v11.6
with:
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
binaryCachePath: "${{ github.workspace }}/vcpkgBCache"
runVcpkgInstall: true
vcpkgJsonGlob: .github/workflows/vcpkg.json
- name: setup faber
run: |
python -m pip install --upgrade pip
python -m pip install setuptools faber numpy
faber --info=tools cxx
- name: build
shell: cmd
run: |
faber --builddir=build cxx.name=msvc --log=commands --log=output --with-boost-include="${{ github.workspace }}/vcpkgInstalled/x64-windows/include" -j4
- name: test
shell: cmd
run: |
faber --builddir=build cxx.name=msvc --with-boost-include="${{ github.workspace }}/vcpkgInstalled/x64-windows/include" -j4 test.report
- name: Save vcpkg cache
id: cache-vcpkg-save
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
"${{ github.workspace }}/vcpkgAssets"
"${{ github.workspace }}/vcpkgBCache"
"${{ github.workspace }}/vcpkgBin"
"${{ github.workspace }}/vcpkgBuild"
key: ${{ steps.cache-vcpkg-restore.outputs.cache-primary-key }}
if: steps.cache-vcpkg-restore.outputs.cache-hit != 'true'