-
Notifications
You must be signed in to change notification settings - Fork 3
123 lines (105 loc) · 3.26 KB
/
specific-test.yml
File metadata and controls
123 lines (105 loc) · 3.26 KB
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
name: Specific Test Run
on:
workflow_dispatch:
inputs:
branchName:
description: 'Branch Name to Run Tests On'
required: true
type: string
testName:
description: 'Test(s) name or name substring to run'
required: true
type: string
operatingSystem:
description: 'Operating System'
required: true
type: choice
options:
- "windows-latest"
- "macos-latest"
- "ubuntu-latest"
pyVersion:
description: 'Python version'
required: true
type: choice
options:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
jobs:
build_wheels:
name: Build specific wheels on demand
runs-on: ${{ github.event.inputs.operatingSystem }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ github.event.inputs.pyVersion }}
cache: 'pip'
cache-dependency-path: pyproject.toml
- name: Setup environment variable for cibuildwheel
run: echo "CIBW_BUILD=cp${{ github.event.inputs.pyVersion }}-*" >> $GITHUB_ENV
- name: Debugging output
run: echo "CIBW_BUILD=${{ env.CIBW_BUILD }}"
- name: Build wheels using cibuildwheel
uses: pypa/cibuildwheel@v2.16.5
with:
output-dir: wheelhouse
env:
CIBW_BUILD: ${{ env.CIBW_BUILD }}
- uses: conda-incubator/setup-miniconda@v2
with:
auto-activate-base: true
activate-environment: ""
- name: Remove Source
shell: bash
run: |
cd wheelhouse
pip install wheel
for name in *.whl; do
python3 ../remove_source.py . $name
done
- name: Conda channel build
run: |
conda install conda-build
conda build conda_recipe/ --output-folder=nimble-data --no-test --no-anaconda-upload --no-activate
- uses: actions/upload-artifact@v3
with:
name: built_wheel
path: ./wheelhouse/
retention-days: 1
- uses: actions/upload-artifact@v3
with:
name: built_channel
path: ./nimble-data/
retention-days: 1
checkout-and-test:
needs: [build_wheels]
runs-on: ${{ github.event.inputs.operatingSystem }}
steps:
- name: Checkout the specified branch
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.branchName }}
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ github.event.inputs.pyVersion }}
cache: pip
cache-dependency-path: pyproject.toml
- uses: actions/download-artifact@v3
with:
name: built_wheel
- name: Move Wheels to docs source
run:
mv *.whl ./documentation/source/wheels
- name: Install nimble and Dependencies
run:
pip install pylint==2.14.0
pip install pytest
pip install keras tensorflow
pip install nimble[quickstart] --find-links=./documentation/source/wheels
- name: Run Specific Test
run: pytest -v -k ${{ github.event.inputs.testName }}