Skip to content

Commit

Permalink
build: update of pants, Python, dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ZdenekM committed Apr 10, 2024
1 parent 82cf38e commit 62d479a
Show file tree
Hide file tree
Showing 112 changed files with 2,483 additions and 2,936 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/pants-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
build:
env:
PANTS_CONFIG_FILES: pants.ci.toml
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ['3.10']
python-version: ['3.11']
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -72,14 +72,14 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: bootstrap
run: |
./pants --version
pants --version
- name: install system dependencies
run: |
sudo ./build-support/install_kinect_prerequisites.sh
sudo apt install jq
sudo apt install jq cargo
- name: Get dependencies
run: |
./pants export
pants export
- name: Upload pants log
uses: actions/upload-artifact@v4
with:
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/pants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ jobs:
org-check:
name: Check GitHub Organization
if: ${{ github.repository_owner == 'robofit' }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Noop
run: "true"
build:
env:
PANTS_CONFIG_FILES: pants.ci.toml
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: org-check
strategy:
matrix:
python-version: ['3.10']
python-version: ['3.11']
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@v10
Expand All @@ -44,7 +44,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: pantsbuild/actions/init-pants@v8
- uses: pantsbuild/actions/init-pants@v5-scie-pants
with:
pants-python-version: ${{ matrix.python-version }}
gha-cache-key: cache0-py${{ matrix.python-version }}
Expand All @@ -53,26 +53,26 @@ jobs:
base-branch: master
- name: Check BUILD files
run: |
./pants --changed-since=HEAD update-build-files --check
pants --changed-since=HEAD update-build-files --check
- name: install system dependencies
run: |
run: | # cargo is required to build fastuuid (no wheels for Python 3.11)
sudo ./build-support/install_kinect_prerequisites.sh
sudo apt install jq
sudo apt install jq cargo
- name: Lint
run: |
./pants --changed-since=origin/master lint
pants --changed-since=origin/master lint
- name: Typecheck
run: |
./pants check --changed-since=origin/master --changed-dependees=transitive
pants check --changed-since=origin/master --changed-dependees=transitive
- name: Test
run: |
./pants --changed-since=origin/master --changed-dependees=transitive test
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_kinect_azure | grep -v arcor2_fanuc arcor2_fanuc_upload_object_types | xargs ./pants package
pants filter --target-type=docker_image --changed-since=origin/master --changed-dependees=transitive | grep -v arcor2_3d_mouse | grep -v arcor2_kinect_azure | 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
pants filter --target-type=python_distribution :: | xargs pants package
# check for cyclic dependencies or other problems
python -m venv ./tstvenv
source ./tstvenv/bin/activate
Expand Down
18 changes: 18 additions & 0 deletions 3rdparty/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,21 @@ python_requirements(
"urdfpy": {"dependencies": ["#setuptools"]}, # actually, networkx is missing that dependency
},
)

python_requirements(
name="mypy",
source="mypy-requirements.txt",
resolve="mypy",
)

python_requirements(
name="pytest",
source="pytest-requirements.txt",
resolve="pytest",
)

python_requirements(
name="flake8",
source="flake8-requirements.txt",
resolve="flake8",
)
Loading

0 comments on commit 62d479a

Please sign in to comment.