Skip to content

Generate wheels for ubuntu-latest on PR merge into develop #1551

Generate wheels for ubuntu-latest on PR merge into develop

Generate wheels for ubuntu-latest on PR merge into develop #1551

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() }}
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9]
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 cibuildwheel
run: python -m pip install cibuildwheel==2.21.1
- name: "Install swig and cmake"
run: sudo apt-get update && sudo apt-get install build-essential swig cmake gcc g++ libstdc++6 -y
- name: check versions of stuff
run: strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
- name: try some symlinks
run: sudo ln -sf /usr/lib/gcc/x86_64-linux-gnu/10/libstdc++.so.6 /usr/lib/libstdc++.so.6 && export LD_LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/10:$LD_LIBRARY_PATH
- name: check protoc
run: ldd /root/.conan/data/protobuf/3.17.1/_/_/package/53f76f058631e1c3a500008c75af3f37d7786131/bin/protoc
- name: "Install python packages"
run: sudo apt-get install python3-setuptools python3-tk
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
# to supply options, put them in 'env', like:
# env:
# CIBW_SOME_OPTION: value
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl