File: conda-bash.yml

package info (click to toggle)
cppad 2026.00.00.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,584 kB
  • sloc: cpp: 112,960; sh: 6,146; ansic: 179; python: 71; sed: 12; makefile: 10
file content (69 lines) | stat: -rw-r--r-- 1,709 bytes parent folder | download
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
name: conda-bash

on:
  pull_request:
  push:
    branches:
      - master
      - 'stable/*'

env:
  BUILD_TYPE: Release

jobs:
  build:
    runs-on: ${{ matrix.os }}

    strategy:
      fail-fast: false
      matrix:
        # os: ["ubuntu-latest", "macos-latest"] 2024-04-26 macos-latest failing
        # Error: No installed conda 'base' environment found ...; see
        os: ["ubuntu-latest", "macos-latest", "windows-latest"]

    steps:
    - uses: actions/checkout@v4

    - uses: conda-incubator/setup-miniconda@v3
      with:
        activate-environment: cppad
        auto-update-conda: true

    - name: Install cmake and pkgconfig
      shell: bash -l {0}
      run: |
        conda activate cppad
        conda install -y cmake
        conda install -y pkgconfig

    - name: Build CppAD
      shell: bash -l {0}
      run: |
        conda activate cppad
        if [ "$RUNNER_OS" == "macOS" ]
        then
          generator='Unix Makefiles'
          export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
          n_job=$(sysctl -n hw.ncpu)
        elif  [ "$RUNNER_OS" == "Windows" ]
        then
          generator='Visual Studio 17 2022'
          n_job=1
        else
          generator='Unix Makefiles'
          n_job=$(nproc)
        fi
        echo "RUNNER_OS=$RUNNER_OS, n_job=$n_job, generator=$generator"
        conda activate cppad
        echo $CONDA_PREFIX

        mkdir build
        cd build
        cmake .. \
          -G "$generator" \
          -D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
          -D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
        cmake --build . \
          --config ${{env.BUILD_TYPE}} \
          --target check install \
          --parallel $n_job