Remove Response
TODO
#28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Hydra | |
on: | |
- push | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- os: macos-latest | |
cc: clang | |
cxx: clang++ | |
type: static | |
- os: macos-latest | |
cc: clang | |
cxx: clang++ | |
type: shared | |
- os: ubuntu-latest | |
cc: clang | |
cxx: clang++ | |
type: static | |
- os: ubuntu-latest | |
cc: gcc | |
cxx: g++ | |
type: static | |
- os: ubuntu-latest | |
cc: clang | |
cxx: clang++ | |
type: shared | |
- os: ubuntu-latest | |
cc: gcc | |
cxx: g++ | |
type: shared | |
- os: windows-latest | |
type: static | |
- os: windows-latest | |
type: shared | |
# Sanitizers | |
- os: ubuntu-latest | |
cc: clang | |
cxx: clang++ | |
type: static | |
options: -DHYDRA_ADDRESS_SANITIZER:BOOL=ON | |
- os: ubuntu-latest | |
cc: clang | |
cxx: clang++ | |
type: static | |
options: -DHYDRA_UNDEFINED_SANITIZER:BOOL=ON | |
runs-on: ${{ matrix.platform.os }} | |
env: | |
CC: ${{ matrix.platform.cc }} | |
CXX: ${{ matrix.platform.cxx }} | |
steps: | |
- name: Install dependencies (GNU/Linux) | |
if: runner.os == 'linux' | |
run: sudo apt-get install --yes clang-format libcurl4-openssl-dev nodejs | |
# See https://github.com/actions/runner-images/issues/8659 | |
- name: Workaround Clang issue (GNU/Linux) | |
if: runner.os == 'linux' && matrix.platform.cc == 'clang' | |
run: | | |
sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list | |
sudo apt-get install --yes --allow-downgrades libc6=2.35-0ubuntu3.4 libc6-dev=2.35-0ubuntu3.4 libstdc++6=12.3.0-1ubuntu1~22.04 libgcc-s1=12.3.0-1ubuntu1~22.04 | |
- uses: actions/checkout@v3 | |
- name: Install dependencies (macOS) | |
if: runner.os == 'macos' | |
run: brew bundle | |
env: | |
HOMEBREW_NO_ANALYTICS: 1 | |
HOMEBREW_NO_AUTO_UPDATE: 1 | |
- run: cmake --version | |
- name: Configure Hydra (static) | |
if: matrix.platform.type == 'static' | |
run: > | |
cmake -S . -B ./build | |
-DCMAKE_BUILD_TYPE:STRING=Release | |
-DHYDRA_CONTRIB:BOOL=ON | |
-DHYDRA_TESTS:BOOL=ON | |
-DHYDRA_DOCS:BOOL=OFF | |
-DBUILD_SHARED_LIBS:BOOL=OFF | |
-DCMAKE_COMPILE_WARNING_AS_ERROR:BOOL=ON | |
${{ matrix.platform.options }} | |
- name: Configure Hydra (shared) | |
if: matrix.platform.type == 'shared' | |
run: > | |
cmake -S . -B ./build | |
-DCMAKE_BUILD_TYPE:STRING=Release | |
-DHYDRA_CONTRIB:BOOL=ON | |
-DHYDRA_TESTS:BOOL=ON | |
-DHYDRA_DOCS:BOOL=OFF | |
-DBUILD_SHARED_LIBS:BOOL=ON | |
-DCMAKE_COMPILE_WARNING_AS_ERROR:BOOL=ON | |
${{ matrix.platform.options }} | |
- run: cmake --build ./build --config Release --target clang_format_test | |
- run: cmake --build ./build --config Release --parallel 4 | |
- run: > | |
cmake --install ./build --prefix ./build/dist --config Release --verbose | |
--component sourcemeta_hydra | |
- run: > | |
cmake --install ./build --prefix ./build/dist --config Release --verbose | |
--component sourcemeta_hydra_dev | |
# Run stubs | |
- name: Run HTTP stub (Windows) | |
run: cmd /c "start /b node test\http\stub.js" && Start-Sleep -Seconds 2 | |
if: runner.os == 'windows' | |
- name: Run HTTP stub (*nix) | |
run: (node test/http/stub.js &) && sleep 2 | |
if: runner.os != 'windows' | |
# Not every CTest version supports the --test-dir option. If such option | |
# is not recognized, `ctest` will successfully exit finding no tests. | |
# Better to be sure and `cd` all the time here. | |
- run: cd ./build && ctest --build-config Release --output-on-failure --parallel | |
env: | |
# See https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html | |
UBSAN_OPTIONS: print_stacktrace=1 |