Skip to content

Commit

Permalink
test2
Browse files Browse the repository at this point in the history
  • Loading branch information
jan2000 committed Aug 22, 2024
1 parent 9fff074 commit 2e5e8f2
Show file tree
Hide file tree
Showing 9 changed files with 241 additions and 343 deletions.
215 changes: 119 additions & 96 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
branches:
- master
- '*/ci'
- '*/ci-pytest'
paths-ignore:
- '**/*.md'
- '.azure-pipelines.yml'
Expand Down Expand Up @@ -68,84 +69,85 @@ jobs:
fail-fast: false
matrix:
include:
- name: '!ssl !debug brotli zstd'
compiler: clang
install: brotli zstd
configure: --without-ssl --enable-websockets --with-brotli --with-zstd
macos-version-min: '10.9'
- name: '!ssl !debug'
compiler: gcc-12
configure: --without-ssl --enable-websockets
macos-version-min: '10.9'
- name: '!ssl'
compiler: clang
configure: --enable-debug --without-ssl --enable-websockets
macos-version-min: '10.9'
- name: '!ssl libssh2 AppleIDN'
compiler: clang
configure: --enable-debug --with-libssh2=$(brew --prefix libssh2) --without-ssl --with-apple-idn --enable-websockets
macos-version-min: '10.9'
- name: 'OpenSSL libssh c-ares'
compiler: clang
install: libssh
configure: --enable-debug --with-libssh --with-openssl=$(brew --prefix openssl) --enable-ares --enable-websockets
macos-version-min: '10.9'
- name: 'OpenSSL libssh'
compiler: llvm@15
install: libssh
configure: --enable-debug --with-libssh --with-openssl=$(brew --prefix openssl) --enable-websockets
macos-version-min: '10.9'
- name: '!ssl c-ares'
compiler: clang
configure: --enable-debug --enable-ares --without-ssl --enable-websockets
macos-version-min: '10.9'
- name: '!ssl HTTP-only'
compiler: clang
configure: |
--enable-debug \
--disable-alt-svc --disable-dict --disable-file --disable-ftp --disable-gopher --disable-imap \
--disable-ldap --disable-pop3 --disable-rtmp --disable-rtsp --disable-scp --disable-sftp \
--disable-shared --disable-smb --disable-smtp --disable-telnet --disable-tftp --disable-unix-sockets \
--without-brotli --without-gssapi --without-libidn2 --without-libpsl --without-librtmp --without-libssh2 \
--without-nghttp2 --without-ntlm-auth --without-ssl --without-zlib --without-zstd
macos-version-min: '10.15' # Catalina (2019)
# - name: '!ssl !debug brotli zstd'
# compiler: clang
# install: brotli zstd
# configure: --without-ssl --enable-websockets --with-brotli --with-zstd
# macos-version-min: '10.9'
# - name: '!ssl !debug'
# compiler: gcc-12
# configure: --without-ssl --enable-websockets
# macos-version-min: '10.9'
# - name: '!ssl'
# compiler: clang
# configure: --enable-debug --without-ssl --enable-websockets
# macos-version-min: '10.9'
# - name: '!ssl libssh2 AppleIDN'
# compiler: clang
# configure: --enable-debug --with-libssh2=$(brew --prefix libssh2) --without-ssl --with-apple-idn --enable-websockets
# macos-version-min: '10.9'
# - name: 'OpenSSL libssh c-ares'
# compiler: clang
# install: libssh
# configure: --enable-debug --with-libssh --with-openssl=$(brew --prefix openssl) --enable-ares --enable-websockets
# macos-version-min: '10.9'
# - name: 'OpenSSL libssh'
# compiler: llvm@15
# install: libssh
# configure: --enable-debug --with-libssh --with-openssl=$(brew --prefix openssl) --enable-websockets
# macos-version-min: '10.9'
# - name: '!ssl c-ares'
# compiler: clang
# configure: --enable-debug --enable-ares --without-ssl --enable-websockets
# macos-version-min: '10.9'
# - name: '!ssl HTTP-only'
# compiler: clang
# configure: |
# --enable-debug \
# --disable-alt-svc --disable-dict --disable-file --disable-ftp --disable-gopher --disable-imap \
# --disable-ldap --disable-pop3 --disable-rtmp --disable-rtsp --disable-scp --disable-sftp \
# --disable-shared --disable-smb --disable-smtp --disable-telnet --disable-tftp --disable-unix-sockets \
# --without-brotli --without-gssapi --without-libidn2 --without-libpsl --without-librtmp --without-libssh2 \
# --without-nghttp2 --without-ntlm-auth --without-ssl --without-zlib --without-zstd
#
# macos-version-min: '10.15' # Catalina (2019)
- name: 'SecureTransport libssh2'
compiler: clang
install: httpd caddy vsftpd
configure: --enable-debug --with-secure-transport --enable-websockets --with-libssh2=$(brew --prefix libssh2)
macos-version-min: '10.8'
- name: 'SecureTransport libssh2 10.12'
compiler: clang
configure: --enable-debug --with-secure-transport --enable-websockets --with-libssh2=$(brew --prefix libssh2)
macos-version-min: '10.12' # for monotonic timers
cflags: '-Wno-deprecated-declarations'
- name: 'SecureTransport libssh2'
compiler: gcc-12
configure: --enable-debug --with-secure-transport --enable-websockets --with-libssh2=$(brew --prefix libssh2)
macos-version-min: '10.8'
- name: 'LibreSSL'
compiler: clang
install: libressl
configure: --enable-debug --with-openssl=$(brew --prefix libressl) --enable-websockets
macos-version-min: '10.9'
- name: 'OpenSSL'
compiler: clang
configure: --enable-debug --with-openssl=$(brew --prefix openssl) --enable-websockets
macos-version-min: '10.9'
- name: 'OpenSSL torture !FTP'
compiler: clang
configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl=$(brew --prefix openssl) --enable-websockets
tflags: -n -t --shallow=25 !FTP
macos-version-min: '10.9'
- name: 'OpenSSL torture FTP'
compiler: clang
configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl=$(brew --prefix openssl) --enable-websockets
tflags: -n -t --shallow=20 FTP
macos-version-min: '10.9'
- name: 'OpenSSL libssh2 !ldap 10.15'
compiler: clang
configure: --enable-debug --disable-ldap --with-openssl=$(brew --prefix openssl) --enable-websockets
macos-version-min: '10.15'
# - name: 'SecureTransport libssh2 10.12'
# compiler: clang
# configure: --enable-debug --with-secure-transport --enable-websockets --with-libssh2=$(brew --prefix libssh2)
# macos-version-min: '10.12' # for monotonic timers
# cflags: '-Wno-deprecated-declarations'
# - name: 'SecureTransport libssh2'
# compiler: gcc-12
# configure: --enable-debug --with-secure-transport --enable-websockets --with-libssh2=$(brew --prefix libssh2)
# macos-version-min: '10.8'
# - name: 'LibreSSL'
# compiler: clang
# install: libressl
# configure: --enable-debug --with-openssl=$(brew --prefix libressl) --enable-websockets
# macos-version-min: '10.9'
# - name: 'OpenSSL'
# compiler: clang
# configure: --enable-debug --with-openssl=$(brew --prefix openssl) --enable-websockets
# macos-version-min: '10.9'
# - name: 'OpenSSL torture !FTP'
# compiler: clang
# configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl=$(brew --prefix openssl) --enable-websockets
# tflags: -n -t --shallow=25 !FTP
# macos-version-min: '10.9'
# - name: 'OpenSSL torture FTP'
# compiler: clang
# configure: --enable-debug --disable-shared --disable-threaded-resolver --with-openssl=$(brew --prefix openssl) --enable-websockets
# tflags: -n -t --shallow=20 FTP
# macos-version-min: '10.9'
# - name: 'OpenSSL libssh2 !ldap 10.15'
# compiler: clang
# configure: --enable-debug --disable-ldap --with-openssl=$(brew --prefix openssl) --enable-websockets
# macos-version-min: '10.15'
steps:
- name: 'brew install'
# Run this command with retries because of spurious failures seen
Expand Down Expand Up @@ -179,7 +181,7 @@ jobs:
run: |
python3 -m venv $HOME/venv
source $HOME/venv/bin/activate
python3 -m pip install impacket
python3 -m pip install impacket pytest psutil websockets
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

