Skip to content

Bug/272 reaction wheel no max torque ends sim no error #2008

Bug/272 reaction wheel no max torque ends sim no error

Bug/272 reaction wheel no max torque ends sim no error #2008

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-22.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/action@v3.0.1
with:
extra_args: --files ${{ steps.file_changes.outputs.all_changed_files}}
build-linux-3-10:
name: Linux 22.04
runs-on: ubuntu-22.04
timeout-minutes: 75
strategy:
matrix:
python-version: ["3.8", "3.9", "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 requirements_dev.txt"
run: source .venv/bin/activate && pip3 install -r requirements_dev.txt
- 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" -rs
- name: "Run C/C++ Tests"
working-directory: ./dist3
run: ctest
if: ${{ always() }}
build-linux-3-11:
name: Linux 22.04 All Tests
runs-on: ubuntu-22.04
timeout-minutes: 75
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 cmake"
run: sudo apt-get update && sudo apt-get install build-essential libgtk2.0 cmake -y
- name: Install SWIG 4.2.1
uses: mmomtchev/setup-swig@v3
with:
version: v4.2.1
- 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 requirements_dev.txt"
run: source .venv/bin/activate && pip3 install -r requirements_dev.txt pytest-error-for-skips
- name: "Build basilisk"
run: source .venv/bin/activate && python3 conanfile.py --opNav True --mujoco True --mujocoReplay True
- name: "Run Python Tests"
run: |
source .venv/bin/activate
cd src && pytest -n auto -m "not ciSkip" -rs --error-for-skips
- 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
timeout-minutes: 75
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
bskLargeData
- name: "Run Python Tests"
run: |
source .venv/bin/activate
pip install pytest pytest-xdist
cd src && pytest -n auto -m "not ciSkip" -rs
build-windows:
name: Windows All Tests
runs-on: windows-2019
timeout-minutes: 75
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: "Install SWIG 4.2.1"
shell: pwsh
run: |
$swigDir = "C:\Program Files\SWIG"
if (!(Test-Path $swigDir)) {New-Item -ItemType Directory -Path $swigDir | Out-Null}
$swigZip = "$swigDir\swigwin-4.2.1.zip"
$swigUrl = "https://sourceforge.net/projects/swig/files/swigwin/swigwin-4.2.1/swigwin-4.2.1.zip/download"
Start-Process -NoNewWindow -Wait -FilePath "curl.exe" -ArgumentList "-L -o `"$swigZip`" `"$swigUrl`""
if (!(Test-Path $swigZip) -or ((Get-Item $swigZip).Length -lt 500KB)) { Write-Host "Download failed or file is corrupted." }
Expand-Archive -Path $swigZip -DestinationPath $swigDir -Force
- name: "Create python virtual env"
shell: pwsh
run: python -m venv venv
- name: "Install requirements_dev.txt"
shell: pwsh
run: |
venv\Scripts\activate
pip install -r requirements_dev.txt pytest-error-for-skips
- name: "Add basilisk, swig, 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 = “C:\Program Files\SWIG\swigwin-4.2.1;$oldpath;${{ env.GITHUB_WORKSPACE }}\dist3\Basilisk;C:\Program Files\CMake\bin”
echo "PATH=$newPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: "Build basilisk"
shell: pwsh
run: |
venv\Scripts\activate
python conanfile.py --opNav True --mujoco True --mujocoReplay 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" -rs --error-for-skips
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 All Tests Docs
runs-on: macos-latest
timeout-minutes: 75
strategy:
matrix:
python-version: [ "3.11", "3.12" ]
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 requirements_dev.txt"
run: |
source .venv/bin/activate
pip3 install cmake -r requirements_dev.txt pytest-error-for-skips
- name: "Build basilisk with OpNav"
run: source .venv/bin/activate && python3 conanfile.py --opNav True --allOptPkg --mujoco True --mujocoReplay True
- name: "Run Python Tests"
run: |
source .venv/bin/activate
cd src
pytest -n auto -m "not ciSkip" -rs --error-for-skips
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-latest
timeout-minutes: 75
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 requirements_dev.txt"
run: |
source .venv/bin/activate
pip3 install cmake -r requirements_dev.txt
- 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" -rs
if: ${{ always() }}