Skip to content

Commit

Permalink
feature(#315): Support python 3.10
Browse files Browse the repository at this point in the history
- Preliminary
  • Loading branch information
jharwell committed Aug 26, 2024
1 parent 0588c2b commit 0734765
Show file tree
Hide file tree
Showing 29 changed files with 492 additions and 435 deletions.
79 changes: 59 additions & 20 deletions .github/actions/sample-project-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ runs:
working-directory: ../../
run: |
if [ ! -d sierra-sample-project ]; then
git clone https://github.com/swarm-robotics/sierra-sample-project.git
git clone https://github.com/jharwell/sierra-sample-project.git
cd sierra-sample-project
else
cd sierra-sample-project
Expand All @@ -41,13 +41,34 @@ runs:
# dependencies these packages requires manual intervention to fix, and I
# don't have a mac.
if [ "${{ runner.os }}" == "macOS" ]; then
brew install pkg-config cmake libpng freeimage lua qt \
docbook asciidoc graphviz doxygen|| true
brew install \
pkg-config \
cmake \
libpng \
freeimage \
lua \
qt \
docbook \
asciidoc \
graphviz \
doxygen \
|| true
elif [ "${{ runner.os }}" == "Linux" ]; then
sudo apt-get update
sudo apt-get install cmake libfreeimage-dev libfreeimageplus-dev \
qt5-default freeglut3-dev libxi-dev libxmu-dev liblua5.3-dev \
lua5.3 doxygen graphviz libgraphviz-dev asciidoc
sudo apt-get install -y \
cmake \
libfreeimage-dev \
libfreeimageplus-dev \
qtbase5-dev \
freeglut3-dev \
libxi-dev \
libxmu-dev \
liblua5.3-dev \
lua5.3 \
doxygen \
graphviz \
libgraphviz-dev \
asciidoc
fi
- name: Install ARGoS
Expand Down Expand Up @@ -86,24 +107,42 @@ runs:
working-directory: ../..
shell: bash
run: |
sudo apt-get install ros-${{ inputs.rosdistro }}-desktop-full
sudo apt-get install ros-${{ inputs.rosdistro }}-turtlebot3-description
sudo apt-get install ros-${{ inputs.rosdistro }}-turtlebot3-msgs
sudo apt-get install ros-${{ inputs.rosdistro }}-turtlebot3-gazebo
sudo apt-get install ros-${{ inputs.rosdistro }}-turtlebot3-bringup
sudo apt-get install python${{ matrix.python-version }} python${{ matrix.python-version }}-dev
sudo apt-get install python${{ matrix.python-version }}-venv python3-apt
sudo apt-get install python3-pip python3-cairo intltool python3-wheel python3-rospkg python3-empy
sudo apt-get install -y \
ros-${{ inputs.rosdistro }}-desktop-full \
ros-${{ inputs.rosdistro }}-turtlebot3-description \
ros-${{ inputs.rosdistro }}-turtlebot3-msgs \
ros-${{ inputs.rosdistro }}-turtlebot3-gazebo \
ros-${{ inputs.rosdistro }}-turtlebot3-bringup \
python${{ matrix.python-version }} \
python${{ matrix.python-version }}-dev \
python${{ matrix.python-version }}-venv \
python3-apt \
python3-pip \
python3-cairo \
intltool \
python3-wheel \
python3-rospkg \
python3-empy
# 2023/1/18: You still need install these even after installing stuff
# with apt AND if the sysem python matches your current python. I don't
# know why.
pip3 install empy
pip3 install rospkg wheel pyparsing pyqt5
pip3 install pyqt5 pysip numpy rospkg
pip3 install matplotlib pyyaml psutil
pip3 install pysip defusedxml pyparsing pydev
pip3 install pyopengl opencv-python
pip3 install empy \
rospkg \
wheel \
pyparsing \
pyqt5 \
pysip \
numpy \
matplotlib \
pyyaml \
psutil \
defusedxml \
pyparsing \
pydev \
pyopengl \
opencv-python
- name: Install SIERRA ROSBridge dependency (ubuntu)
if: inputs.platform == 'ros1gazebo'
Expand Down
13 changes: 7 additions & 6 deletions .github/actions/sierra-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ runs:
# Ubuntu setup
############################################################################
- name: Setup python (ubuntu)
uses: actions/setup-python@v4
uses: actions/setup-python@v5
if: runner.os == 'Linux'
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -26,8 +26,9 @@ runs:
shell: bash
run: |
sudo apt-get update
sudo apt-get install parallel cm-super texlive-fonts-recommended
sudo apt-get install texlive-latex-extra dvipng pssh ffmpeg xvfb
sudo apt-get install parallel cm-super texlive-fonts-recommended -y
sudo apt-get install texlive-latex-extra dvipng pssh ffmpeg xvfb -y
python3 -m pip install --upgrade pip
python3 -m pip install wheel
Expand All @@ -36,7 +37,7 @@ runs:
############################################################################

- name: Setup python (OSX)
uses: actions/setup-python@v4
uses: actions/setup-python@v5
if: runner.os == 'macOS'
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -55,8 +56,8 @@ runs:
brew update && brew install parallel pssh ffmpeg
brew update && brew install --cask mactex
brew update && brew install --cask xquartz
python -m pip install --upgrade pip
python -m pip install wheel
python3 -m pip install --upgrade pip
python3 -m pip install wheel
############################################################################
# SIERRA install
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Static Analysis Top-level

# Run:
#
# - Every month. Scheduling helps keep drift/issues with updates
# to runners at bay.
# - On pushes.
on:
push:
paths:
- 'sierra/**'

schedule:
- cron: '0 0 1 * *'

jobs:
analyze-ci-ubuntu-2004:
uses: ./.github/workflows/analyze-nox.yml
secrets: inherit
with:
os: ubuntu-20.04

analyze-ci-ubuntu-2204:
uses: ./.github/workflows/analyze-nox.yml
secrets: inherit
with:
os: ubuntu-22.04

analyze-ci-osx:
uses: ./.github/workflows/analyze-nox.yml
secrets: inherit
with:
os: macos-12
43 changes: 43 additions & 0 deletions .github/workflows/analyze-nox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: OS Static Analysis

on:
workflow_call:
inputs:
os:
required: True
type: string

jobs:
nox:
runs-on: ${{ inputs.os }}
strategy:
matrix:
os:
- ${{ inputs.os }}

# 2024/08/26: Test the earliest and latest supported version, to speed
# up CI.
python-version:
- 3.8
- '3.10'

session:
- lint
- docs
- analyze_pytype
- analyze_mypy

exclude:
- python-version: '3.10'
os: ubuntu-20.04

- python-version: 3.8
os: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/sierra-setup

- name: Run nox
run: |
nox --pythons ${{ matrix.python-version }} --sessions ${{ matrix.session }}
Loading

0 comments on commit 0734765

Please sign in to comment.