Skip to content

fix(arcor2_arserver): ap parent checks #1110

fix(arcor2_arserver): ap parent checks

fix(arcor2_arserver): ap parent checks #1110

Workflow file for this run

# inspired by https://github.com/pantsbuild/example-python/blob/main/.github/workflows/pants.yaml
# also see https://stackoverflow.com/a/66632107/3142796
name: Pants
on:
pull_request:
branches:
- master
jobs:
org-check:
name: Check GitHub Organization
if: ${{ github.repository_owner == 'robofit' }}
runs-on: ubuntu-24.04
steps:
- name: Noop
run: "true"
build:
env:
PANTS_CONFIG_FILES: pants.ci.toml
runs-on: ubuntu-24.04
needs: org-check
strategy:
matrix:
python-version: ['3.11']
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@v10
with:
root-reserve-mb: 30000
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-docker-images: 'true'
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Checkout LFS objects
run: git lfs checkout
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: ros-tooling/[email protected]
with:
required-ros-distributions: jazzy
- uses: pantsbuild/actions/init-pants@v5-scie-pants
with:
pants-python-version: ${{ matrix.python-version }}
gha-cache-key: cache0-py${{ matrix.python-version }}
named-caches-hash: ${{ hashFiles('/3rdparty/constraints.txt') }}
cache-lmdb-store: 'true' # defaults to 'false'
base-branch: master
- name: Check BUILD files
run: |
pants --changed-since=HEAD update-build-files --check
- name: install system dependencies
run: | # cargo is required to build fastuuid (no wheels for Python 3.11)
sudo apt update
sudo apt install jq cargo
sudo ./build-support/install_ur_dependencies.sh
- name: Lint
run: |
pants --changed-since=origin/master lint
- name: Typecheck
run: |
pants check --changed-since=origin/master --changed-dependees=transitive
- name: Test
run: |
source /opt/ros/jazzy/setup.bash
pants --changed-since=origin/master --changed-dependees=transitive test
- name: Build Docker images
run: | # filter out non-essential docker images (there was a problem with full storage on github)
pants filter --target-type=docker_image --changed-since=origin/master --changed-dependees=transitive | grep -v arcor2_3d_mouse | grep -v arcor2_fanuc arcor2_fanuc_upload_object_types | xargs pants package
- name: Build Python packages
run: |
pants filter --target-type=python_distribution :: | xargs pants package
# check for cyclic dependencies or other problems
python -m venv ./tstvenv
source ./tstvenv/bin/activate
pip install dist/*.tar.gz
pip install pipdeptree
pipdeptree -w fail
- name: Upload pants log
uses: actions/upload-artifact@v4
with:
name: pants-log
path: .pants.d/pants.log
if: always() # We want the log even on failures.
- name: Prune pants cache
run: |
./build-support/nuke-cache.sh
if: always()