Expand All @@ -200,6 +202,14 @@ jobs:

- name: 'configure'
run: |
echo brew prefix
brew --prefix || true
echo httpd
which httpd || true
echo caddy
which caddy || true
echo vsftpd
which vsftpd || true
[[ '${{ matrix.compiler }}' = 'llvm'* ]] && CC="$(brew --prefix ${{ matrix.compiler }})/bin/clang"
CFLAGS+=' ${{ matrix.cflags }}'
if [[ '${{ matrix.compiler }}' = 'gcc'* ]]; then
Expand All @@ -220,6 +230,9 @@ jobs:
options+=" --with-sysroot=$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)"
CFLAGS+=" --sysroot=$(xcrun --sdk macosx --show-sdk-path 2>/dev/null)"
fi
options+=" --with-test-httpd=$(brew --prefix httpd)"
options+=" --with-test-caddy=$(brew --prefix)/bin/caddy"
options+=" --with-test-vsftpd=$(brew --prefix)/sbin/vsftpd"
mkdir bld && cd bld && ../configure --enable-warnings --enable-werror \
--disable-dependency-tracking \
--with-libpsl=$(brew --prefix libpsl) \
Expand All @@ -240,29 +253,39 @@ jobs:
- name: 'curl version'
run: bld/src/curl --disable --version

