Debian Codegraph @

.github/workflows/test-lang-c++.yml

raw
1 # Licensed to the Apache Software Foundation (ASF) under one or more
2 # contributor license agreements. See the NOTICE file distributed with
3 # this work for additional information regarding copyright ownership.
4 # The ASF licenses this file to You under the Apache License, Version 2.0
5 # (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
7 #
8 # https://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 name: Test C++
17 on:
18 workflow_dispatch:
19 push:
20 branches: [ main ]
21 pull_request:
22 branches: [ main ]
23 paths:
24 - '.github/workflows/test-lang-c\+\+.yml'
25 - 'lang/c\+\+/**'
26
27 defaults:
28 run:
29 working-directory: lang/c++
30
31 concurrency:
32 group: ${{ github.workflow }}-${{ github.ref }}
33 cancel-in-progress: true
34
35 jobs:
36 test:
37 runs-on: ${{ matrix.os }}
38 strategy:
39 matrix:
40 os:
41 - ubuntu-latest
42 - ubuntu-24.04-arm
43 steps:
44 - uses: actions/checkout@v5
45
46 - name: Install Dependencies
47 run: sudo apt update && sudo apt-get install -qqy cppcheck libboost-all-dev libsnappy-dev libfmt-dev zlib1g-dev libzstd-dev cmake
48
49 - name: Print Versions
50 run: |
51 gcc --version
52 cmake --version
53 cppcheck --version
54
55 - name: Clean
56 run: ./build.sh clean
57
58 - name: Lint
59 run: ./build.sh lint
60
61 - name: Test
62 run: ./build.sh test
63
64 - name: Release build
65 run: |
66 mkdir -p build
67 cd build
68 cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release ..