Skip to content

Add Python pybind11 bindings + Upgrade ci/cd #56

Add Python pybind11 bindings + Upgrade ci/cd

Add Python pybind11 bindings + Upgrade ci/cd #56

Workflow file for this run

name: "cpp"
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build and test cpp
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
cc: gcc
cxx: g++
- os: ubuntu-22.04
cc: gcc
cxx: g++
env_list: EMSCRIPTEN=ON
- os: ubuntu-22.04
cc: clang
cxx: clang++
- os: ubuntu-22.04
cc: gcc
cxx: g++
cmake_args: "-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS='-march=native'"
- os: macos-latest
cc: clang
cxx: clang++
- os: windows-latest
cc: ''
cxx: ''
runs-on: ${{ matrix.os }}
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
CMAKE_ARGS: ${{ matrix.cmake_args }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
# - name: install mingw & deps
# uses: msys2/setup-msys2@v2
# with:
# update: true
# install: >-
# git
# make
# pacboy: >-
# toolchain:p
# cmake:p
# ninja:p
# if: matrix.os == 'windows-latest'
- name: Set environment list variables
run: |
env_vars="${{ matrix.env_list }}"
for var in $env_vars; do
echo "$var" >> $GITHUB_ENV
done
if: matrix.os != 'windows-latest'
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.16.x'
- uses: seanmiddleditch/gha-setup-ninja@master
- name: build and test
run: |
mkdir build && cd build
cmake $CMAKE_ARGS -G Ninja -Dmmtf_build_examples=ON -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=debug ..
ninja
./tests/mmtf_tests
./tests/multi_cpp_test
./examples/mmtf_demo ../submodules/mmtf_spec/test-suite/mmtf/173D.mmtf
./examples/traverse ../submodules/mmtf_spec/test-suite/mmtf/173D.mmtf
./examples/traverse ../submodules/mmtf_spec/test-suite/mmtf/173D.mmtf json
./examples/traverse ../submodules/mmtf_spec/test-suite/mmtf/173D.mmtf print
./examples/print_as_pdb ../submodules/mmtf_spec/test-suite/mmtf/173D.mmtf