Skip to content

Enhancement/enhanced polyhedral gravity model #1595

Enhancement/enhanced polyhedral gravity model

Enhancement/enhanced polyhedral gravity model #1595

Workflow file for this run

name: "Pull Request"
on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pre-commit:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
- id: file_changes
uses: tj-actions/changed-files@v44
- uses: pre-commit/[email protected]
with:
extra_args: --files ${{ steps.file_changes.outputs.all_changed_files}}
build-linux:
name: Linux 20.04
strategy:
matrix:
python-version: [3.8, 3.9]
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install build-essential swig cmake -y
sudo apt-get install python${{ matrix.python-version }}-venv -y
- name: Create virtual environment and install packages
run: |
python3 -m venv .venv
source .venv/bin/activate
pip install wheel 'conan<2.0'
- name: Build basilisk
run: |
source .venv/bin/activate
python3 conanfile.py
- name: Run Python Tests
if: ${{ always() }}
run: |
source .venv/bin/activate
cd src && pytest -n auto -m "not ciSkip"
- name: Run C/C++ Tests
if: ${{ always() }}
working-directory: ./dist3
run: ctest
build-linux-3-10:
name: Linux 22.04
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: "Install swig and cmake"
run: sudo apt-get update && sudo apt-get install build-essential swig cmake -y
- name: "Install python packages"
run: sudo apt-get install python3-setuptools python3-tk python3.10-venv
- name: "Create virtual Environment"
run: python3 -m venv .venv
- name: "Install wheel and conan package"
run: source .venv/bin/activate && pip3 install wheel 'conan<2.0.0'
- name: "Build basilisk"
run: source .venv/bin/activate && python3 conanfile.py
- name: "Run Python Tests"
run: |
source .venv/bin/activate
cd src && pytest -n auto -m "not ciSkip"
- name: "Run C/C++ Tests"
working-directory: ./dist3
run: ctest
if: ${{ always() }}
build-linux-3-11:
name: Linux Latest opNav
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: "Install swig and cmake"
run: sudo apt-get update && sudo apt-get install build-essential swig libgtk2.0 cmake -y
- name: "Install python packages"
run: sudo apt-get install python3-setuptools python3-tk python3.11-venv
- name: "Create virtual Environment"
run: python3 -m venv .venv
- name: "Install wheel and conan package"
run: source .venv/bin/activate && pip3 install wheel 'conan<2.0.0'
- name: "Build basilisk"
run: source .venv/bin/activate && python3 conanfile.py --opNav True
- name: "Run Python Tests"
run: |
source .venv/bin/activate
cd src && pytest -n auto -m "not ciSkip"
- name: "Run C/C++ Tests"
working-directory: ./dist3
run: ctest
if: ${{ always() }}
build-linux-3-11-pip:
name: Linux 22.04 pip
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.11"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: "Install swig and cmake"
run: sudo apt-get update && sudo apt-get install build-essential swig cmake -y
- name: "Install python packages"
run: sudo apt-get install python3-setuptools python3-tk python3.11-venv
- name: "Create virtual Environment"
run: python3 -m venv .venv
- name: "Build basilisk"
run: |
source .venv/bin/activate
pip install . -v
- name: "Run Python Tests"
run: |
source .venv/bin/activate
cd src && pytest -n auto -m "not ciSkip"
build-windows:
name: Windows opNav
runs-on: windows-2019
strategy:
matrix:
python-version: ["3.11"]
env:
MPLBACKEND: agg
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Choco help
uses: crazy-max/ghaction-chocolatey@v3
with:
args: -h
- name: "Install swig and cmake"
shell: pwsh
run: choco install swig cmake -y
- name: "Create python virtual env"
shell: pwsh
run: python -m venv venv
- name: "Install wheel and conan package"
shell: pwsh
run: |
venv\Scripts\activate
pip install wheel 'conan<2.0'
- name: "Add basilisk and cmake path to env path"
shell: pwsh
run: |
$oldpath = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path
$newpath = “$oldpath;${{ env.GITHUB_WORKSPACE }}\dist3\Basilisk;C:\Program Files\CMake\bin”
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $newPath
- name: "Build basilisk"
shell: pwsh
run: |
venv\Scripts\activate
python conanfile.py --opNav True
- name: "Run Python Tests"
shell: pwsh
run: |
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name MPLBACKEND -Value ${MPLBACKEND}
venv\Scripts\activate
cd src
pytest -n auto -m "not ciSkip"
if(($LastExitCode -ne 0) -and ($LastExitCode -ne 5)) {exit 1}
- name: "C/C++ Tests"
if: ${{ always() }}
shell: pwsh
run: |
cd dist3
ctest
if(($LastExitCode -ne 0) -and ($LastExitCode -ne 5)) {exit 1}
build-macOS:
name: macOS opNav Docs
runs-on: macos-14
strategy:
matrix:
python-version: [ "3.11" ]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Homebrew
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install swig doxygen
- name: "Create virtual Environment"
run: python3 -m venv .venv
- name: "Install wheel and conan package"
run: |
source .venv/bin/activate
pip3 install wheel 'conan<2.0' cmake
- name: "Build basilisk with OpNav"
run: source .venv/bin/activate && python3 conanfile.py --opNav True --allOptPkg
- name: "Run Python Tests"
run: |
source .venv/bin/activate
cd src
pytest -n auto -m "not ciSkip"
if: ${{ always() }}
- name: "Run C/C++ Tests"
working-directory: ./dist3
run: ctest -C Release
if: ${{ always() }}
- name: "Build Documentation"
run: |
source .venv/bin/activate
cd docs
make html SPHINXOPTS="-W"
if: ${{ always() }}
build-macOS-no-vizInterface:
name: macOS no vizInterface
runs-on: macos-14
strategy:
matrix:
python-version: [ "3.11" ]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Homebrew
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install swig
- name: "Create virtual Environment"
run: python3 -m venv .venv
- name: "Install wheel and conan package"
run: |
source .venv/bin/activate
pip3 install wheel 'conan<2.0' cmake
- name: "Build basilisk without vizInterface"
run: source .venv/bin/activate && python3 conanfile.py --vizInterface False
- name: "Run Python Tests"
run: |
source .venv/bin/activate
cd src
pytest -n auto -m "not ciSkip"
if: ${{ always() }}