-
Notifications
You must be signed in to change notification settings - Fork 11
56 lines (45 loc) · 1.43 KB
/
python.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
name: 🐍 Build Bindings
on:
push:
pull_request:
workflow_dispatch:
jobs:
bindings:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
container: ${{ matrix.os == 'ubuntu-latest' && 'fedora:38' || null }}
name: "🐍 Build Bindings on ${{ matrix.os }}"
steps:
- name: 📥 Checkout
uses: actions/checkout@v3
- name: 🖥️ Setup Environment
uses: ./.github/actions/setup
with:
install-vtk: false
container: ${{ matrix.os }}
- name: 🦥 Cache Dependencies
uses: actions/cache@v3
with:
key: python-${{ matrix.os }}
path: build
- name: 🐍 Build and check Python Module (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: |
python3 -m venv venv
./venv/Scripts/pip install .
./venv/Scripts/python -c "import viennaps2d; print(viennaps2d.__doc__)"
- name: 🐍 Build and check Python Module (Other)
if: ${{ matrix.os != 'windows-latest' }}
run: |
python3 -m venv venv
./venv/bin/pip install .
./venv/bin/python -c "import viennaps2d; print(viennaps2d.__doc__)"
- name: 📦 Upload Artifact
if: always()
uses: actions/upload-artifact@v3
with:
name: Pre-Built (${{ matrix.os }})
path: venv