summaryrefslogtreecommitdiff
path: root/.github/workflows/ci-linux.yml
blob: 9c281dbc2ca044186c559e10b6aefb394cb754a2 (plain)
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
name: Ubuntu CI
on:
  - pull_request
  - push
jobs:
  build:
    if: "!contains(github.event.head_commit.message, '[skip ubuntu ci]')"
    runs-on: ubuntu-24.04
    env:
      CXX: ${{ matrix.compiler }}
      CXXFLAGS: -Werror
    steps:
      - uses: actions/checkout@v4

      - name: Install dependencies
        run: |
          sudo apt-get update --assume-yes
          sudo apt-get install --assume-yes --no-install-recommends \
            clang \
            g++ \
            gettext \
            git \
            libargon2-dev \
            libgnutls28-dev \
            libldap2-dev \
            libmysqlclient-dev \
            libpcre2-dev \
            libsqlite3-dev \
            libssl-dev \
            libtre-dev \
            ninja-build

      - name: Enable extras
        run: |
          for MODULE in enc_argon2 enc_posix ldap mysql regex_pcre2 regex_posix regex_tre sqlite ssl_gnutls ssl_openssl
          do
            ln -s ${{ github.workspace }}/modules/extra/$MODULE.cpp ${{ github.workspace }}/modules
          done

      - name: Run CMake
        run: |
          mkdir build && cd build
          cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=DEBUG -DINSTDIR:STRING=${{ github.workspace }}/run ..

      - name: Build Anope
        run: |
          ninja -C ${{ github.workspace }}/build install

    strategy:
      fail-fast: false
      matrix:
        compiler:
          - clang++
          - g++