- name: 'make examples'
run: make -C bld V=1 examples

- name: 'make tests'
run: make -C bld V=1 -C tests

- name: 'run tests'
# - name: 'make examples'
# run: make -C bld V=1 examples
#
# - name: 'make tests'
# run: make -C bld V=1 -C tests
#
# - name: 'run tests'
# run: |
# export TFLAGS='${{ matrix.tflags }} -j10'
# if [[ '${{ matrix.compiler }}' = 'gcc'* ]]; then
# TFLAGS+=' ~RTSP' # 567 568 569 570 571 572 577 689 3100
# TFLAGS+=' ~1156 ~1539' # HTTP Content-Range, Content-Length
# if [[ '${{ matrix.configure }}' = *'--with-secure-transport'* ]]; then
# TFLAGS+=' ~2100' # 2100:'HTTP GET using DoH' https://github.com/curl/curl/actions/runs/9942146678/job/27462937524#step:15:5059
# TFLAGS+=' ~HTTP/2' # 2400 2401 2402 2403 2404 2406, SecureTransport + nghttp2
# else
# TFLAGS+=' ~2402 ~2404' # non-SecureTransport + nghttp2
# fi
# fi
# rm -f $HOME/.curlrc
# make -C bld V=1 test-ci

- name: 'run pytest'
run: |
export TFLAGS='${{ matrix.tflags }} -j10'
if [[ '${{ matrix.compiler }}' = 'gcc'* ]]; then
TFLAGS+=' ~RTSP' # 567 568 569 570 571 572 577 689 3100
TFLAGS+=' ~1156 ~1539' # HTTP Content-Range, Content-Length
if [[ '${{ matrix.configure }}' = *'--with-secure-transport'* ]]; then
TFLAGS+=' ~2100' # 2100:'HTTP GET using DoH' https://github.com/curl/curl/actions/runs/9942146678/job/27462937524#step:15:5059
TFLAGS+=' ~HTTP/2' # 2400 2401 2402 2403 2404 2406, SecureTransport + nghttp2
else
TFLAGS+=' ~2402 ~2404' # non-SecureTransport + nghttp2
fi
fi
rm -f $HOME/.curlrc
make -C bld V=1 test-ci
source $HOME/venv/bin/activate
python3 -m pytest -v tests -s
env:
BUILD_DIR: bld
TFLAGS: "${{ matrix.build.tflags }}"
CURL_CI: github

cmake:
if: false
name: 'CM ${{ matrix.compiler }} ${{ matrix.build.name }}'
runs-on: 'macos-latest'
timeout-minutes: 10
Expand Down Expand Up @@ -384,7 +407,7 @@ jobs:
make -C bld test-ci
combinations: # Test buildability with host OS, Xcode / SDK, compiler, target-OS, SecureTransport/not, built tool, combinations
if: true # Set to `true` to enable this test matrix. It runs quickly.
if: false # Set to `true` to enable this test matrix. It runs quickly.
name: "${{ matrix.build == 'cmake' && 'CM' || 'AM' }} ${{ matrix.compiler }} ${{ matrix.image }} ${{ matrix.xcode }} ${{ matrix.config }}"
runs-on: ${{ matrix.image }}
timeout-minutes: 30
Expand Down
Loading

0 comments on commit 2e5e8f2

Please sign in to comment.