Skip to content

build(deps): bump actions/setup-python from 4 to 5 #1017

build(deps): bump actions/setup-python from 4 to 5

build(deps): bump actions/setup-python from 4 to 5 #1017

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-20.04
steps:
- name: Noop
run: "true"
build:
env:
PANTS_CONFIG_FILES: pants.ci.toml
runs-on: ubuntu-20.04
needs: org-check
strategy:
matrix:
python-version: ['3.10']
steps:
- name: Remove unnecessary packages
run: | # stolen from https://github.com/easimon/maximize-build-space
echo "=== Before pruning ==="
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo apt-get remove -y '^dotnet-.*'
sudo apt-get remove -y '^llvm-.*'
sudo apt-get remove -y 'php.*'
sudo apt-get remove -y '^mongodb-.*'
sudo apt-get remove -y '^mysql-.*'
sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri
sudo apt-get autoremove -y
sudo apt-get clean
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo swapoff -a
sudo rm -f /mnt/swapfile
free -h
echo
echo "=== After pruning ==="
df -h
- 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: pantsbuild/actions/init-pants@v2
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: |
sudo ./build-support/install_kinect_prerequisites.sh
sudo apt install jq
- name: Lint
run: |
./pants --changed-since=origin/master lint
- name: Typecheck
run: |
./pants check --changed-since=origin/master --changed-dependees=transitive
- name: Test
run: |
./pants --changed-since=origin/master --changed-dependees=transitive test
- name: Build Docker images
run: |
./pants --filter-target-type=docker_image --changed-since=origin/master --changed-dependees=transitive 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@v3
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()