-
Notifications
You must be signed in to change notification settings - Fork 0
129 lines (102 loc) · 3.8 KB
/
test.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
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Test cppyy packages
on:
workflow_dispatch:
env:
description: 'Additional variables to be appended to environment by writing them to $GITHUB_ENV.'
required: true
default: ''
type: string
ver-cppyy:
description: 'Version of cppyy to use.'
required: true
default: 'nightly'
type: string
ver-cppyy-cling:
description: 'Version of cppyy-cling to use.'
required: true
default: 'nightly'
type: string
ver-cppyy-backend:
description: 'Version of cppyy-backend to use.'
required: true
default: 'nightly'
type: string
ver-CPyCppyy:
description: 'Version of CPyCppyy to use.'
required: true
default: 'nightly'
type: string
ver-python
description: 'Version of Python to use.'
required: true
default: '3.x'
type: string
defaults:
run:
shell: bash
jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-14, macos-13, windows-latest ]
steps:
- name: Set environment variables
# see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
run: echo "${{ inputs.env }}" >> "$GITHUB_ENV"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.ver-python }}
- name: Get python info
run: python3 -VV
- name: Install cppyy-cling nightly
run: |
# curl -sSf $(curl -sSf https://api.github.com/repos/wlav/cppyy-backend/actions/artifacts?per_page=1 | jq -r ".artifacts[0].archive_download_url") -o cppyy-backend.zip
curl -sSfL https://nightly.link/wlav/cppyy-backend/workflows/cling-wheels/master/artifact.zip -o cppyy-cling.zip
unzip cppyy-cling.zip -d cppyy-cling
pip3 install cppyy-cling --no-index --no-deps --find-links ./cppyy-cling
if: ${{ inputs.ver-cppyy-cling == 'nightly' }}
- name: Install cppyy-cling from pip
run: |
pip3 install cppyy-cling${{ inputs.ver-cppyy-cling }} --no-deps
if: ${{ inputs.ver-cppyy-cling != 'nightly' }}
- name: Install cppyy-backend nightly
run: |
pip3 install git+https://github.com/wlav/cppyy-backend.git#subdirectory=clingwrapper --no-deps
if: ${{ inputs.ver-cppyy-backend == 'nightly' }}
- name: Install cppyy-backend from pip
run: |
pip3 install cppyy-backend${{ inputs.ver-cppyy-backend }} --no-deps
if: ${{ inputs.ver-cppyy-backend != 'nightly' }}
- name: Install CPyCppyy nightly
run: |
pip3 install git+https://github.com/wlav/CPyCppyy.git --no-deps
if: ${{ inputs.ver-CPyCppyy == 'nightly' }}
- name: Install CPyCppyy from pip
run: |
pip3 install CPyCppyy${{ inputs.ver-CPyCppyy }} --no-deps
if: ${{ inputs.ver-CPyCppyy != 'nightly' }}
- name: Install cppyy nightly
run: |
pip3 install git+https://github.com/wlav/cppyy.git --no-deps
if: ${{ inputs.ver-cppyy == 'nightly' }}
- name: Install cppyy from pip
run: |
pip3 install cppyy${{ inputs.ver-cppyy }} --no-deps
if: ${{ inputs.ver-cppyy != 'nightly' }}
- name: Get installed packages info
run: pip3 freeze
- name: Check C++ version used by cppyy
run: python3 -c "import cppyy; cppyy.cppexec('std::cout << __GLIBCXX__ << std::endl;')"
- name: Get cpyyy test suite
uses: actions/checkout@v4
with:
repository: 'wlav/cppyy'
sparse-checkout: 'test/'
- name: Install pytest
run: pip3 install pytest
- name: Run pytest suite
run: pytest
working-directory: ./test