add github ci14 #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and run tests | ||
on: | ||
workflow_call: | ||
inputs: | ||
use-system-libraries: # the variable you can use in place of a matrix | ||
required: true | ||
type: string | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: conda-incubator/setup-miniconda@v3 | ||
if: ${{ contains(inputs.use-system-libraries, 'ON')}} | ||
with: | ||
auto-update-conda: true | ||
python-version: ${{ matrix.python-version }} | ||
run: | | ||
conda list | ||
- name: build with fetch content | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake .. -DCMAKE_BUILD_TYPE="Debug" -DAARE_PYTHON_BINDINGS="OFF" -DAARE_SYSTEM_LIBRARIES=${{inputs.use-system-libraries}} | ||
cmake --build . -j 10 | ||
- name: run tests | ||
run: | | ||
cd build/ | ||
./run_tests | ||
- name: run examples | ||
run: | | ||
cd build/examples/ | ||
ls *_example | ||
find -name "*_example" | xargs -I {} -n 1 -t bash -c {} | ||