File: ubuntu-macos.yml

package info (click to toggle)
cppad 2026.00.00.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,588 kB
  • sloc: cpp: 112,960; sh: 6,146; ansic: 179; python: 71; sed: 12; makefile: 10
file content (56 lines) | stat: -rw-r--r-- 1,447 bytes parent folder | download | duplicates (2)
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
name: ubuntu-macos
on:
  pull_request:
  push:
    branches:
      - master
      - 'stable/*'
jobs:
  run_tests:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ ubuntu-latest, macos-latest ]
    steps:
      - name: Check out repository code
        uses: actions/checkout@v4
      - name: set debug_which
        run: |
          mkdir build
          cd build
          set +e
          random_03=$(expr $RANDOM % 4)
          set -e
          case $random_03 in
            0) debug_which='debug_all'
            ;;
            1) debug_which='debug_even'
            ;;
            2) debug_which='debug_odd'
            ;;
            3) debug_which='debug_none'
            ;;
          esac
          echo "$debug_which" > debug_which
      - name: run cmake
        run: |
          cd build
          debug_which=$(cat debug_which)
          echo "cmake -D cppad_debug_which=$debug_which" ..
          cmake -D cppad_debug_which=$debug_which ..
      - name: run make check
        run: |
          if [ "$RUNNER_OS" == "macOS" ]
          then
            export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
          fi
          if which nproc >& /dev/null
          then
              n_job=$(nproc)
          else
              n_job=$(sysctl -n hw.ncpu)
          fi
          cd build
          echo "make -j $n_job check"
          make -j $n_job check
      - run: echo "job.status = ${{ job.status }}"