Skip to content

#52 Allow datatype conversion when reading ndarray data #142

#52 Allow datatype conversion when reading ndarray data

#52 Allow datatype conversion when reading ndarray data #142

Workflow file for this run

name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
inputs:
make_flags:
description: Extra flags to pass to make
required: false
default: ''
jobs:
build-and-test:
name: Build and run `make check`
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
cc: clang
asan: no
- os: ubuntu-latest
cc: gcc
asan: no
- os: ubuntu-latest
cc: gcc
asan: yes
- os: ubuntu-latest
cc: clang
asan: no
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: true
- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
autoconf \
automake \
libtool \
build-essential \
libfyaml-dev
if [ "${{ matrix.cc }}" = "clang" ]; then
sudo apt-get install -y clang
fi
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew update
brew install \
autoconf \
automake \
libtool \
argp-standalone \
libfyaml
- name: Bootstrap autotools
run: ./autogen.sh
- name: Configure
run: |
CONFIGURE_FLAGS=""
if [ "${{ matrix.asan }}" = "yes" ]; then
CONFIGURE_FLAGS="--with-asan"
fi
./configure CC=${{ matrix.cc }} $CONFIGURE_FLAGS
- name: Build
run: make ${{ github.event.inputs.make_flags }}
- name: Check
run: make check ${{ github.event.inputs.make_flags }}
- name: Output test logs on failure
if: failure()
run: |
tail -n +1 tests/*.log
tail -n +1 tests/tmp/*.out.txt
- name: Dist
run: make dist ${{ github.event.inputs.make_flags }}
- name: Dist check
run: make distcheck ${{ github.event.inputs.make_flags }}
# Test the documentation build if the build passes
docs:
name: 'Build documentation'
runs-on: ubuntu-latest
needs: build-and-test
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: true
- name: Install documentation dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
autoconf \
automake \
libtool \
build-essential \
libclang-dev \
libfyaml-dev \
llvm \
python3-sphinx \
python3-clang
# Don't use docs/requirements.txt here since we are trying with the
# system packages for sphinx and clang
pip install furo hawkmoth
- name: Set LD_LIBRARY_PATH
run: echo "LD_LIBRARY_PATH=$(llvm-config --libdir):$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: Bootstrap autotools
run: ./autogen.sh
- name: Configure
run: |
./configure --enable-docs
- name: Build Sphinx documentation
run: make docs SPHINX_FLAGS=-W