From 606c981092845e0d933a741149da63c473eb6be2 Mon Sep 17 00:00:00 2001 From: Francesco Oliva Date: Thu, 4 Jul 2024 12:57:00 +0200 Subject: [PATCH] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index fbf32ec..1f52467 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -8,16 +8,26 @@ on: jobs: build: - runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: configure - run: ./configure - - name: make - run: make - - name: make check - run: make check - - name: make distcheck - run: make distcheck + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y libopencv-dev + if [[ ${{env.USE_GSTREAMER}} == "ON" ]]; then + sudo apt-get install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev + fi + + - name: Configure CMake + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DUSE_GSTREAMER=${{env.USE_GSTREAMER}} + + - name: Build + run: cmake --build ${{github.workspace}}/build --config Release + + - name: Test + working-directory: ${{github.workspace}}/build + run: ctest -C Release +