Skip to content

Commit 31a52a3

Browse files
committed
add new github action on python bindings
1 parent 0b47594 commit 31a52a3

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

.github/workflows/check-python.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Set up Spack
17+
uses: spack/setup-spack@v2
18+
with:
19+
ref: develop # Spack version (examples: develop, releases/v0.21)
20+
buildcache: true # Configure oci://ghcr.io/spack/github-actions-buildcache
21+
color: true # Force color output (SPACK_COLOR=always)
22+
path: ${{github.workspace}}/spack # Where to clone Spack
23+
24+
- name: Install TFEL
25+
shell: spack-sh {0}
26+
run: |
27+
spack install python py-numpy py-pybind11
28+
spack install tfel@master~python~python_bindings~aster~fortran~abaqus~calculix~ansys~europlexus~cyrano~lsdyna~comsol~diana-fea
29+
- name: cmake
30+
shell: spack-sh {0}
31+
run: |
32+
spack load python py-numpy py-pybind11
33+
# loading TFEL
34+
spack load tfel
35+
cmake -DCMAKE_BUILD_TYPE=Release . \
36+
-Denable-c-bindings=ON \
37+
-Denable-fortran-bindings=ON \
38+
-Denable-python-bindings=ON \
39+
-Denable-portable-build=ON \
40+
-Denable-julia-bindings=OFF \
41+
-DTFEL_DIR=`spack location -i tfel`/share/tfel/cmake \
42+
-Denable-parallel-stl-algorithms=OFF
43+
- name: make
44+
shell: spack-sh {0}
45+
run: |
46+
spack load python py-numpy py-pybind11
47+
spack load tfel
48+
make
49+
- name: make check
50+
shell: spack-sh {0}
51+
run: |
52+
spack load python py-numpy py-pybind11 tfel
53+
spack load tfel
54+
make check

0 commit comments

Comments
 (0)