Skip to content

expose igraph_type

expose igraph_type #37

Workflow file for this run

name: Build and test
on: [push, pull_request]
env:
CMAKE_COLOR_DIAGNOSTICS: ON
ASAN_OPTIONS: detect_stack_use_after_return=1:detect_leaks=1:color=always
UBSAN_OPTIONS: print_stacktrace=1:color=always
CCACHE_DIR: ${{ github.workspace }}/ccache
CCACHE_MAXSIZE: 128M
IGRAPH_VERSION: 0.10.13
jobs:
build:
runs-on: ubuntu-24.04
steps:
- name: Install igraph dependencies
run: sudo apt-get install ccache libglpk-dev libarpack2-dev
- name: Ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
ccache-${{ github.ref_name }}-
ccache-
- name: Download and build igraph
run: |
cd ${{ github.workspace }}
wget https://github.com/igraph/igraph/releases/download/$IGRAPH_VERSION/igraph-$IGRAPH_VERSION.tar.gz
tar xfz igraph-$IGRAPH_VERSION.tar.gz
cd igraph-$IGRAPH_VERSION
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/local -DBUILD_SHARED_LIBS=ON -DUSE_SANITIZER=Address -DCMAKE_BUILD_TYPE=Debug
cmake --build . --parallel
cmake --install .
- name: Checkout igraph-cpp
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create build environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure
working-directory: ${{github.workspace}}/build
run: |
cmake .. -DCMAKE_PREFIX_PATH=$HOME/local -DCMAKE_CXX_FLAGS="-fsanitize=address -fsanitize=undefined -g -fno-omit-frame-pointer"
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --parallel
- name: Test
run: ctest -j $(nproc) --output-on-failure --timeout 180
working-directory: ${{github.workspace}}/build