Cleanup ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE, all platforms support it so far as I can...
[ACE_TAO.git] / .github / workflows / linux.yml
blobc95cc80a0a2a89073a09a755bd423bfa85e771ca
1 name: linux
3 on:
4   push:
5   pull_request:
6   schedule:
7     - cron: '0 1 * * SUN'
8   workflow_dispatch:
10 concurrency:
11   group: ${{ github.workflow }}-${{ github.ref }}
12   cancel-in-progress: true
14 permissions:
15   contents: read
17 jobs:
18   build:
19     permissions:
20       actions: read  # for github/codeql-action/init to get workflow details
21       contents: read  # for actions/checkout to fetch code
22       security-events: write  # for github/codeql-action/analyze to upload SARIF results
23     strategy:
24       fail-fast: false
25       matrix:
26         include:
27           - CC: gcc-7
28             CXX: g++-7
29             PackageDeps: g++-7
30             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
31             os: ubuntu-20.04
32             CheckPkgConfig: 1
33           - CC: gcc-8
34             CXX: g++-8
35             PackageDeps: g++-8
36             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
37             os: ubuntu-20.04
38           - CC: gcc-9
39             CXX: g++-9
40             PackageDeps: g++-9
41             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
42             os: ubuntu-20.04
43           - CC: gcc-10
44             CXX: g++-10
45             PackageDeps: g++-10
46             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
47             os: ubuntu-20.04
48           - CC: gcc-11
49             CXX: g++-11
50             PackageDeps: g++-11
51             optional_macros: c++std=c++20
52             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
53             os: ubuntu-22.04
54           - CC: gcc-12
55             CXX: g++-12
56             PackageDeps: g++-12
57             optional_macros: c++std=c++20
58             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
59             os: ubuntu-22.04
60           - CC: gcc-13
61             CXX: g++-13
62             PackageDeps: g++-13
63             optional_macros: c++std=c++20
64             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
65             os: ubuntu-22.04
66           - CC: clang-6.0
67             CXX: clang++-6.0
68             PackageDeps: clang-6.0
69             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux_clang.GNU
70             os: ubuntu-20.04
71           - CC: clang-7
72             CXX: clang++-7
73             PackageDeps: clang-7
74             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux_clang.GNU
75             os: ubuntu-20.04
76           - CC: clang-8
77             CXX: clang++-8
78             PackageDeps: clang-8
79             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux_clang.GNU
80             os: ubuntu-20.04
81           - CC: clang-9
82             CXX: clang++-9
83             PackageDeps: clang-9
84             Repo: llvm-toolchain-$(lsb_release -cs)-9
85             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux_clang.GNU
86             os: ubuntu-20.04
87           - CC: clang-10
88             CXX: clang++-10
89             PackageDeps: clang-10
90             Repo: llvm-toolchain-$(lsb_release -cs)-10
91             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux_clang.GNU
92             os: ubuntu-20.04
93           - CC: clang-11
94             CXX: clang++-11
95             PackageDeps: clang-11
96             Repo: llvm-toolchain-$(lsb_release -cs)-11
97             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux_clang.GNU
98             os: ubuntu-20.04
99           - CC: clang-12
100             CXX: clang++-12
101             PackageDeps: clang-12
102             Repo: llvm-toolchain-$(lsb_release -cs)-12
103             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux_clang.GNU
104             os: ubuntu-20.04
105           - CC: clang-13
106             CXX: clang++-13
107             PackageDeps: clang-13
108             Repo: llvm-toolchain-$(lsb_release -cs)-13
109             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux_clang.GNU
110             os: ubuntu-20.04
111           - CC: clang-14
112             CXX: clang++-14
113             PackageDeps: clang-14
114             Repo: llvm-toolchain-$(lsb_release -cs)-14
115             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux_clang.GNU
116             os: ubuntu-22.04
117           - CC: clang-15
118             CXX: clang++-15
119             PackageDeps: clang-15
120             Repo: llvm-toolchain-$(lsb_release -cs)-15
121             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux_clang.GNU
122             os: ubuntu-22.04
123           - feature: CORBA/e micro
124             CC: gcc-10
125             CXX: g++-10
126             PackageDeps: g++-10
127             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
128             os: ubuntu-20.04
129             optional_feature: corba_e_micro=1
130             optional_macros: corba_e_micro=1
131           - feature: CORBA/e compact
132             CC: gcc-10
133             CXX: g++-10
134             PackageDeps: g++-10
135             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
136             os: ubuntu-20.04
137             optional_feature: corba_e_compact=1
138             optional_macros: corba_e_compact=1
139           - feature: ACE for TAO
140             CC: gcc-10
141             CXX: g++-10
142             PackageDeps: g++-10
143             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
144             os: ubuntu-20.04
145             optional_feature: ace_for_tao=1
146             optional_macros: ace_for_tao=1
147           - feature: wchar
148             CC: gcc-10
149             CXX: g++-10
150             PackageDeps: g++-10
151             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
152             os: ubuntu-20.04
153             optional_feature: uses_wchar=1
154             optional_macros: inline=0
155           - feature: CodeQL
156             CC: gcc-10
157             CXX: g++-10
158             PackageDeps: g++-10
159             platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
160             os: ubuntu-20.04
161     runs-on: ${{ matrix.os }}
162     name: ${{ matrix.os }} ${{ matrix.CXX }} ${{ matrix.feature }}
163     env:
164       ACE_ROOT: ${{ github.workspace }}/ACE
165       TAO_ROOT: ${{ github.workspace }}/TAO
166       MPC_ROOT: ${{ github.workspace }}/MPC
167       CC: ${{ matrix.CC }}
168       CXX: ${{ matrix.CXX }}
169     steps:
170     - name: Checkout ACE_TAO
171       uses: actions/checkout@v4
172     - name: Checkout MPC
173       uses: actions/checkout@v4
174       with:
175         repository: DOCGroup/MPC
176         path: ${{ env.MPC_ROOT }}
177     - name: Add LLVM apt repo ${{ matrix.Repo }}
178       run: |
179         wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
180         sudo apt-add-repository "deb http://apt.llvm.org/$(lsb_release -cs)/ ${{ matrix.Repo }} main"
181       if: startsWith (matrix.Repo, 'llvm-toolchain')
182     - name: Add PPA apt repo ${{ matrix.Repo }}
183       run: |
184         sudo apt-add-repository ${{ matrix.Repo }}
185       if: startsWith (matrix.Repo, 'ppa:')
186     - name: Add apt packages ${{ matrix.PackageDeps }}
187       run: |
188         sudo apt-get --yes update
189         sudo apt-get --yes install libxerces-c-dev libssl-dev ${{ matrix.PackageDeps }}
190     - name: Create $ACE_ROOT/ace/config.h
191       run: |
192         '#include "ace/config-linux.h"' > ${env:ACE_ROOT}/ace/config.h
193       shell: pwsh
194     - name: Create $ACE_ROOT/include/makeinclude/platform_macros.GNU
195       run: |
196         'ipv6=1' > ${env:ACE_ROOT}/include/makeinclude/platform_macros.GNU
197         'xerces3=1' >> ${env:ACE_ROOT}/include/makeinclude/platform_macros.GNU
198         'ssl=1' >> ${env:ACE_ROOT}/include/makeinclude/platform_macros.GNU
199         'INSTALL_PREFIX = ${{ github.workspace }}/installed' >> ${env:ACE_ROOT}/include/makeinclude/platform_macros.GNU
200       shell: pwsh
201     - name: Add optional platform macros
202       run: |
203         '${{ matrix.optional_macros }}' >> ${env:ACE_ROOT}/include/makeinclude/platform_macros.GNU
204       shell: pwsh
205       if: matrix.optional_macros != ''
206     - name: Extend $ACE_ROOT/include/makeinclude/platform_macros.GNU
207       run: |
208         '${{ matrix.platform_file }}' >> ${env:ACE_ROOT}/include/makeinclude/platform_macros.GNU
209       shell: pwsh
210     - name: Create $ACE_ROOT/bin/MakeProjectCreator/config/default.features
211       run: |
212         'ipv6=1' > ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
213         'xerces3=1' >> ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
214         'ssl=1' >> ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
215         'versioned_namespace=1' >> ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
216       shell: pwsh
217     - name: Add optional MPC features
218       run: |
219         '${{ matrix.optional_feature }}' >> ${env:ACE_ROOT}/bin/MakeProjectCreator/config/default.features
220       if: matrix.optional_feature != ''
221       shell: pwsh
222     - name: Initialize CodeQL
223       uses: github/codeql-action/init@v3
224       with:
225         languages: cpp
226       if: matrix.feature == 'CodeQL'
227     - name: Run mwc.pl on $(TAO_ROOT)/TAO_ACE.mwc
228       run: |
229         perl ${env:ACE_ROOT}/bin/mwc.pl -type gnuace ${env:TAO_ROOT}/TAO_ACE.mwc -workers 4
230       shell: pwsh
231     - name: Run mwc.pl on $(ACE_ROOT)/tests/tests.mwc
232       run: |
233         perl ${env:ACE_ROOT}/bin/mwc.pl -type gnuace ${env:ACE_ROOT}/tests/tests.mwc -workers 4
234       shell: pwsh
235     - name: Run mwc.pl on $(TAO_ROOT)/tests/IDL_Test
236       run: |
237         perl ${env:ACE_ROOT}/bin/mwc.pl -type gnuace ${env:TAO_ROOT}/tests/IDL_Test -workers 4
238       shell: pwsh
239     - name: Run mwc.pl on $(TAO_ROOT)/tests/IDLv4
240       run: |
241         perl ${env:ACE_ROOT}/bin/mwc.pl -type gnuace ${env:TAO_ROOT}/tests/IDLv4 -workers 4
242       shell: pwsh
243     - name: Build TAO_ACE workspace
244       run: |
245         make -j 6 -C ${env:TAO_ROOT}
246       shell: pwsh
247     - name: Build ACE/tests workspace
248       run: |
249         make -j 6 -C ${env:ACE_ROOT}/tests
250       shell: pwsh
251     - name: Build TAO/tests/IDL_Test project
252       run: |
253         make -j 6 -C ${env:TAO_ROOT}/tests/IDL_Test
254       shell: pwsh
255       if: matrix.feature != 'CORBA/e micro'
256     - name: Build TAO/tests/IDLv4 project
257       run: |
258         make -j 6 -C ${env:TAO_ROOT}/tests/IDLv4
259       shell: pwsh
260     - name: Perform CodeQL Analysis
261       uses: github/codeql-action/analyze@v3
262       if: matrix.feature == 'CodeQL'
263     - name: Install TAO_ACE workspace
264       run: |
265         make -C ${env:TAO_ROOT} install
266       shell: pwsh
267     - name: Test pkgconfig
268       if: matrix.CheckPkgConfig
269       run: |
270         cd ${{ github.workspace }}/installed/lib/pkgconfig
271         export PKG_CONFIG_PATH=.
272         for f in *.pc; do pkg-config --print-errors --exists ${f%.pc}; done