diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml new file mode 100644 index 0000000..ba8270e --- /dev/null +++ b/.github/workflows/code-coverage.yml @@ -0,0 +1,29 @@ +name: Upload CodeCov Report + +on: [ push, pull_request ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v2 + with: + fetch-depth: 2 + + - name: Configure cmake + run: cmake -B${{github.workspace}}/build -DCOVERAGE_TEST=ON -DCINATRA_ENABLE_SSL=OFF -DCMAKE_BUILD_TYPE=Debug + + - name: Build with ${{matrix.compiler}} + run: cmake --build ${{github.workspace}}/build --config Debug + + - name: Test + working-directory: ${{github.workspace}}/build + env: + CTEST_OUTPUT_ON_FAILURE: 1 + run: ctest -C ${{ matrix.configuration }} -j `nproc` -V + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 diff --git a/.github/workflows/linux_clang.yml b/.github/workflows/linux_clang.yml new file mode 100644 index 0000000..5dcef0f --- /dev/null +++ b/.github/workflows/linux_clang.yml @@ -0,0 +1,46 @@ +name: Ubuntu 22.04 (clang) + +on: + push: + branches: + - master + pull_request: + branches: + - master + +env: + ASAN_OPTIONS: alloc_dealloc_mismatch=0 + +jobs: + build_by_clang: + strategy: + matrix: + mode: [Debug, Release] + libcxx: [OFF] + ssl: [OFF] + runs-on: ubuntu-22.04 + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Dependencies + run: | + sudo apt-get install openssl + sudo apt-get install libssl-dev + + - name: Install newer Clang + run: | + wget https://apt.llvm.org/llvm.sh + chmod +x ./llvm.sh + sudo ./llvm.sh 11 + + - name: Configure CMake + run: CXX=clang++-11 CC=clang-11 cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.mode}} -DCINATRA_ENABLE_SSL=${{matrix.ssl}} -DBUILD_WITH_LIBCXX=${{matrix.libcxx}} + + - name: Build + run: cmake --build ${{github.workspace}}/build --config ${{matrix.mode}} + + - name: Test + working-directory: ${{github.workspace}}/build + run: ctest -C ${{matrix.mode}} -j `nproc` -V \ No newline at end of file diff --git a/.github/workflows/linux_gcc.yml b/.github/workflows/linux_gcc.yml index dfc3366..d5407bd 100644 --- a/.github/workflows/linux_gcc.yml +++ b/.github/workflows/linux_gcc.yml @@ -26,7 +26,7 @@ jobs: sudo apt-get install libssl-dev - name: Configure CMake - run: CXX=g++ CC=gcc cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.mode}} -DCINATRA_ENABLE_SSL=${{matrix.ssl}} + run: CXX=g++ CC=gcc cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.mode}} -DENABLE_SSL=${{matrix.ssl}} - name: Build run: cmake --build ${{github.workspace}}/build --config ${{matrix.mode}} diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml new file mode 100644 index 0000000..5260be9 --- /dev/null +++ b/.github/workflows/mac.yml @@ -0,0 +1,47 @@ +name: macOS Monterey 12 + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build_on_mac: + strategy: + matrix: + mode: [Debug, Release] + ssl: [OFF] + + runs-on: macos-latest + + steps: + - name: Checkout + uses: actions/checkout@master + + - name: SetUp HomeBrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@master + + - name: Install Dependencies + run: HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install openssl protobuf + + - name: Configure CMake + run: OPENSSL_ROOT_DIR=/usr/local/opt/openssl@3 CXX=clang++ CC=clang cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.mode}} -DCINATRA_ENABLE_SSL=${{matrix.ssl}} + + - name: Build + run: cmake --build ${{github.workspace}}/build --config ${{matrix.mode}} + + - name: Test + working-directory: ${{github.workspace}}/build + run: ctest -C ${{matrix.mode}} -j -V + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + if: failure() + with: + name: LastTest.log + if-no-files-found: ignore + path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..128d32c --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,39 @@ +name: Windows Server 2022 + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build_on_windows: + runs-on: windows-latest + + strategy: + matrix: + mode: [ Debug ] #[ Release, Debug ] + arch: [ amd64, x86 ] #[ amd64,x86 ] + ssl: [ OFF ] #[ ON, OFF ] + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install ninja-build tool + uses: seanmiddleditch/gha-setup-ninja@v3 + + - name: Enable Developer Command Prompt + uses: ilammy/msvc-dev-cmd@v1.12.0 + with: + arch: ${{ matrix.arch }} + + - name: Configure CMake + run: cmake -DCMAKE_BUILD_TYPE=${{ matrix.mode }} -DCINATRA_ENABLE_SSL=${{matrix.ssl}} -G Ninja -B ${{github.workspace}}/build + + - name: Build + run: cmake --build ${{github.workspace}}/build --config ${{ matrix.mode }} + + - name: Test + working-directory: ${{github.workspace}}/build + run: ctest -C ${{matrix.mode}} -j 1 -V