-
Notifications
You must be signed in to change notification settings - Fork 3
84 lines (70 loc) · 2.74 KB
/
python-test-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
name: Python Test (vcpkg build)
on:
workflow_dispatch:
push:
pull_request:
jobs:
python:
name: ${{ github.workflow }} Python package on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install OS tools
shell: bash
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
brew install autoconf automake libtool
fi
- uses: lukka/get-cmake@latest
name: Install cmake and ninja (via get-cmake)
- name: Dump the content of $RUNNER_TEMP
run: find $RUNNER_TEMP
shell: bash
- name: Dump the content of $RUNNER_WORKSPACE
run: find $RUNNER_WORKSPACE
shell: bash
- name: Restore artifacts, or setup vcpkg for building artifacts
uses: lukka/run-vcpkg@v11
with:
# This specifies the location of vcpkg, where it is going to be restored from cache, or create from scratch.
vcpkgDirectory: '${{ runner.workspace }}/vcpkg'
# The Git commit id of vcpkg to be checked out. This is only needed because we are not using a submodule.
vcpkgGitCommitId: "f7423ee180c4b7f40d43402c2feb3859161ef625"
# The vcpkg.json file, which will be part of cache key computation.
vcpkgJsonGlob: '**/vcpkg.json'
id: runvcpkg
- name: Prints output of run-vcpkg's action.
run: echo "root='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}', triplet='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_DEFAULT_TRIPLET_OUT }}' "
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install cmake setuptools scikit-build wheel 'versioneer[toml]'
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build and install with pip
env:
VCPKG_ROOT: ${{ runner.workspace }}/vcpkg
run: python -m pip install --user ${{ github.workspace }}
- name: Debug pyemblite install
shell: bash
run: |
cd ~
echo $(pwd)
python -c 'import os; import pyemblite; print(os.listdir(os.path.dirname(pyemblite.__file__)))'
python -c 'import pyemblite; print(f"pyemblite.__file__={pyemblite.__file__}"); print(dir(pyemblite))'
- name: Test
shell: bash
run: |
cd ~
python -m pyemblite.test -fv