Repository navigation
feat(cpp-boost-beast-server): add HTTP/1.1 server generator (#24783) #23
This file contains hidden or 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: Samples cpp boost beast server | |
| on: | |
| push: | |
| paths: | |
| - "samples/server/petstore/cpp-boost-beast-server/**" | |
| - ".github/workflows/samples-cpp-boost-beast-server.yaml" | |
| - "modules/openapi-generator/src/main/resources/cpp-boost-beast-server/**" | |
| - "modules/openapi-generator/src/main/resources/cpp-boost-beast-common/**" | |
| - "modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppBoostBeastServer*.java" | |
| - "modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppBoostBeastModelCodegen.java" | |
| - "modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppBoostBeastClientCodegen.java" | |
| - "modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppBoostBeastOperationFacts.java" | |
| - "modules/openapi-generator/src/test/resources/3_1/cpp-boost-beast-server/**" | |
| - "modules/openapi-generator/src/test/java/org/openapitools/codegen/cppboostbeastserver/**" | |
| pull_request: | |
| paths: | |
| - "samples/server/petstore/cpp-boost-beast-server/**" | |
| - ".github/workflows/samples-cpp-boost-beast-server.yaml" | |
| - "modules/openapi-generator/src/main/resources/cpp-boost-beast-server/**" | |
| - "modules/openapi-generator/src/main/resources/cpp-boost-beast-common/**" | |
| - "modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppBoostBeastServer*.java" | |
| - "modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppBoostBeastModelCodegen.java" | |
| - "modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppBoostBeastClientCodegen.java" | |
| - "modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppBoostBeastOperationFacts.java" | |
| - "modules/openapi-generator/src/test/resources/3_1/cpp-boost-beast-server/**" | |
| - "modules/openapi-generator/src/test/java/org/openapitools/codegen/cppboostbeastserver/**" | |
| jobs: | |
| build: | |
| name: Build cpp boost beast server | |
| strategy: | |
| matrix: | |
| sample: | |
| - samples/server/petstore/cpp-boost-beast-server | |
| os: | |
| - ubuntu-latest | |
| - macOS-latest | |
| - windows-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install dependencies (Linux) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential cmake libboost-dev libboost-json-dev libboost-url-dev | |
| - name: Install dependencies (macOS) | |
| if: matrix.os == 'macOS-latest' | |
| run: | | |
| brew install boost cmake | |
| - name: Install dependencies (Windows) | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| vcpkg install boost-asio:x64-windows boost-beast:x64-windows boost-json:x64-windows boost-url:x64-windows boost-multiprecision:x64-windows | |
| shell: cmd | |
| timeout-minutes: 30 | |
| - name: Build | |
| working-directory: ${{ matrix.sample }} | |
| run: | | |
| if [ "${{ matrix.os }}" = "windows-latest" ]; then | |
| cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake" | |
| else | |
| cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=1 | |
| fi | |
| cmake --build build | |
| shell: bash | |
| - name: Set up JDK 17 | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| # The loopback runtime regression compiles the generated contract code | |
| # against the Boost installed above and asserts wire behavior. With the | |
| # require flag set, missing Boost/compilers fail the job instead of | |
| # silently skipping — this leg is the guaranteed execution of that suite. | |
| - name: Run server runtime regression (Linux) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| ./mvnw -pl modules/openapi-generator -am test \ | |
| -Dtest=CppBoostBeastServerRuntimeTest \ | |
| -Dsurefire.failIfNoSpecifiedTests=false \ | |
| -Dcpp.boost.beast.require=true -q | |
| shell: bash |