File: clang.ys

package info (click to toggle)
c4core 0.2.7-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 5,184 kB
  • sloc: cpp: 35,521; python: 2,786; javascript: 414; makefile: 6
file content (161 lines) | stat: -rw-r--r-- 8,767 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
!yamlscript/v0:

:use common: :all
:: workflow-setup()

jobs:

  #----------------------------------------------------------------------------
  canary:
    :: setup-job('clang' 'canary')
    name: canary/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
    :: runs-on-docker-c4core('22.04')
    strategy:
      fail-fast: false
      matrix:
        include:
          - {std: 20, cxx: clang++-18, bt: Debug  , bitlinks: shared64 static32}
          - {std: 20, cxx: clang++-18, bt: Release, bitlinks: shared64 static32}
          - {std: 11, cxx: clang++-18, bt: Debug  , bitlinks: shared64 static32}
          - {std: 11, cxx: clang++-18, bt: Release, bitlinks: shared64 static32}
    env:: load('share/env.yaml')
    steps:
      - :: checkout-action-docker
      - run: c4core-install ${{matrix.cxx}}
      - :: run-steps

  #----------------------------------------------------------------------------
  noexceptions:
    :: setup-job('clang' 'noexceptions')
    name: noexc/${{matrix.cxx}}/c++${{matrix.std}}/${{matrix.bt}}
    :: runs-on-docker-c4core('22.04')
    strategy:
      fail-fast: false
      matrix:
        include:
          - {std: 20, cxx: clang++-18, bt: Debug  , bitlinks: shared64 static32}
          - {std: 20, cxx: clang++-18, bt: Release, bitlinks: shared64 static32}
          - {std: 11, cxx: clang++-18, bt: Debug  , bitlinks: shared64 static32}
          - {std: 11, cxx: clang++-18, bt: Release, bitlinks: shared64 static32}
    env:: -{'CXXFLAGS' '-fno-exceptions -fno-rtti'} +
          load('share/env.yaml')
    steps:
      - :: checkout-action-docker
      - run: c4core-install ${{matrix.cxx}}
      - :: run-steps

  #----------------------------------------------------------------------------
  extended:
    :: setup-job('clang' 'extended')
    name: extended/${{matrix.cxx}}/c++${{matrix.std}}/vg${{matrix.vg}}
    :: runs-on-docker-c4core('${{matrix.img}}')
    strategy:
      fail-fast: false
      matrix:
        include:
          # with valgrind: only latest clang
          - {std: 20, cxx: 18   , bits: 64, vg: ON , img: 22.04}
          - {std: 20, cxx: 18   , bits: 32, vg: ON , img: 22.04}
          - {std: 17, cxx: 18   , bits: 64, vg: ON , img: 22.04}
          - {std: 17, cxx: 18   , bits: 32, vg: ON , img: 22.04}
          - {std: 14, cxx: 18   , bits: 64, vg: ON , img: 22.04}
          - {std: 14, cxx: 18   , bits: 32, vg: ON , img: 22.04}
          - {std: 11, cxx: 18   , bits: 64, vg: ON , img: 22.04}
          - {std: 11, cxx: 18   , bits: 32, vg: ON , img: 22.04}
          # without valgrind
          - {std: 11, cxx: 17   , bits: 64, vg: OFF, img: 22.04}
          - {std: 11, cxx: 17   , bits: 32, vg: OFF, img: 22.04}
          - {std: 11, cxx: 16   , bits: 64, vg: OFF, img: 22.04}
          - {std: 11, cxx: 16   , bits: 32, vg: OFF, img: 22.04}
          - {std: 11, cxx: 15   , bits: 64, vg: OFF, img: 22.04} # install of clang15 fails on ubuntu18.04
          - {std: 11, cxx: 15   , bits: 32, vg: OFF, img: 22.04} # install of clang15 fails on ubuntu18.04
          - {std: 11, cxx: 14   , bits: 64, vg: OFF, img: 22.04} # install of clang14 fails on ubuntu18.04
          - {std: 11, cxx: 14   , bits: 32, vg: OFF, img: 22.04} # install of clang14 fails on ubuntu18.04
          - {std: 11, cxx: 13   , bits: 64, vg: OFF, img: 18.04}
          - {std: 11, cxx: 13   , bits: 32, vg: OFF, img: 18.04}
          - {std: 11, cxx: 12   , bits: 64, vg: OFF, img: 18.04}
          - {std: 11, cxx: 12   , bits: 32, vg: OFF, img: 18.04}
          - {std: 11, cxx: 11   , bits: 64, vg: OFF, img: 18.04}
          - {std: 11, cxx: 11   , bits: 32, vg: OFF, img: 18.04}
          - {std: 11, cxx: 10   , bits: 64, vg: OFF, img: 18.04}
          - {std: 11, cxx: 10   , bits: 32, vg: OFF, img: 18.04}
          - {std: 11, cxx: 9    , bits: 64, vg: OFF, img: 18.04}
          - {std: 11, cxx: 9    , bits: 32, vg: OFF, img: 18.04}
          - {std: 11, cxx: 8    , bits: 64, vg: OFF, img: 18.04}
          - {std: 11, cxx: 8    , bits: 32, vg: OFF, img: 18.04}
          - {std: 11, cxx: 7    , bits: 64, vg: OFF, img: 18.04}
          - {std: 11, cxx: 7    , bits: 32, vg: OFF, img: 18.04}
          - {std: 11, cxx: '6.0', bits: 64, vg: OFF, img: 18.04}
          - {std: 11, cxx: '6.0', bits: 32, vg: OFF, img: 18.04}
          - {std: 11, cxx: '5.0', bits: 64, vg: OFF, img: 18.04}
          - {std: 11, cxx: '5.0', bits: 32, vg: OFF, img: 18.04}
          - {std: 11, cxx: '4.0', bits: 64, vg: OFF, img: 18.04}
          - {std: 11, cxx: '4.0', bits: 32, vg: OFF, img: 18.04}
          - {std: 11, cxx: '3.9', bits: 64, vg: OFF, img: 18.04}
          - {std: 11, cxx: '3.9', bits: 32, vg: OFF, img: 18.04}
    env:: load('share/env.yaml')
    steps:
      - :: checkout-manual
      - run: c4core-install clang++-${{matrix.cxx}}
      - :: run-clang-manual-with-flags('Debug'                '-m${{matrix.bits}}')
      - :: run-clang-manual-with-flags('Release' '-O1 -DNDEBUG -m${{matrix.bits}}')
      - :: run-clang-manual-with-flags('Release' '-O2 -DNDEBUG -m${{matrix.bits}}')
      - :: run-clang-manual-with-flags('Release' '-O3 -DNDEBUG -m${{matrix.bits}}')
      - :: run-clang-manual-with-flags('Release' '-Os -DNDEBUG -m${{matrix.bits}}')

  #----------------------------------------------------------------------------
  clangsan:
    :: setup-job('clang' 'clangsan')
    name: ${{matrix.bt}}/c++${{matrix.std}}
    :: runs-on-docker-c4core('22.04')
    strategy:
      fail-fast: false
      matrix:
        include:
          - {std: 11, cxx: 18, bt: asan }
          - {std: 20, cxx: 18, bt: asan }
          - {std: 11, cxx: 18, bt: lsan }
          - {std: 20, cxx: 18, bt: lsan }
          - {std: 11, cxx: 18, bt: tsan }
          - {std: 20, cxx: 18, bt: tsan }
          - {std: 11, cxx: 18, bt: ubsan}
          - {std: 20, cxx: 18, bt: ubsan}
    env:: load('share/env.yaml')
    steps:
      - :: checkout-action-docker
      - run: c4core-install clang++-${{matrix.cxx}}
      - :: run-clang-manual-with-flags('${{matrix.bt}}' '-m64')

  #----------------------------------------------------------------------------
