Skip to content

Commit

Permalink
Download more dependencies for ubuntu workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
spirosmaggioros committed Aug 17, 2024
1 parent 649f35c commit 06e332f
Showing 1 changed file with 23 additions and 19 deletions.
42 changes: 23 additions & 19 deletions .github/workflows/ubuntu_test_cases.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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/[email protected]
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 }}

0 comments on commit 06e332f

Please sign in to comment.