forked from msis/python-moos
-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (66 loc) · 2.27 KB
/
conda.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Conda
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest] # windows-latest,
python-version: ["3.8", "3.9", "3.10"]
runs-on: ${{ matrix.platform }}
# The setup-miniconda action needs this to activate miniconda
defaults:
run:
shell: "bash -l {0}"
steps:
- uses: actions/checkout@v2
- name: Get conda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge
- name: Prepare
run: conda install conda-build conda-verify
# - name: Build MOOS
# uses: ./.github/actions/build-moos-core
- 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
run: conda build conda.recipe
- name: Install
run: conda install -c ${CONDA_PREFIX}/conda-bld/ pymoos
- name: Test
run: python tests/test.py
- name: Upload conda package
uses: actions/upload-artifact@v2
with:
path: ${{ env.CONDA_PREFIX }}/conda-bld/*/*.bz2
# TODO - upload to release