macos-linux-conda.yml 1.4 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
34
35
        conda install cmake -c main
    
    - name: Build Pinocchio
Justin Carpentier's avatar
Justin Carpentier committed
36
      shell: bash -l {0}
Justin Carpentier's avatar
Justin Carpentier committed
37
      run: |
Justin Carpentier's avatar
Justin Carpentier committed
38
        conda activate pinocchio
Justin Carpentier's avatar
Justin Carpentier committed
39
40
41
42
43
44
45
46
47
48
49
50
51
        echo $CONDA_PREFIX
        
        mkdir build
        cd build

        cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=Debug -DBUILD_WITH_COLLISION_SUPPORT=ON -DBUILD_ADVANCED_TESTING=ON -DBUILD_WITH_CASADI_SUPPORT=OFF -DPYTHON_EXECUTABLE=$(which python3) -DBUILD_WITH_OPENMP_SUPPORT=OFF
        make
        make build_tests
        export CTEST_OUTPUT_ON_FAILURE=1
        make test
        make install

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