Skip to content

Commit

Permalink
Merge pull request #19 from robotpy/2022
Browse files Browse the repository at this point in the history
  • Loading branch information
auscompgeek committed Jan 16, 2022
2 parents b239df7 + 3b0442d commit 5f35d5b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 187 deletions.
191 changes: 10 additions & 181 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,184 +10,13 @@ on:
- '*'

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable

#
# Build native wheels
#

build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-18.04]
python_version: [3.6, 3.7, 3.8, 3.9]
architecture: [x86, x64]
exclude:
- os: macos-latest
architecture: x86
- os: ubuntu-18.04
architecture: x86

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
architecture: ${{ matrix.architecture }}

- uses: robotpy/build-actions/install-robotpy-build@v2021
- uses: robotpy/build-actions/install-build-deps@v2021
- uses: robotpy/build-actions/build-wheel@v2021
- uses: robotpy/build-actions/test-native-wheel@v2021

- uses: robotpy/build-actions/validate-sphinx@v2021
if: ${{ matrix.python_version == '3.7' && matrix.os == 'ubuntu-18.04' }}

- uses: actions/upload-artifact@v2
with:
name: "dist-${{ matrix.os }}"
path: dist

#
# Build roboRIO/raspbian wheels
#

cross-build:
runs-on: ubuntu-latest
strategy:
matrix:
os:
- container: robotpy/roborio-cross-ubuntu:2021.3
name: roborio
- container: robotpy/raspbian-cross-ubuntu:2021.3
name: raspbian

container:
image: "${{ matrix.os.container }}"

steps:
- uses: actions/checkout@v2

- uses: robotpy/build-actions/install-robotpy-build@v2021
with:
python: /build/venv/bin/cross-python
- uses: robotpy/build-actions/install-build-deps@v2021
with:
python: /build/venv/bin/cross-python
wheeldir: ${{ matrix.os.name }}
- uses: robotpy/build-actions/build-wheel@v2021
with:
python: /build/venv/bin/cross-python

- uses: actions/upload-artifact@v2
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
with:
name: dist-${{ matrix.os.name }}
path: dist

#
# Publish wheels to robotpy site, pypi
#

publish-rpyrepo:
runs-on: ubuntu-latest
needs: [check, build, cross-build]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')

steps:

#
# RoboRIO wheel
#

- uses: actions/download-artifact@v2
with:
name: dist-roborio
path: dist-roborio/

- uses: robotpy/github-action-scp@atomic
with:
local: dist-roborio
remote: public_html/2021/roborio
host: narya.tortall.net
username: ${{ secrets.SSH_USER }}
privateKey: ${{ secrets.SSH_KEY }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
atomicPut: true

#
# Raspbian wheel
#

- uses: actions/download-artifact@v2
with:
name: dist-raspbian
path: dist-raspbian/

- uses: robotpy/github-action-scp@atomic
with:
local: dist-raspbian
remote: public_html/2021/raspbian
host: narya.tortall.net
username: ${{ secrets.SSH_USER }}
privateKey: ${{ secrets.SSH_KEY }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
atomicPut: true


publish-pypi:
runs-on: ubuntu-latest
needs: [check, build, cross-build]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')

steps:
- uses: actions/checkout@v2

- uses: actions/download-artifact@v2
with:
name: dist-windows-latest
path: dist/

- uses: actions/download-artifact@v2
with:
name: dist-macos-latest
path: dist/

- uses: actions/download-artifact@v2
with:
name: dist-ubuntu-18.04
path: dist/

- uses: actions/setup-python@v2
with:
python-version: 3.8

- uses: robotpy/build-actions/install-robotpy-build@v2021
- uses: robotpy/build-actions/build-sdist@v2021

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}

- name: Ping readthedocs
uses: robotpy/build-actions/ping-rtd@v2021
with:
token: ${{ secrets.RTD_TOKEN }}
webhook: ${{ secrets.RTD_WEBHOOK }}

ping:
runs-on: ubuntu-latest
needs: [publish-rpyrepo, publish-pypi]
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')

steps:
- uses: robotpy/build-actions/ping-meta@v2021
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
ci:
uses: robotpy/build-actions/.github/workflows/package-ci.yml@v2022
secrets:
SSH_USER: ${{ secrets.SSH_USER }}
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_PASSPHRASE: ${{ secrets.SSH_PASSPHRASE }}
META_REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
RTD_TOKEN: ${{ secrets.RTD_TOKEN }}
RTD_WEBHOOK: ${{ secrets.RTD_WEBHOOK }}
PYPI_API_TOKEN: ${{ secrets.PYPI_PASSWORD }}
5 changes: 5 additions & 0 deletions gen/AHRS.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
---

extra_includes:
- wpi/sendable/SendableHelper.h

inline_code: |
#include <src/rpy/AHRS.cpp.inl>
classes:
AHRS:
shared_ptr: true
ignored_bases:
- wpi::SendableHelper<AHRS>
enums:
BoardAxis:
SerialDataType:
Expand Down
20 changes: 14 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build-system]
requires = [
"robotpy-build>=2020.6.1,<2021.0.0",
"wpilib>=2021.2.2.0,<2022.0.0",
"robotpy-build>=2022.1.0,<2023.0.0",
"wpilib>=2022.2.1.0,<2023.0.0",
]

[tool.robotpy-build]
Expand All @@ -11,7 +11,7 @@ base_package = "navx"
artifact_id = "navx-cpp"
group_id = "com.kauailabs.navx.frc"
repo_url = "https://repo1.maven.org/maven2"
version = "4.0.425"
version = "4.0.442"
use_sources = true
sources = [
"AHRS.cpp",
Expand All @@ -23,12 +23,20 @@ sources = [
"RegisterIOMau.cpp",
"RegisterIOSPI.cpp",
"SerialIO.cpp",
"SimIO.cpp"
"SimIO.cpp",
"Tracer.cpp"
]

[tool.robotpy-build.wrappers."navx"]
name = "navx"
depends = ["wpilibc", "wpilib_core", "wpimath_cpp", "wpimath_geometry", "wpiHal"]
depends = [
"wpilibc",
"wpilib_core",
"wpimath_cpp",
"wpimath_geometry",
"wpiHal",
"wpiutil",
]

sources = [
"navx/src/rpy/navx.cpp"
Expand All @@ -48,5 +56,5 @@ author_email = "robotpy@googlegroups.com"
url = "https://github.com/robotpy/robotpy-navx"
license = "BSD-3-Clause"
install_requires = [
"wpilib>=2021.2.2.0,<2022.0.0",
"wpilib>=2022.2.1.0,<2023.0.0",
]

0 comments on commit 5f35d5b

Please sign in to comment.