forked from msis/python-moos
-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (51 loc) · 1.68 KB
/
pip.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
62
63
name: Pip
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-latest]
python-version: ["3.8", "3.9", "3.10"]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Add requirements
run: python -m pip install --upgrade wheel setuptools
- name: Checkout MOOS source
uses: actions/checkout@v2
with:
repository: 'russkel/core-moos'
path: '${{ github.workspace }}/core-moos'
- name: 'Run CMake'
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{ github.workspace }}/core-moos/CMakeLists.txt'
buildDirectory: '${{ github.workspace }}/core-moos/build'
cmakeBuildType: 'Release'
buildWithCMake: true
cmakeAppendedArgs: '-DBUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON'
- name: Install MOOS
run: |
cd ${{ github.workspace }}/core-moos/build
cmake --install . --prefix ${{ github.workspace }}/.local
echo "PATH=$PATH:${{ github.workspace }}/.local/bin" >> $GITHUB_ENV
- name: Create setup.cfg
run: |
echo "[build_ext]" >> setup.cfg
echo "include_dirs=${{ github.workspace }}/.local/include" >> setup.cfg
echo "library_dirs=${{ github.workspace }}/.local/lib" >> setup.cfg
cat setup.cfg
- name: Build and install
run: pip install --verbose .
- name: Test
run: python tests/test.py