• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: macOS
2
3on:
4  # Trigger the workflow on push or pull requests, but only for the
5  # master branch
6  push:
7    branches:
8    - master
9    - '*/ci'
10  pull_request:
11    branches:
12    - master
13
14jobs:
15  autotools:
16    name: ${{ matrix.build.name }}
17    runs-on: 'macos-latest'
18    timeout-minutes: 90
19    strategy:
20      fail-fast: false
21      matrix:
22        build:
23        - name: normal
24          install: nghttp2
25          configure: --without-ssl
26          macosx-version-min: 10.9
27        - name: debug
28          install: nghttp2
29          configure: --enable-debug --without-ssl
30          macosx-version-min: 10.9
31        - name: libssh2
32          install: nghttp2 libssh2
33          configure: --enable-debug --with-libssh2 --without-ssl
34          macosx-version-min: 10.9
35        - name: c-ares
36          install: nghttp2
37          configure: --enable-debug --enable-ares --without-ssl
38          macosx-version-min: 10.9
39        - name: HTTP only
40          install: nghttp2
41          configure: --enable-debug --enable-maintainer-mode --disable-dict --disable-file --disable-ftp --disable-gopher --disable-imap --disable-ldap --disable-pop3 --disable-rtmp --disable-rtsp --disable-scp --disable-sftp --disable-smb --disable-smtp --disable-telnet --disable-tftp --disable-unix-sockets --disable-shared --without-brotli --without-gssapi --without-libidn2 --without-libpsl --without-librtmp --without-libssh2 --without-nghttp2 --without-ntlm-auth --without-ssl --without-zlib
42          macosx-version-min: 10.15
43        - name: SecureTransport http2
44          install: nghttp2
45          configure: --enable-debug --with-secure-transport
46          macosx-version-min: 10.8
47        - name: OpenSSL http2
48          install: nghttp2 openssl
49          configure: --enable-debug --with-openssl=/usr/local/opt/openssl
50          macosx-version-min: 10.9
51        - name: LibreSSL http2
52          install: nghttp2 libressl
53          configure: --enable-debug --with-openssl=/usr/local/opt/libressl
54          macosx-version-min: 10.9
55        - name: torture
56          install: nghttp2 openssl
57          configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl=/usr/local/opt/openssl
58          tflags: -n -t --shallow=25 !FTP
59          macosx-version-min: 10.9
60        - name: torture-ftp
61          install: nghttp2 openssl
62          configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl=/usr/local/opt/openssl
63          tflags: -n -t --shallow=20 FTP
64          macosx-version-min: 10.9
65        - name: macOS 10.15
66          install: nghttp2 libssh2 openssl
67          configure: --enable-debug --disable-ldap --with-openssl=/usr/local/opt/openssl
68          macosx-version-min: 10.15
69    steps:
70    - run: echo libtool autoconf automake pkg-config ${{ matrix.build.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
71      name: 'brew bundle'
72
73    - run: brew update && brew bundle install --no-lock --file /tmp/Brewfile
74      name: 'brew install'
75
76    - uses: actions/checkout@v2
77
78    - run: ./buildconf && ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }}
79      name: 'configure'
80      env:
81        # -Wvla is caused by brotli
82        CFLAGS: "-Wno-vla -mmacosx-version-min=${{ matrix.build.macosx-version-min }}"
83
84    - run: make
85      name: 'make'
86
87    - run: make test-nonflaky
88      name: 'test'
89      env:
90        TFLAGS: "${{ matrix.build.tflags }} ~1452"
91
92  cmake:
93    name: cmake ${{ matrix.compiler.CC }} ${{ matrix.build.name }}
94    runs-on: 'macos-latest'
95    env: ${{ matrix.compiler }}
96    strategy:
97      fail-fast: false
98      matrix:
99        compiler:
100        - CC: clang
101          CXX: clang++
102          CFLAGS: "-mmacosx-version-min=10.15 -Wno-deprecated-declarations"
103        - CC: gcc-9
104          CXX: g++-9
105          CFLAGS: "-mmacosx-version-min=10.15 -Wno-error=undef -Wno-error=conversion"
106        build:
107        - name: OpenSSL
108          install: nghttp2 openssl
109          generate: -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON
110        - name: LibreSSL
111          install: nghttp2 libressl
112          generate: -DOPENSSL_ROOT_DIR=/usr/local/opt/libressl -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON
113        - name: libssh2
114          install: nghttp2 openssl libssh2
115          generate: -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCMAKE_USE_LIBSSH2=ON
116    steps:
117    - run: echo libtool autoconf automake pkg-config ${{ matrix.build.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
118      name: 'brew bundle'
119
120    - run: brew update && brew bundle install --no-lock --file /tmp/Brewfile
121      name: 'brew install'
122
123    - uses: actions/checkout@v2
124
125    - run: cmake -H. -Bbuild -DCURL_WERROR=ON -DPICKY_COMPILER=ON ${{ matrix.build.generate }}
126      name: 'cmake generate'
127
128    - run: cmake --build build
129      name: 'cmake build'
130