File: linux.yml

package info (click to toggle)
fstl 0.11.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 840 kB
  • sloc: cpp: 2,006; sh: 103; makefile: 4
file content (45 lines) | stat: -rw-r--r-- 1,335 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
name: Build

on:
    push:
        branches: [main, master]
    pull_request:
        branches: [main, master]

jobs:
    build:
        runs-on: ubuntu-latest
        strategy:
            matrix:
                compiler: [gcc, clang]
        steps:
            - name: Checkout code
              uses: actions/checkout@v4

            - name: Install dependencies
              run: |
                sudo apt-get update
                sudo apt-get install -y qt5-qmake qtbase5-dev build-essential clang clang-format

            - name: Set compiler
              run: |
                if [ "${{ matrix.compiler }}" = "clang" ]; then
                    export CC=clang
                    export CXX=clang++
                else
                    export CC=gcc
                    export CXX=g++
                fi
                echo "CC=$CC" >> $GITHUB_ENV
                echo "CXX=$CXX" >> $GITHUB_ENV

            - name: Build 
              run: |
                cmake -S . -B build -DFSTL_CHECK_FORMAT=ON
                cmake --build build --target fstl --config Release -- -j$(nproc)
            
            - name: Check format
              run: |
                # Print the version for troubleshooting purposes
                clang-format --version
                cmake --build build --target check-format