-
Notifications
You must be signed in to change notification settings - Fork 538
95 lines (80 loc) · 2.98 KB
/
vcpkg.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
name: Test the VCPKG install
on: [push, pull_request, workflow_dispatch]
jobs:
build-test-install:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macOS-latest
- ubuntu-20.04
- windows-2022
include:
- os: windows-2022
platform: windows
vcpkg-triplet: x64-windows-static-release-md
cmake-preset: windows-x64
python-executable: python
- os: ubuntu-20.04
platform: linux
vcpkg-triplet: x64-linux-release
cmake-preset: linux-x64
python-executable: python3
- os: macOS-latest
platform: macos
vcpkg-triplet: x64-osx-release
cmake-preset: macos-x64
python-executable: python3
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
name: Get vcpkg
with:
repository: 'microsoft/vcpkg'
ref: '2024.05.24'
path: '${{ github.workspace }}/_vcpkg'
fetch-depth: 0
- uses: lukka/get-cmake@latest
name: Get CMake
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: ilammy/msvc-dev-cmd@v1
name: Setup Windows dev environment
with:
arch: 'x64'
if: ${{ matrix.platform == 'windows' }}
- name: Configure (Windows)
if: ${{ matrix.platform == 'windows' }}
run: |
cmake --preset=${{ matrix.cmake-preset }} -DBUILD_SHARED_LIBS:BOOL=ON -DVCPKG_OVERLAY_TRIPLETS:PATH=${{ github.workspace }}\vcpkg\triplets -DVCPKG_TARGET_TRIPLET:STRING=${{ matrix.vcpkg-triplet }}
env:
VCPKG_ROOT: ${{ github.workspace }}/_vcpkg
VCPKG_FEATURE_FLAGS: manifests,versions,binarycaching,registries
- name: Configure (UNIX)
if: ${{ matrix.platform != 'windows' }}
run: |
python -m pip install importlib-resources
cmake --preset=${{ matrix.cmake-preset }} -DBUILD_SHARED_LIBS:BOOL=ON -DVCPKG_OVERLAY_TRIPLETS:PATH=${{ github.workspace }}/vcpkg/triplets -DVCPKG_TARGET_TRIPLET:STRING=${{ matrix.vcpkg-triplet }}
env:
VCPKG_ROOT: ${{ github.workspace }}/_vcpkg
VCPKG_FEATURE_FLAGS: manifests,versions,binarycaching,registries
- name: Build
run: |
cmake --build --preset build-${{ matrix.cmake-preset }} --config Release
- name: Test
run: |
${{ matrix.python-executable }} --version
${{ matrix.python-executable }} -m pip install lief==0.15.1 unicorn==2.0.1.post1 z3-solver
ctest --preset test-${{ matrix.cmake-preset }} -C Release --output-on-failure
- name: Install
run: |
cmake --build --preset build-${{ matrix.cmake-preset }} --config Release --target install
- name: Upload
uses: actions/upload-artifact@v3
with:
name: triton-x64-${{ matrix.platform }}
path: ${{ github.workspace }}/out/install/${{ matrix.cmake-preset }}
if-no-files-found: warn