macos-linux-conda.yml 1.46 KB
Newer Older
1
name: Build Pinocchio for Mac OS X/Linux via Conda
Justin Carpentier's avatar
Justin Carpentier committed
2
3
4
5

on: [push,pull_request]

jobs:
6
7
8
9
10
11
12
13
  pinocchio-conda:
    name: Pinocchio on ${{ matrix.os }} with Conda
    runs-on: ${{ matrix.os }}

    strategy:
      fail-fast: false
      matrix:
        os: ["ubuntu-latest", "macos-latest"]
Justin Carpentier's avatar
Justin Carpentier committed
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

    steps:
    - uses: actions/checkout@v2

    - name: Checkout submodules
      run: |
        git submodule update --init

    - uses: conda-incubator/setup-miniconda@v2
      with:
        activate-environment: pinocchio
        auto-update-conda: true
        environment-file: .github/workflows/conda/conda-env.yml
        python-version: 3.8

    - name: Install cmake and update conda
Justin Carpentier's avatar
Justin Carpentier committed
30
      shell: bash -l {0}
Justin Carpentier's avatar
Justin Carpentier committed
31
      run: |
Justin Carpentier's avatar
Justin Carpentier committed
32
        conda activate pinocchio
Justin Carpentier's avatar
Justin Carpentier committed
33
        conda install cmake -c main
34
        conda install llvm-openmp libcxx=11 -c conda-forge
Justin Carpentier's avatar
Justin Carpentier committed
35
36
    
    - name: Build Pinocchio
Justin Carpentier's avatar
Justin Carpentier committed
37
      shell: bash -l {0}
Justin Carpentier's avatar
Justin Carpentier committed
38
      run: |
Justin Carpentier's avatar
Justin Carpentier committed
39
        conda activate pinocchio
Justin Carpentier's avatar
Justin Carpentier committed
40
41
42
43
44
        echo $CONDA_PREFIX
        
        mkdir build
        cd build

Justin Carpentier's avatar
Justin Carpentier committed
45
        cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_COLLISION_SUPPORT=ON -DBUILD_ADVANCED_TESTING=ON -DBUILD_WITH_CASADI_SUPPORT=OFF -DPYTHON_EXECUTABLE=$(which python3) -DBUILD_WITH_OPENMP_SUPPORT=ON
Justin Carpentier's avatar
Justin Carpentier committed
46
47
48
49
50
51
52
        make
        make build_tests
        export CTEST_OUTPUT_ON_FAILURE=1
        make test
        make install

    - name: Uninstall Pinocchio
Justin Carpentier's avatar
Justin Carpentier committed
53
      shell: bash -l {0}
Justin Carpentier's avatar
Justin Carpentier committed
54
55
56
      run: |
        cd build
        make uninstall