Skip to content

Fix bug in ObjWavefront get_int_array where indices were not decremen… #130

Fix bug in ObjWavefront get_int_array where indices were not decremen…

Fix bug in ObjWavefront get_int_array where indices were not decremen… #130

Workflow file for this run

name: Test of package installation & execution
'on':
push:
branches-ignore:
- gh-pages
tags:
- '*'
schedule:
- cron: 0 10 * * 1
- cron: 0 10 1 * *
jobs:
build_pip:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-install: [pip]
python-version: ["3.11"]
with-yggdrasil: [true]
configuration: [Debug]
include:
- os: ubuntu-latest
python-install: pip
python-version: "3.11"
with-yggdrasil: false
configuration: Debug
- os: ubuntu-latest
python-install: pip
python-version: "3.11"
with-yggdrasil: true
configuration: Release
fail-fast: false
steps:
- name: Check out repository code
uses: actions/checkout@v5
with:
submodules: true
# - name: Patch gtest
# run: |
# cd thirdparty/gtest
# git apply ../gtest.patch
# cd ../..
- name: Install dependencies on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libc6-dbg gdb valgrind
sudo apt upgrade --fix-missing
valgrind --version
# sudo apt autoremove -y
# sudo apt autoclean -y
- name: Install dependencies on MacOS
if: matrix.os == 'macos-latest'
run: |
brew install doxygen
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Check Python environment variables
shell: bash -l {0}
run: |
echo "pythonLocation=${pythonLocation}"
echo "Python3_ROOT_DIR=${Python3_ROOT_DIR}"
- name: Fix Python path on mac
if: matrix.os == 'macos-latest'
run: |
tee -a ~/.profile <<<'export PATH="${pythonLocation}/bin:${PATH}"'
- name: Install Python dependencies
run: python -m pip install -r requirements.txt
- name: Check for numpy
run: |
python -c "import sys; print(sys.executable)"
python -c "import numpy; print(numpy.get_include())"
- name: Configure w/o yggdrasil extension
if: matrix.with-yggdrasil != true
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DDISABLE_YGGDRASIL_RAPIDJSON=ON
- name: (WINDOWS) Configure w/ yggdrasil
if: matrix.os == 'windows-latest' && matrix.with-yggdrasil
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DPython3_ROOT_DIR=$env:pythonLocation -DYGGDRASIL_RAPIDJSON_SCHEMA_TESTS=ON
- name: (UNIX) Configure w/ yggdrasil
if: matrix.os != 'windows-latest' && matrix.with-yggdrasil
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DPython3_ROOT_DIR=${pythonLocation} -DYGGDRASIL_RAPIDJSON_ENABLE_INSTRUMENTATION_OPT=OFF -DYGGDRASIL_RAPIDJSON_SCHEMA_TESTS=ON -DYGGDRASIL_RAPIDJSON_BUILD_THIRDPARTY_GTEST=ON
- name: Build
run: |
cd build
cmake --build . --config ${{ matrix.configuration }}
- name: Test
run: |
cd build
ctest -C ${{ matrix.configuration }} --output-on-failure --verbose
build_conda:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-install: [conda]
python-version: [3.11]
with-yggdrasil: [true]
configuration: [Debug]
fail-fast: false
defaults:
run:
shell: bash -l {0}
steps:
- name: Check out repository code
uses: actions/checkout@v5
with:
submodules: true
# - name: Patch gtest
# run: |
# cd thirdparty/gtest
# git apply ../gtest.patch
# cd ../..
- name: Set up MSVC Compiler on windows
uses: ilammy/msvc-dev-cmd@v1
if: matrix.os == 'windows-latest'
with:
toolset: 14.0
- name: Set up miniconda test environment
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: rapidjson
environment-file: environment.yml
auto-update-conda: true
channels: conda-forge
channel-priority: strict
miniforge-version: latest
use-mamba: true
python-version: ${{ matrix.python-version }}
- name: Install packages not current on conda-forge (gcovr)
run: |
pip install gcovr
- name: Check for numpy
run: |
python -c "import sys; print(sys.executable)"
python -c "import numpy; print(numpy.get_include())"
- name: Check conda environment
run: |
mamba info
mamba list
- name: Configure w/o yggdrasil extension
if: matrix.with-yggdrasil != true
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DDISABLE_YGGDRASIL_RAPIDJSON=ON
- name: (WINDOWS) Configure w/ yggdrasil
if: matrix.os == 'windows-latest' && matrix.with-yggdrasil
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DYGGDRASIL_RAPIDJSON_ENABLE_COVERAGE=ON
- name: (UNIX) Configure w/ yggdrasil
if: matrix.os != 'windows-latest' && matrix.with-yggdrasil
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DYGGDRASIL_RAPIDJSON_ENABLE_COVERAGE=ON -DYGGDRASIL_RAPIDJSON_SCHEMA_TESTS=ON -DYGGDRASIL_RAPIDJSON_CREATE_METASCHEMA=ON
- name: Build
run: |
cd build
cmake --build . --config ${{ matrix.configuration }}
- name: Test
run: |
cd build
ctest -C ${{ matrix.configuration }} --output-on-failure --verbose
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
name: ${{ matrix.os }}-${{ matrix.python-install }}
token: ${{ secrets.CODECOV_TOKEN }}
file: build/coverage/coverage.info
# directory: build/Testing/CoverageInfo
functionalities: gcov
all_tests_passed:
runs-on: ubuntu-latest
name: All tests passed
needs: [build_pip, build_conda]
if: always()
steps:
- name: All tests ok
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Some tests failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1