Skip to content

Fix Python workflow #517

Fix Python workflow

Fix Python workflow #517

Workflow file for this run

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