forked from PennyLaneAI/pennylane-lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (52 loc) · 1.96 KB
/
set_wheel_build_matrix.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
name: Set wheel build matrix
env:
PYTHON3_MIN_VERSION: "8"
PYTHON3_MAX_VERSION: "11"
on:
workflow_call:
inputs:
event_name:
required: true
type: string
outputs:
python_version:
description: "Python versions."
value: ${{ jobs.set-builder-matrix.outputs.python_version }}
exec_model:
description: "The execution model for Kokkos."
value: ${{ jobs.set-builder-matrix.outputs.exec_model }}
kokkos_version:
description: "Kokkos version"
value: ${{ jobs.set-builder-matrix.outputs.kokkos_version }}
jobs:
set-builder-matrix:
runs-on: ubuntu-22.04
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout PennyLane-Lightning
uses: actions/checkout@v3
- name: Python version
id: pyver
run: |
if [[ ${{ inputs.event_name }} == 'pull_request' ]]; then
echo "python_version=$(python3 scripts/gen_pyver_matrix.py \
--min-version=3.${{ env.PYTHON3_MIN_VERSION }} \
--max-version=3.${{ env.PYTHON3_MAX_VERSION }})" >> $GITHUB_OUTPUT
else
echo "python_version=$(python3 scripts/gen_pyver_matrix.py \
--min-version=3.${{ env.PYTHON3_MIN_VERSION }} \
--max-version=3.${{ env.PYTHON3_MAX_VERSION }} --range)" >> $GITHUB_OUTPUT
fi
- name: Kokkos execution strategy
id: exec_model
run: echo "exec_model=[\"SERIAL\"]" >> $GITHUB_OUTPUT # We may also adopt [OPENMP, THREADS] in later iterations
- name: Kokkos version
id: kokkos_version
run: echo "kokkos_version=[\"3.7.00\"]" >> $GITHUB_OUTPUT
outputs:
python_version: ${{ steps.pyver.outputs.python_version }}
exec_model: ${{ steps.exec_model.outputs.exec_model }}
kokkos_version: ${{ steps.kokkos_version.outputs.kokkos_version }}