Skip to content

fix cors + static file serving #112

fix cors + static file serving

fix cors + static file serving #112

Workflow file for this run

name: Unix Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install clang-format
uses: ./.github/actions/install-llvm
with:
version: 15
packages: clang-format-15
- name: Format files
run: find src include example -type f -a \( -name "*.cc" -o -name "*.h" \) -print0 | xargs -0 clang-format-15 -i
- name: Check for differences
run: |
git status --porcelain
git status --porcelain | xargs -I {} -0 test -z \"{}\"
build:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- name: MacOS Release
cxx: clang++
cc: clang
mode: Release
cxxflags: -stdlib=libc++
os: macos-latest
artifact: macos
- name: GCC 12 Release
cxx: g++-12
cc: gcc-12
mode: Release
os: ubuntu-latest
artifact: linux
- name: GCC 12 Debug
cxx: g++-12
cc: gcc-12
mode: Debug
os: ubuntu-latest
- name: Clang 15 Release
cxx: clang++-15
cc: clang-15
mode: Release
cxxflags: -stdlib=libc++
ldflags: -lc++abi
os: ubuntu-latest
- name: Clang Tidy
cxx: clang++-15
cc: clang-15
mode: Debug
cxxflags: -stdlib=libc++
ldflags: -lc++abi
lint: true
os: ubuntu-latest
env:
UBSAN_OPTIONS: halt_on_error=1:abort_on_error=1
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master
# ==== INSTALL ====
- name: Install LLVM
if: matrix.config.os != 'macos-latest' && matrix.config.cc == 'clang-15'
uses: ./.github/actions/install-llvm
with:
version: 15
packages: libc++-15-dev libc++abi-15-dev clang-tidy-15
# ==== BUILD ====
- name: CMake
run: |
cmake \
-G Ninja -S . -B build \
-DCMAKE_C_COMPILER=${{ matrix.config.cc }} \
-DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
-DCMAKE_C_FLAGS="${{ matrix.config.cflags }}" \
-DCMAKE_CXX_FLAGS="${{ matrix.config.cxxflags }}" \
-DCMAKE_EXE_LINKER_FLAGS="${{ matrix.config.ldflags }}" \
-DCMAKE_BUILD_TYPE=${{ matrix.config.mode }} \
-DNET_LINT=${{ matrix.config.lint }} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Show compile_commands.json
run: cat build/compile_commands.json
- name: Build
run: cmake --build build --target http-client net-web_server-sample net-wss_client-sample