-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (101 loc) · 3.5 KB
/
build-wheel-from-sdist.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Install and test from sdist
on:
workflow_dispatch:
inputs:
url:
description: "URL to the sdist"
required: true
python_version:
description: "Python version to use"
default: "3.12"
required: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-14
- windows-2019
include:
- os: macos-14
arch: arm64
- os: windows-2019
arch: x64
environment: urdrome
steps:
# - name: Checkout repository
# uses: actions/checkout@v4
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: "3.29.6"
- name: Windows init steps (vc143)
id: vcpkg-step
shell: pwsh
run: |
vcpkg.exe integrate install
echo "VCPKG_INSTALLATION_ROOT=${env:VCPKG_INSTALLATION_ROOT}"
echo "VCPKG_INSTALLATION_ROOT=${env:VCPKG_INSTALLATION_ROOT}" >> $env:GITHUB_OUTPUT
echo "${env:VCPKG_INSTALLATION_ROOT}" >> $env:GITHUB_PATH
echo "VCPKG_ROOT=${env:VCPKG_INSTALLATION_ROOT}" >> $env:GITHUB_ENV
dir env:
env:
PYTHON_VERSION: ${{ inputs.python_version }}
VCPKG_DEFAULT_TRIPLET: x64-windows
VCPKG_PLATFORM_TOOLSET: v143
if: ${{ runner.os == 'Windows' }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}
architecture: ${{ matrix.arch }}
- name: Parse URL
id: parse_url
if: ${{ ! startsWith(matrix.os, 'windows') }}
run: |
URL="${{ inputs.url }}"
if [[ "$URL" =~ ^https://github\.com/.+/actions/runs/[0-9]+$ ]]; then
echo "is_gh=true" >> $GITHUB_OUTPUT
REPO=$(echo "$URL" | sed -E 's|https://github\.com/([^/]+/[^/]+)/actions/runs/[0-9]+|\1|')
RUN_ID=$(echo "$URL" | sed -E 's|.*/runs/([0-9]+)|\1|')
echo "repo=$REPO" >> $GITHUB_OUTPUT
echo "run_id=$RUN_ID" >> $GITHUB_OUTPUT
fi
- name: Download sdist with gh
if: steps.parse_url.outputs.is_gh == 'true'
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
repo=${{steps.parse_url.outputs.repo}}
run_id=${{steps.parse_url.outputs.run_id}}
gh run download --repo $repo -n perspective-python-sdist $run_id
- name: Download sdist with curl
if: steps.parse_url.outputs.is_gh != 'true'
run: |
curl --fail -LO "${{ inputs.url }}"
- name: Install sdist
if: ${{ ! startsWith(matrix.os, 'windows') }}
run: |
python -m pip install --no-clean -vv ./perspective_python-*.tar.gz
- name: Install sdist
if: ${{ startsWith(matrix.os, 'windows') }}
shell: cmd
env:
CARGO_TARGET_DIR: D:\psp-rust
run: |
for %%x in (perspective_python-*.tar.gz) do python -m pip install --no-clean -vv %%x
- name: Test setup
run: |
python -m pip install pytest
python -m pip install faker ipywidgets numpy pandas psutil pyarrow tornado
python -m pip install jupyterlab
- name: Test jupyter labextension
run: |
jupyter labextension list 2>&1 | grep @finos/perspective-jupyterlab
- name: Run import test
run: |
python -c "import perspective"
- name: Run pytest
run: |
pytest --pyargs 'perspective.tests'