Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Pants to 2.21.0 release #100

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 28 additions & 11 deletions .github/workflows/pants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,42 @@ jobs:
- uses: pantsbuild/actions/init-pants@v8
with:
# cache0 makes it easy to bust the cache if needed
gha-cache-key: cache0-py${{ matrix.python_version }}
gha-cache-key: cache4-py${{ matrix.python_version }}
named-caches-hash: ${{ hashFiles('build-support/lockfiles/*.lock') }}

- shell: bash
# https://www.pantsbuild.org/2.20/docs/using-pants/using-pants-in-ci#directories-to-cache
run: |
function nuke_if_too_big() {
path=$1
limit_mb=$2
size_mb=$(du -m -d0 "${path}" | cut -f 1)
if (( size_mb > limit_mb )); then
echo "${path} is too large (${size_mb}mb), nuking it."
nuke_prefix="$(dirname "${path}")/$(basename "${path}").nuke"
nuke_path=$(mktemp -d "${nuke_prefix}.XXXXXX")
mv "${path}" "${nuke_path}/"
rm -rf "${nuke_prefix}.*"
fi
}
nuke_if_too_big ~/.cache/pants/named_caches 1

- name: Bootstrap Pants
run: |
pants --version

- name: Check BUILD files
run: |
pants update-build-files --check
# - name: Check BUILD files
# run: |
# pants update-build-files --check

- name: Lint and (TODO) typecheck
run: |
pants lint ::
# - name: Lint and (TODO) typecheck
# run: |
# pants lint ::

- name: Package/Run smoke test
run: |
pants package examples/python::
pants run examples/python/helloworld:helloworld-pex
# - name: Package/Run smoke test
# run: |
# pants package examples/python::
# pants run examples/python/helloworld:helloworld-pex

- name: Upload pants log
uses: actions/upload-artifact@v2
Expand Down
176 changes: 108 additions & 68 deletions build-support/lockfiles/pants-plugins.lock

Large diffs are not rendered by default.

3,260 changes: 7 additions & 3,253 deletions build-support/lockfiles/python-default.lock

Large diffs are not rendered by default.

17 changes: 0 additions & 17 deletions examples/python/hellofastapi/BUILD.pants

This file was deleted.

43 changes: 0 additions & 43 deletions examples/python/hellofastapi/hellofastapi.toml

This file was deleted.

Empty file.
8 changes: 0 additions & 8 deletions examples/python/hellofastapi/hellofastapi/main.py

This file was deleted.

28 changes: 0 additions & 28 deletions examples/python/hellofib/BUILD.pants

This file was deleted.

Empty file.
12 changes: 0 additions & 12 deletions examples/python/hellofib/hellofib/lib.py

This file was deleted.

6 changes: 0 additions & 6 deletions examples/python/hellofib/hellofib/main.py

This file was deleted.

8 changes: 0 additions & 8 deletions examples/python/hellofib/setup.py

This file was deleted.

16 changes: 0 additions & 16 deletions examples/python/hellokivy/BUILD.pants

This file was deleted.

Empty file.
26 changes: 0 additions & 26 deletions examples/python/hellokivy/hellokivy/main.py

This file was deleted.

13 changes: 0 additions & 13 deletions examples/python/hellonumpy/BUILD.pants

This file was deleted.

Empty file.
11 changes: 0 additions & 11 deletions examples/python/hellonumpy/hellonumpy/main.py

This file was deleted.

16 changes: 0 additions & 16 deletions examples/python/hellotyper/BUILD.pants

This file was deleted.

Empty file.
18 changes: 0 additions & 18 deletions examples/python/hellotyper/hellotyper/main.py

This file was deleted.

16 changes: 0 additions & 16 deletions examples/python/hellowebview/BUILD.pants

This file was deleted.

4 changes: 0 additions & 4 deletions examples/python/hellowebview/hellowebview/main.py

This file was deleted.

7 changes: 0 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +0,0 @@
fastapi
kivy
numpy
pydantic
pywebview
typer
uvicorn
Loading