aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ci-macos.yml
blob: e4a69725f27869d6575b3777dacb651f45ef258c (about) (plain) (blame)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: macOS CI
on:
  pull_request:
  push:
  schedule:
    - cron: '0 0 * * 0'
jobs:
  build:
    if: "!contains(github.event.head_commit.message, '[skip macos ci]')"
    runs-on: macos-12
    env:
      CXXFLAGS: -Wno-error=deprecated-declarations
      INSPIRCD_DEBUG: 3
      INSPIRCD_VERBOSE: 1
    steps:
      - uses: actions/checkout@v3

      - name: Install dependencies
        run: |
          brew update || true
          for PACKAGE in pkg-config argon2 gnutls libmaxminddb libpq mbedtls mysql-client openssl@3 pcre2 re2 rapidjson sqlite;
          do
            brew install $PACKAGE || brew upgrade $PACKAGE

            BREW_PREFIX=$(brew --prefix $PACKAGE)
            if [ -d "$BREW_PREFIX/bin" ]
            then
              export PATH="$PATH:$BREW_PREFIX/bin"
            fi
            if [ -d "$BREW_PREFIX/lib/pkgconfig" ]
            then
              export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_PREFIX/lib/pkgconfig"
            fi
          done
          echo "PATH=$PATH" >> $GITHUB_ENV
          echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV

      - name: Run configure
        run: |
          ./configure --enable-extras "argon2 geo_maxmind ldap log_json log_syslog mysql pgsql regex_pcre regex_posix regex_re2 sqlite3 ssl_gnutls ssl_mbedtls ssl_openssl sslrehashsignal"
          ./configure --development --disable-auto-extras --socketengine ${{ matrix.socketengine }}

      - name: Build core
        run: |
          INSPIRCD_TARGET=inspircd make --jobs $(($(sysctl -n hw.activecpu) + 1))

      - name: Build core modules
        run: |
          INSPIRCD_TARGET=coremods make --jobs $(($(sysctl -n hw.activecpu) + 1))

      - name: Build modules
        run: |
          INSPIRCD_TARGET=modules make --jobs $(($(sysctl -n hw.activecpu) + 1))

      - name: Install
        run: |
          make install

      - name: Run
        run: |
          touch ${{ github.workspace }}/run/conf/inspircd.conf
          ${{ github.workspace }}/run/inspircd start
    strategy:
      fail-fast: false
      matrix:
        socketengine:
          - kqueue
          - poll
          - select