summaryrefslogtreecommitdiff
path: root/.github/workflows/ci-linux.yml
blob: 022a930aaa1dab870e7480cf6ec86c4c8f20498b (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
name: Linux CI
on:
  - pull_request
  - push
jobs:
  build:
    runs-on: ubuntu-20.04
    env:
      CXX: ${{ matrix.compiler }}
      CXXFLAGS: -std=${{ matrix.standard }}
    steps:
      - uses: actions/checkout@v3
      - name: Install dependencies
        run: |
          sudo apt-get update --assume-yes
          sudo apt-get install --assume-yes --no-install-recommends \
            clang \
            g++ \
            git \
            libc++-dev \
            libc++abi-dev \
            libgnutls28-dev \
            libldap2-dev \
            libmysqlclient-dev \
            libpcre2-dev \
            libpcre3-dev \
            libsqlite3-dev \
            libssl-dev \
            libtre-dev \
            make
      - name: Enable extras
        run: |
          for MODULE in m_ldap.cpp m_ldap_authentication.cpp m_ldap_oper.cpp m_mysql.cpp m_regex_pcre.cpp m_regex_pcre2.cpp m_regex_posix.cpp m_regex_tre.cpp m_sql_authentication.cpp m_sql_log.cpp m_sql_oper.cpp m_sqlite.cpp m_ssl_gnutls.cpp m_ssl_openssl.cpp stats
          do
            ln -s ${{ github.workspace }}/modules/extra/$MODULE ${{ github.workspace }}/modules
          done
      - name: Run CMake
        run: |
          mkdir build && cd build
          cmake -DCMAKE_BUILD_TYPE:STRING=DEBUG -DINSTDIR:STRING=${{ github.workspace }}/run ..
      - name: Build Anope
        run: |
          make --directory ${{ github.workspace }}/build --jobs $(nproc) --no-print-directory install
    strategy:
      fail-fast: false
      matrix:
        compiler:
          - clang++
          - g++
        standard:
          - c++98
          - c++17