-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (59 loc) · 2.09 KB
/
vcpkg-build.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
name: Vcpkg build
on: [push]
jobs:
build:
name: ${{ matrix.cfg.os }}
runs-on: ${{ matrix.cfg.os }}
strategy:
fail-fast: false
matrix:
cfg:
- { os: ubuntu-latest, triplet: x64-linux }
- { os: windows-2022, triplet: x64-windows-static-vs2022 }
- { os: macos-latest, triplet: x64-osx }
steps:
- name: install python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: true
- name: Install linux dependencies
if: ${{ matrix.cfg.os == 'ubuntu-latest' }}
run: sudo apt-get install nasm openssl ninja-build autoconf-archive
- name: Install osx dependencies
if: ${{ matrix.cfg.os == 'macos-latest' }}
run: brew install nasm ninja automake autoconf autoconf-archive
- name: Cache vcpkg binary
id: cache-vcpkg-bin
uses: actions/cache@v3
with:
path: |
deps/vcpkg/vcpkg
deps/vcpkg/vcpkg.exe
key: ${{ runner.os }}-${{ hashFiles('deps/vcpkg/bootstrap.cmake') }}
- name: Cache vcpkg packages
id: cache-vcpkg
uses: actions/cache@v3
with:
path: |
~/.cache/vcpkg
~/AppData/Local/vcpkg/archives
key: ${{ runner.os }}-${{ matrix.cfg.triplet }}-${{ hashFiles('vcpkg.json', '.git/modules/deps/vcpkg/shallow') }}
- name: Bootstrap the ports
id: bootstrap
run: python bootstrap.py --triplet ${{ matrix.cfg.triplet }} --clean-after-build
- name: Build the code
run: python build.py --triplet ${{ matrix.cfg.triplet }} --run-tests
- name: Archive build logs
if: ${{ failure() && steps.bootstrap.conclusion == 'failure' }}
uses: actions/upload-artifact@v3
with:
name: build-logs
path: |
deps/vcpkg/buildtrees/**/config*.log
deps/vcpkg/buildtrees/**/build*.log
deps/vcpkg/buildtrees/**/install*.log
deps/vcpkg/buildtrees/**/package*.log