-
Notifications
You must be signed in to change notification settings - Fork 31
97 lines (79 loc) · 2.4 KB
/
pip.yml
File metadata and controls
97 lines (79 loc) · 2.4 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
name: Pip
on:
workflow_dispatch:
pull_request:
jobs:
build:
name: Build with Pip
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [windows-latest, macos-latest, ubuntu-latest, ubuntu-24.04-arm]
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Set min macOS version
if: runner.os == 'macOS'
run: |
echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV
- name: Build and install
run: |
python -m pip install pytest
pip install -vv .
- name: Test
run: python -m pytest ./test/python
build_shared:
name: Build with Pip shared lib
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ macos-latest, ubuntu-latest]
python-version: ["3.13"]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Set min macOS version
if: runner.os == 'macOS'
run: |
echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV
- name: Build and install
run: |
mkdir -p build
cd build
cmake .. -DBUILD_SHARED_LIBS=ON -DUNITS_INSTALL=ON -DUNITS_ENABLE_TESTS=OFF
make -j 4
sudo make install
cd ..
python -m pip install pytest
pip install -vv -C cmake.define.BUILD_SHARED_LIBS:BOOL=ON .
- name: Test
run: |
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
export DYLD_FALLBACK_LIBRARY_PATH="$DYLD_FALLBACK_LIBRARY_PATH:/usr/local/lib"
python -m pytest ./test/python
build_shared_windows:
name: Build with Pip shared lib
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [windows-latest]
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Build and install
run: |
python -m pip install pytest
pip install -vv -C cmake.define.BUILD_SHARED_LIBS:BOOL=ON -C cmake.define.UNITS_PYTHON_INSTALL_SHARED_LIBRARY:BOOL=ON .
- name: Test
run: python -m pytest ./test/python