-
Notifications
You must be signed in to change notification settings - Fork 46
54 lines (41 loc) · 1.52 KB
/
python-wrapper.yml
File metadata and controls
54 lines (41 loc) · 1.52 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
name: Python wrapper testing
on:
push:
branches: [ $default-branch, master ]
pull_request:
branches:
- "**"
permissions: write-all
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
id: setup-python
- name: Install Python dependencies
run: pip install --upgrade build pytest numpy scipy
- name: Create install folder
run: |
mkdir -p ${{github.workspace}}/install
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DEXTERNAL_EIGEN:BOOL=OFF -DPYTHON_WRAPPER:BOOL=ON -DFORTRAN_WRAPPER:BOOL=OFF -DRUST_WRAPPER:BOOL=OFF -DBUILD_TESTING=ON
- name: Build
id: build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Install
run: cmake --install ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Set env variables for the tests
run: |
echo "LD_LIBRARY_PATH=${{github.workspace}}/build/source/" >> $GITHUB_ENV
- name: Test
working-directory: ${{github.workspace}}/build
# We are just testing in Linux
run: ctest -C ${{env.BUILD_TYPE}} -R python-tests --output-on-failure