name: Samples c libcurl client

on:
  push:
    paths:
      - 'samples/client/petstore/c/**'
  pull_request:
    paths:
      - 'samples/client/petstore/c/**'

jobs:
  build:
    name: Build c libcurl client
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Prepare
        run: |
          sudo apt-get update
          sudo apt-get install -y libssl-dev libcurl4-openssl-dev
      - name: Build
        working-directory: "samples/client/petstore/c"
        run: |
          mkdir build
          cd build
          cmake ..
          make
