mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-21 01:01:41 +00:00
105 lines
2.9 KiB
YAML
105 lines
2.9 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
tags:
|
|
- 'v*'
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
build-offline-docs:
|
|
name: "Build Offline Docs"
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
repository: 'PhotonVision/photonvision-docs.git'
|
|
ref: master
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.9'
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install sphinx sphinx_rtd_theme sphinx-tabs sphinxext-opengraph doc8
|
|
pip install -r requirements.txt
|
|
- name: Build the docs
|
|
run: |
|
|
make html
|
|
- uses: actions/upload-artifact@master
|
|
with:
|
|
name: built-docs
|
|
path: build/html
|
|
build-photonlib-host:
|
|
env:
|
|
MACOSX_DEPLOYMENT_TARGET: 12
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: windows-2022
|
|
artifact-name: Win64
|
|
architecture: x64
|
|
- os: macos-12
|
|
artifact-name: macOS
|
|
architecture: x64
|
|
- os: ubuntu-22.04
|
|
artifact-name: Linux
|
|
|
|
name: "Photonlib - Build Host - ${{ matrix.artifact-name }}"
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Install Java 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: 17
|
|
distribution: temurin
|
|
- run: git fetch --tags --force
|
|
- run: |
|
|
chmod +x gradlew
|
|
./gradlew photon-lib:build --max-workers 1
|
|
- run: ./gradlew photon-lib:publish photon-targeting:publish
|
|
name: Publish
|
|
env:
|
|
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }}
|
|
if: github.event_name == 'push'
|
|
build-photonlib-docker:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- container: wpilib/roborio-cross-ubuntu:2024-22.04
|
|
artifact-name: Athena
|
|
- container: wpilib/raspbian-cross-ubuntu:bullseye-22.04
|
|
artifact-name: Raspbian
|
|
- container: wpilib/aarch64-cross-ubuntu:bullseye-22.04
|
|
artifact-name: Aarch64
|
|
|
|
runs-on: ubuntu-22.04
|
|
container: ${{ matrix.container }}
|
|
name: "Photonlib - Build Docker - ${{ matrix.artifact-name }}"
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Config Git
|
|
run: |
|
|
git config --global --add safe.directory /__w/photonvision/photonvision
|
|
- name: Build PhotonLib
|
|
run: |
|
|
chmod +x gradlew
|
|
./gradlew photon-lib:build --max-workers 1
|
|
- name: Publish
|
|
run: |
|
|
chmod +x gradlew
|
|
./gradlew photon-lib:publish photon-targeting:publish
|
|
env:
|
|
ARTIFACTORY_API_KEY: ${{ secrets.ARTIFACTORY_API_KEY }}
|
|
if: github.event_name == 'push'
|