mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-04-11 19:28:30 +00:00
* Offline test * Disabled network * Removed MbedTLS
This commit is contained in:
51
.github/workflows/test_offline.yaml
vendored
Normal file
51
.github/workflows/test_offline.yaml
vendored
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
name: test_offline
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
test_linux:
|
||||||
|
description: 'Test on Linux'
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
GTEST_FILTER: "-*.*_Online"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ubuntu:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: >
|
||||||
|
(github.event_name == 'push') ||
|
||||||
|
(github.event_name == 'pull_request' &&
|
||||||
|
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) ||
|
||||||
|
(github.event_name == 'workflow_dispatch' && github.event.inputs.test_linux == 'true')
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
tls_backend: [openssl, no-tls]
|
||||||
|
name: ubuntu (${{ matrix.tls_backend }})
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: install common libraries
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libcurl4-openssl-dev zlib1g-dev libbrotli-dev libzstd-dev
|
||||||
|
- name: install OpenSSL
|
||||||
|
if: matrix.tls_backend == 'openssl'
|
||||||
|
run: sudo apt-get install -y libssl-dev
|
||||||
|
- name: disable network
|
||||||
|
run: sudo sh -c 'echo > /etc/resolv.conf'
|
||||||
|
- name: build and run tests (OpenSSL)
|
||||||
|
if: matrix.tls_backend == 'openssl'
|
||||||
|
run: cd test && make
|
||||||
|
env:
|
||||||
|
LSAN_OPTIONS: suppressions=lsan_suppressions.txt
|
||||||
|
- name: build and run tests (No TLS)
|
||||||
|
if: matrix.tls_backend == 'no-tls'
|
||||||
|
run: cd test && make test_no_tls && ./test_no_tls
|
||||||
Reference in New Issue
Block a user