Skip to content

include tests in ci.yml #88

include tests in ci.yml

include tests in ci.yml #88

Workflow file for this run

name: kdsource
on:
- push
- pull_request
name: clang-format Check

Check failure on line 7 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

You have an error in your yaml syntax on line 7
on: [push, pull_request]
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run clang-format style check for C/C++/Protobuf programs.
uses: cpp-linter/cpp-linter-action@v2
with:
clang-format-version: '15'
check-path: 'src'
extensions: 'c,h'
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- {
name: "Ubuntu_Latest",
os: ubuntu-latest,
python-version: 3.9,
}
- {
name: "MacOS_13",
os: macos-13,
python-version: 3.9,
}
steps:
- uses: actions/checkout@master
with:
submodules: 'true'
- name: Install and test C API on Ubuntu
if: startsWith(matrix.config.name, 'Ubuntu')
run: |
sudo apt-get update
sudo apt-get install cmake libxml2
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/share/KDSource
make
make test
make install
cd ..
export PATH=$PATH:/usr/share/KDSource/bin
kdtool -h
kdtool resample -h
- name: Install and test C API on MacOS
if: startsWith(matrix.config.name, 'MacOS')
run: |
brew update
brew install cmake libxml2
mkdir build
cd build
mkdir /Users/runner/work/KDSource/KDinstall
cmake .. -DCMAKE_INSTALL_PREFIX=/Users/runner/work/KDSource/KDinstall
make
make test
make install
cd ..
export PATH=$PATH:/Users/runner/work/KDSource/KDinstall/bin
kdtool -h
kdtool resample -h
- name: Set up Python ${{ matrix.config.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.config.python-version}}
- name: Install tox
run: pip install tox tox-gh-actions
- name: Test with tox
run: tox -r -c python