fix invalidate session #101
Workflow file for this run
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: CI/CD Pipeline | |
| on: | |
| push: | |
| branches: ["main", "develop"] | |
| pull_request: | |
| branches: ["main", "develop"] | |
| env: | |
| BUILD_TYPE: Release | |
| jobs: | |
| test: | |
| name: Build and Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4.1.7 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler build-essential | |
| python3 -m pip install protobuf grpcio-tools | |
| - name: Setup ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: ${{ github.job }}-${{ matrix.os || 'ubuntu-latest' }}-mbedtls-3.6.2 | |
| - name: Set reusable strings | |
| id: strings | |
| shell: bash | |
| run: | | |
| echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
| - name: Configure CMake | |
| run: > | |
| cmake -B ${{ steps.strings.outputs.build-output-dir }} | |
| -DCMAKE_CXX_COMPILER=g++ | |
| -DCMAKE_C_COMPILER=gcc | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| -S ${{ github.workspace }} | |
| - name: Build Library | |
| run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release | |
| - name: Run Tests | |
| working-directory: ${{ steps.strings.outputs.build-output-dir }} | |
| run: ctest --build-config Release --output-on-failure --verbose | |
| - name: Build and run example | |
| run: | | |
| mkdir -p build-example && cd build-example | |
| cmake ../examples/simple -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| cmake --build . --config Release | |
| ./simple |