From 06e332fa33dd8fe34ed67a9151b7ae2db015fd56 Mon Sep 17 00:00:00 2001 From: Spiros Maggioros Date: Sat, 17 Aug 2024 20:07:44 +0300 Subject: [PATCH] Download more dependencies for ubuntu workflow --- .github/workflows/ubuntu_test_cases.yml | 42 ++++++++++++++----------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ubuntu_test_cases.yml b/.github/workflows/ubuntu_test_cases.yml index d5431d37..fe2366b4 100644 --- a/.github/workflows/ubuntu_test_cases.yml +++ b/.github/workflows/ubuntu_test_cases.yml @@ -1,5 +1,3 @@ -# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage. -# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml name: ubuntu-test-cases on: @@ -14,44 +12,50 @@ env: jobs: build: - # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. - # You can convert this to a matrix build if you need cross-platform coverage. - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Download requirements - run: sudo pip3 install xcrun && sudo pip3 install gcovr && sudo apt-get update && sudo apt-get install lcov libxrandr-dev libxcursor-dev libudev-dev libopenal-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev freeglut3-dev # OpenGL dependencies only needed for SFML + - name: Install dependencies - run: pip install -r requirements.txt + run: | + sudo apt-get update + sudo apt-get install -y \ + lcov \ + libxrandr-dev \ + libxcursor-dev \ + libudev-dev \ + libopenal-dev \ + libflac-dev \ + libvorbis-dev \ + libgl1-mesa-dev \ + libegl1-mesa-dev \ + freeglut3-dev \ + cmake \ + g++ \ + python3-pip + - name: Install newer clangd run: | wget https://apt.llvm.org/llvm.sh chmod +x ./llvm.sh sudo ./llvm.sh 17 + - name: Configure CMake - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_CXX_STANDARD=20 -DENABLE_COVERAGE=true + - name: Build - # Build your program with the given configuration run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + - name: Test working-directory: ${{github.workspace}}/build - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest --output-on-failure + - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4.0.1 with: token: ${{ secrets.CODECOV_TOKEN }} slug: CSRT-NTUA/AlgoPlus - - name: Upload to codecov - run: bash <(curl -s https://codecov.io/bash) + - name: clang-tidy run: bash clang_tidy.sh - #- name: get coverage - # run: make coverage - #- name: Run tests and collect coverage - # run: pytest --cov build/tests ${{ env.CODECOV_ATS_TESTS }}