Skip to content

failed to build under linux #275

failed to build under linux

failed to build under linux #275

Workflow file for this run

name: NGL Linux
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
env:
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.8'
- name : Add System Packages
run : |
sudo apt-get update
sudo apt-get -y install libxinerama-dev libxcursor-dev xorg-dev libglu1-mesa-dev
- name: install vcpkg
run : |
git clone --depth 1 https://github.com/microsoft/vcpkg ~/vcpkg
cd ~/vcpkg
./bootstrap-vcpkg.sh
# ./vcpkg install glfw3 gl3w gtest fmt freetype glm rapidjson rapidxml
- name: install gcovr 5.0
run: |
pip install gcovr==5.0 # 5.1 is not supported
- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@v1
- name: Run build-wrapper
run: |
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake -DNO_OIIO=1 -DADD_COVERAGE=1 -DVCPKG_MANIFEST_DIR=./manifest/ci/ -DCMAKE_INSTALL_PREFIX:PATH=/tmp/NGL/
cmake --build build/ --target clean
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build build/ --config Release
cmake --build build/ --target install
- name: Test
run: |
cd build
./NGLTests -g
cd ..
- name: Collect coverage into one XML report
run: |
gcovr --sonarqube --exclude-unreachable-branches --exclude-throw-branches > coverage.xml
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Put the name of your token here
run: |
sonar-scanner \
--define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" \
--define sonar.coverageReportPaths=coverage.xml