#  # https://blog.kitware.com/static-checks-with-cmake-cdash-iwyu-clang-tidy-lwyu-cpplint-and-cppcheck/
#  static_analysis:
#    continue-on-error: true
#    if: always()  # https://stackoverflow.com/questions/62045967/github-actions-is-there-a-way-to-continue-on-error-while-still-getting-correct
#    runs-on: ${{matrix.os}}
#    strategy:
#      fail-fast: false
#      matrix:
#        include:
#          # these jobs take much longer, so run only one bitlink pair per job to profit from parallelism
#          - {std: 11, cxx: clang++-10, bt: Debug  , bitlinks: shared64, os: ubuntu-22.04}
#          - {std: 11, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-22.04}
#          - {std: 14, cxx: clang++-10, bt: Debug  , bitlinks: shared64, os: ubuntu-22.04}
#          - {std: 14, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-22.04}
#          - {std: 17, cxx: clang++-10, bt: Debug  , bitlinks: shared64, os: ubuntu-22.04}
#          - {std: 17, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-22.04}
#          - {std: 20, cxx: clang++-10, bt: Debug  , bitlinks: shared64, os: ubuntu-22.04}
#          - {std: 20, cxx: clang++-10, bt: Release, bitlinks: shared64, os: ubuntu-22.04}
#    env: {STD: "${{matrix.std}}", CXX_: "${{matrix.cxx}}", BT: "${{matrix.bt}}", BITLINKS: "${{matrix.bitlinks}}", VG: "${{matrix.vg}}", SAN: "${{matrix.san}}", LINT: "${{matrix.lint}}", OS: "${{matrix.os}}"}
#    steps:
#      - {name: checkout, uses: actions/checkout@v4, with: {submodules: recursive}}
#      - run: git config --system --add safe.directory '*'  # needed for running in the docker image. see https://github.com/actions/checkout/issues/1169
#      - {name: install requirements, run: source .github/reqs.sh && c4_install_test_requirements $OS}
#      - {name: show info, run: source .github/setenv.sh && c4_show_info}
#      - name: shared64-configure---------------------------------------------------
#        run: source .github/setenv.sh && c4_cfg_test shared64
#      - {name: shared64-build, run: source .github/setenv.sh && c4_build_test shared64}
#      - {name: clang-tidy, run: cmake "-DCMAKE_CXX_CLANG_TIDY=/usr/bin/clang-tidy-3.9;-checks=*" ../path/to/source}
#      - {name: cppcheck, run: cmake "-DCMAKE_CXX_CPPCHECK=/usr/bin/cppcheck;--std=c++11" ../path/to/source}
#      - {name: cpplint, run: cmake "-DCMAKE_CXX_CPPLINT=/usr/local/bin/cpplint;--linelength=179" ..}
#      - {name: include-what-you-use, run: cmake "-DCMAKE_CXX_INCLUDE_WHAT_YOU_USE=/usr/bin/iwyu;--transitive_includes_only" ..}
#      - {name: link-what-you-use, run: cmake -DCMAKE_LINK_WHAT_YOU_USE=TRUE ..}