Skip to content

Commit

Permalink
try adding python workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanhhughes committed Jul 19, 2024
1 parent 6973a8d commit 0d13ae1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/cmake.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
---
# based on https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: "ubuntu-latest: Build and Test"
name: 'ubuntu-latest: Build and Test'
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
# checkout the code
# checkout the code
- uses: actions/checkout@v4
# setup package dependencies
# setup package dependencies
- name: Dependencies
run: |
sudo apt install libgtest-dev libeigen3-dev nlohmann-json3-dev libzmq3-dev python3-dev
# configure repo
# configure repo
- name: Configure
run: |
cmake -B ${{github.workspace}}/build \
-DCMAKE_BUILD_TYPE=Release \
-DSPARK_DSG_BUILD_TESTS=ON \
-DSPARK_DSG_BUILD_PYTHON=ON \
-DSPARK_DSG_BUILD_EXAMPLES=ON
# build repo
# build repo
- name: Build
run: cmake --build ${{github.workspace}}/build --config Release
# run unit tests
# run unit tests
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C Release
30 changes: 30 additions & 0 deletions .github/workflows/python.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: 'python: Build and Test'
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.10']
steps:
# checkout the code
- uses: actions/checkout@v4
# setup python
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# install required deps
- name: Dependencies
run: |
python -m pip install --upgrade pip
sudo apt install libgtest-dev libeigen3-dev nlohmann-json3-dev libzmq3-dev python3-dev
# build and install code
- name: Install
run: python -m pip install ${{github.workspace}}
- name: Test
run: |
pip install pytest
pytest ${{github.workspace}}/python/tests

0 comments on commit 0d13ae1

Please sign in to comment.