2023-01-02 20:51:48 +08:00
|
|
|
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2022-05-17 17:16:50 +08:00
|
|
|
#
|
2021-06-01 22:24:00 +08:00
|
|
|
# SPDX-License-Identifier: curl
|
2022-05-17 17:16:50 +08:00
|
|
|
|
2021-06-07 20:57:14 +08:00
|
|
|
name: macOS
|
2020-04-10 06:59:35 +08:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- '*/ci'
|
2022-12-28 22:57:36 +08:00
|
|
|
paths-ignore:
|
|
|
|
- '**/*.md'
|
2020-04-10 06:59:35 +08:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
2022-12-28 22:57:36 +08:00
|
|
|
paths-ignore:
|
|
|
|
- '**/*.md'
|
2020-04-10 06:59:35 +08:00
|
|
|
|
2022-09-18 05:45:32 +08:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-11-16 22:55:33 +08:00
|
|
|
permissions: {}
|
|
|
|
|
2023-01-31 22:57:41 +08:00
|
|
|
env:
|
|
|
|
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app/Contents/Developer
|
|
|
|
|
2020-04-10 06:59:35 +08:00
|
|
|
jobs:
|
|
|
|
autotools:
|
2021-06-07 20:57:14 +08:00
|
|
|
name: ${{ matrix.build.name }}
|
2020-04-10 06:59:35 +08:00
|
|
|
runs-on: 'macos-latest'
|
2021-06-02 19:19:36 +08:00
|
|
|
timeout-minutes: 90
|
2020-04-10 06:59:35 +08:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
build:
|
|
|
|
- name: normal
|
|
|
|
install: nghttp2
|
2021-04-15 15:21:40 +08:00
|
|
|
configure: --without-ssl
|
2020-07-15 16:03:15 +08:00
|
|
|
macosx-version-min: 10.9
|
2020-04-10 06:59:35 +08:00
|
|
|
- name: debug
|
|
|
|
install: nghttp2
|
2021-04-15 15:21:40 +08:00
|
|
|
configure: --enable-debug --without-ssl
|
2020-07-15 16:03:15 +08:00
|
|
|
macosx-version-min: 10.9
|
2020-04-10 06:59:35 +08:00
|
|
|
- name: libssh2
|
|
|
|
install: nghttp2 libssh2
|
2021-04-15 15:21:40 +08:00
|
|
|
configure: --enable-debug --with-libssh2 --without-ssl
|
2020-07-15 16:03:15 +08:00
|
|
|
macosx-version-min: 10.9
|
2022-04-19 22:31:00 +08:00
|
|
|
- name: libssh-c-ares
|
|
|
|
install: openssl nghttp2 libssh
|
|
|
|
configure: --enable-debug --with-libssh --with-openssl=/usr/local/opt/openssl --enable-ares
|
|
|
|
macosx-version-min: 10.9
|
2022-02-25 21:31:25 +08:00
|
|
|
- name: libssh
|
|
|
|
install: openssl nghttp2 libssh
|
|
|
|
configure: --enable-debug --with-libssh --with-openssl=/usr/local/opt/openssl
|
|
|
|
macosx-version-min: 10.9
|
2020-04-10 06:59:35 +08:00
|
|
|
- name: c-ares
|
|
|
|
install: nghttp2
|
2021-04-15 15:21:40 +08:00
|
|
|
configure: --enable-debug --enable-ares --without-ssl
|
2020-07-15 16:03:15 +08:00
|
|
|
macosx-version-min: 10.9
|
2020-04-10 06:59:35 +08:00
|
|
|
- name: HTTP only
|
|
|
|
install: nghttp2
|
2021-06-01 22:24:00 +08:00
|
|
|
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
|
2020-07-15 16:03:15 +08:00
|
|
|
macosx-version-min: 10.15
|
2021-06-01 22:24:00 +08:00
|
|
|
- name: SecureTransport http2
|
|
|
|
install: nghttp2
|
|
|
|
configure: --enable-debug --with-secure-transport
|
2020-07-15 16:03:15 +08:00
|
|
|
macosx-version-min: 10.8
|
2021-06-01 22:24:00 +08:00
|
|
|
- name: OpenSSL http2
|
|
|
|
install: nghttp2 openssl
|
|
|
|
configure: --enable-debug --with-openssl=/usr/local/opt/openssl
|
2020-07-15 16:03:15 +08:00
|
|
|
macosx-version-min: 10.9
|
2021-06-01 22:24:00 +08:00
|
|
|
- name: LibreSSL http2
|
|
|
|
install: nghttp2 libressl
|
|
|
|
configure: --enable-debug --with-openssl=/usr/local/opt/libressl
|
2020-07-15 16:03:15 +08:00
|
|
|
macosx-version-min: 10.9
|
2020-04-10 06:59:35 +08:00
|
|
|
- name: torture
|
2020-12-16 17:44:29 +08:00
|
|
|
install: nghttp2 openssl
|
2021-04-15 15:21:40 +08:00
|
|
|
configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl=/usr/local/opt/openssl
|
2020-04-10 06:59:35 +08:00
|
|
|
tflags: -n -t --shallow=25 !FTP
|
2020-07-15 16:03:15 +08:00
|
|
|
macosx-version-min: 10.9
|
2021-03-12 18:55:47 +08:00
|
|
|
- name: torture-ftp
|
|
|
|
install: nghttp2 openssl
|
2021-04-15 15:21:40 +08:00
|
|
|
configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl=/usr/local/opt/openssl
|
2021-03-12 18:55:47 +08:00
|
|
|
tflags: -n -t --shallow=20 FTP
|
|
|
|
macosx-version-min: 10.9
|
2020-07-15 16:03:15 +08:00
|
|
|
- name: macOS 10.15
|
2021-06-01 22:24:00 +08:00
|
|
|
install: nghttp2 libssh2 openssl
|
2021-04-15 15:21:40 +08:00
|
|
|
configure: --enable-debug --disable-ldap --with-openssl=/usr/local/opt/openssl
|
2020-07-15 16:03:15 +08:00
|
|
|
macosx-version-min: 10.15
|
2020-04-10 06:59:35 +08:00
|
|
|
steps:
|
2020-06-04 01:58:14 +08:00
|
|
|
- run: echo libtool autoconf automake pkg-config ${{ matrix.build.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
|
|
|
|
name: 'brew bundle'
|
2020-04-10 06:59:35 +08:00
|
|
|
|
2021-11-04 07:41:57 +08:00
|
|
|
# Run this command with retries because of spurious failures seen
|
|
|
|
# while running the tests, for example
|
|
|
|
# https://github.com/curl/curl/runs/4095721123?check_suite_focus=true
|
|
|
|
- run: brew update && for i in 1 2 3; do brew bundle install --no-lock --file /tmp/Brewfile && break || sleep 1; done
|
2020-04-10 06:59:35 +08:00
|
|
|
name: 'brew install'
|
|
|
|
|
2021-12-14 03:51:19 +08:00
|
|
|
- run: python3 -m pip install impacket
|
|
|
|
name: 'pip3 install'
|
|
|
|
|
2022-05-15 05:37:59 +08:00
|
|
|
- uses: actions/checkout@v3
|
2020-06-04 01:58:14 +08:00
|
|
|
|
2022-05-18 06:03:16 +08:00
|
|
|
- run: autoreconf -fi
|
|
|
|
name: 'autoreconf'
|
|
|
|
|
2022-09-09 21:11:14 +08:00
|
|
|
- run: ./configure --enable-warnings --enable-werror ${{ matrix.build.configure }} --enable-websockets
|
2022-05-18 06:03:16 +08:00
|
|
|
name: 'configure'
|
2020-07-15 16:48:44 +08:00
|
|
|
env:
|
|
|
|
# -Wvla is caused by brotli
|
2020-07-15 16:03:15 +08:00
|
|
|
CFLAGS: "-Wno-vla -mmacosx-version-min=${{ matrix.build.macosx-version-min }}"
|
2020-04-10 06:59:35 +08:00
|
|
|
|
2021-10-09 02:43:19 +08:00
|
|
|
- run: make V=1
|
2020-04-10 06:59:35 +08:00
|
|
|
name: 'make'
|
|
|
|
|
2022-05-18 06:03:16 +08:00
|
|
|
- run: make V=1 examples
|
|
|
|
name: 'make examples'
|
|
|
|
|
2022-09-29 18:26:04 +08:00
|
|
|
- run: make V=1 -C tests
|
|
|
|
name: 'make tests'
|
|
|
|
|
2021-10-09 02:43:19 +08:00
|
|
|
- run: make V=1 test-ci
|
2022-09-29 18:26:04 +08:00
|
|
|
name: 'run tests'
|
2020-04-10 06:59:35 +08:00
|
|
|
env:
|
|
|
|
TFLAGS: "${{ matrix.build.tflags }} ~1452"
|
|
|
|
|
|
|
|
cmake:
|
2021-06-07 20:57:14 +08:00
|
|
|
name: cmake ${{ matrix.compiler.CC }} ${{ matrix.build.name }}
|
2020-04-10 06:59:35 +08:00
|
|
|
runs-on: 'macos-latest'
|
|
|
|
env: ${{ matrix.compiler }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
compiler:
|
|
|
|
- CC: clang
|
|
|
|
CXX: clang++
|
2021-05-17 19:20:54 +08:00
|
|
|
CFLAGS: "-mmacosx-version-min=10.15 -Wno-deprecated-declarations"
|
2022-10-23 20:40:26 +08:00
|
|
|
- CC: gcc-11
|
|
|
|
CXX: g++-11
|
2020-07-15 16:03:15 +08:00
|
|
|
CFLAGS: "-mmacosx-version-min=10.15 -Wno-error=undef -Wno-error=conversion"
|
2020-04-10 06:59:35 +08:00
|
|
|
build:
|
|
|
|
- name: OpenSSL
|
2020-12-16 17:44:29 +08:00
|
|
|
install: nghttp2 openssl
|
|
|
|
generate: -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON
|
2020-04-10 06:59:35 +08:00
|
|
|
- name: LibreSSL
|
|
|
|
install: nghttp2 libressl
|
|
|
|
generate: -DOPENSSL_ROOT_DIR=/usr/local/opt/libressl -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON
|
2021-05-11 20:37:37 +08:00
|
|
|
- name: libssh2
|
|
|
|
install: nghttp2 openssl libssh2
|
2021-11-23 00:39:46 +08:00
|
|
|
generate: -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCURL_USE_LIBSSH2=ON
|
2020-04-10 06:59:35 +08:00
|
|
|
steps:
|
2020-06-04 01:58:14 +08:00
|
|
|
- run: echo libtool autoconf automake pkg-config ${{ matrix.build.install }} | xargs -Ix -n1 echo brew '"x"' > /tmp/Brewfile
|
|
|
|
name: 'brew bundle'
|
2020-04-10 06:59:35 +08:00
|
|
|
|
2020-06-04 01:58:14 +08:00
|
|
|
- run: brew update && brew bundle install --no-lock --file /tmp/Brewfile
|
2020-04-10 06:59:35 +08:00
|
|
|
name: 'brew install'
|
|
|
|
|
2021-12-14 03:51:19 +08:00
|
|
|
- run: python3 -m pip install impacket
|
|
|
|
name: 'pip3 install'
|
|
|
|
|
2022-05-15 05:37:59 +08:00
|
|
|
- uses: actions/checkout@v3
|
2020-06-04 01:58:14 +08:00
|
|
|
|
2022-06-16 02:00:42 +08:00
|
|
|
- run: cmake -S. -Bbuild -DCURL_WERROR=ON -DPICKY_COMPILER=ON ${{ matrix.build.generate }}
|
2020-04-10 06:59:35 +08:00
|
|
|
name: 'cmake generate'
|
|
|
|
|
|
|
|
- run: cmake --build build
|
|
|
|
name: 'cmake build'
|