forked from pex-tool/pex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
36dd237
commit a83bd0e
Showing
489 changed files
with
7,130 additions
and
16,726 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,54 +8,40 @@ env: | |
_PEX_TEST_POS_ARGS: "--color --devpi --devpi-timeout 15.0 --shutdown-devpi -vvs" | ||
# We use this to skip exposing same-versioned Pythons present on Linux hosts. These otherwise can | ||
# collide when attempting to load libpython<major>.<minor><flags>.so and lead to mysterious errors | ||
# importing builtins like `fcntl` as outlined in https://github.com/pex-tool/pex/issues/1391. | ||
# importing builtins like `fcntl` as outlined in https://github.com/pantsbuild/pex/issues/1391. | ||
_PEX_TEST_PYENV_VERSIONS: "2.7 3.7 3.10" | ||
_PEX_PEXPECT_TIMEOUT: 10 | ||
concurrency: | ||
group: CI-${{ github.ref }} | ||
# Queue on all branches and tags, but only cancel overlapping PR burns. | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/') }} | ||
jobs: | ||
org-check: | ||
name: Check GitHub Organization | ||
if: github.repository_owner == 'pex-tool' | ||
if: github.repository_owner == 'pantsbuild' | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Noop | ||
run: "true" | ||
checks: | ||
name: tox -e format-check,lint-check,typecheck,vendor-check,package,docs | ||
name: tox -e format-check,typecheck,vendor-check,package | ||
needs: org-check | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout Pex | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v3 | ||
with: | ||
# We need branches and tags since package leans on `git describe`. Passing 0 gets us | ||
# complete history. | ||
fetch-depth: 0 | ||
- name: Setup Python 3.8 | ||
uses: actions/setup-python@v5 | ||
uses: actions/setup-python@v4 | ||
with: | ||
# We need to keep Python 3.8 for consistent vendoring with tox. | ||
python-version: "3.8" | ||
- name: Check Formatting, Lints and Types | ||
- name: Check Formatting, Types, Vendoring and Packaging | ||
uses: pantsbuild/actions/run-tox@b16b9cf47cd566acfe217b1dafc5b452e27e6fd7 | ||
with: | ||
tox-env: format-check,lint-check,typecheck | ||
- name: Check Vendoring | ||
uses: pantsbuild/actions/run-tox@b16b9cf47cd566acfe217b1dafc5b452e27e6fd7 | ||
with: | ||
tox-env: vendor-check | ||
- name: Check Packaging | ||
uses: pantsbuild/actions/run-tox@b16b9cf47cd566acfe217b1dafc5b452e27e6fd7 | ||
with: | ||
tox-env: package -- --additional-format sdist --additional-format wheel --embed-docs --clean-docs | ||
- name: Check Docs | ||
uses: pantsbuild/actions/run-tox@b16b9cf47cd566acfe217b1dafc5b452e27e6fd7 | ||
with: | ||
tox-env: docs -- --linkcheck --pdf --clean-html | ||
|
||
tox-env: format-check,typecheck,vendor-check,package -- --additional-format sdist --additional-format wheel | ||
# N.B.: The name of this job key (linux-tests) is depended on by scrips/build_cache_image.py. In | ||
# particular, the tox-env matrix list is used to ensure the cache covers all Linux CI jobs. | ||
linux-tests: | ||
|
@@ -66,15 +52,11 @@ jobs: | |
matrix: | ||
tox-env: | ||
- py27-pip20 | ||
# N.B.: Although we support Python 3.5 with a published universal wheel, Pex does not | ||
# build under Python 3.5 or 3.6; so we skip to Python 3.7 for tests which must be able to | ||
# build a Pex distribution both as part of the tox setup and in many test cases as well. | ||
- py37-pip20 | ||
- py35-pip20 | ||
- py311-pip20 | ||
- py311-pip22_3_1 | ||
- py311-pip23_1_2 | ||
- py312-pip24_0 | ||
- py313-pip24_0_patched | ||
- py312-pip23_2 | ||
- pypy310-pip20 | ||
- pypy310-pip22_3_1 | ||
- pypy310-pip23_1_2 | ||
|
@@ -84,14 +66,13 @@ jobs: | |
- py311-pip20-integration | ||
- py311-pip22_3_1-integration | ||
- py311-pip23_1_2-integration | ||
- py312-pip24_0-integration | ||
- py313-pip24_0_patched-integration | ||
- py312-pip23_2-integration | ||
- pypy310-pip20-integration | ||
- pypy310-pip22_3_1-integration | ||
- pypy310-pip23_1_2-integration | ||
steps: | ||
- name: Free Up Disk Space | ||
uses: jlumbroso/[email protected].1 | ||
uses: jlumbroso/[email protected].0 | ||
with: | ||
android: true # ~14GB | ||
dotnet: true # ~2GB | ||
|
@@ -103,36 +84,39 @@ jobs: | |
docker-images: false | ||
swap-storage: false | ||
- name: Checkout Pex | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v3 | ||
with: | ||
# We need branches and tags for some ITs. | ||
fetch-depth: 0 | ||
# Some ITs need this for VCS URLs of the form git+ssh://[email protected]/... | ||
- name: Setup SSH Agent | ||
uses: webfactory/ssh-agent@v0.9.0 | ||
uses: webfactory/ssh-agent@v0.5.4 | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | ||
if: env.SSH_PRIVATE_KEY != '' | ||
with: | ||
ssh-private-key: ${{ env.SSH_PRIVATE_KEY }} | ||
- name: Run Tests | ||
run: | | ||
# This is needed to get pexpect tests working under PyPy running under docker. | ||
export TERM="xterm" | ||
BASE_MODE=pull CACHE_MODE=pull \ | ||
./dtox.sh -e ${{ matrix.tox-env }} -- ${{ env._PEX_TEST_POS_ARGS }} | ||
BASE_MODE=pull CACHE_MODE=pull ./dtox.sh -e ${{ matrix.tox-env }} -- ${{ env._PEX_TEST_POS_ARGS }} | ||
mac-tests: | ||
name: tox -e ${{ matrix.tox-env }} | ||
needs: org-check | ||
runs-on: macos-12 | ||
strategy: | ||
matrix: | ||
include: | ||
- python-version: [ 3, 12 ] | ||
tox-env: py312-pip24_0 | ||
- python-version: [ 3, 11 ] | ||
tox-env: py311-pip20 | ||
tox-env-python: python | ||
- python-version: [ 3, 11 ] | ||
tox-env: py311-pip20-integration | ||
tox-env-python: python | ||
- python-version: [ 3, 12, "0-rc.3" ] | ||
tox-env: py312-pip23_2 | ||
tox-env-python: python3.11 | ||
- python-version: [ 3, 12 ] | ||
tox-env: py312-pip24_0-integration | ||
- python-version: [ 3, 12, "0-rc.3" ] | ||
tox-env: py312-pip23_2-integration | ||
tox-env-python: python3.11 | ||
steps: | ||
- name: Calculate Pythons to Expose | ||
|
@@ -144,13 +128,13 @@ jobs: | |
fi | ||
echo "skip=${skip}" >> $GITHUB_OUTPUT | ||
- name: Checkout Pex | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v3 | ||
with: | ||
# We need branches and tags for some ITs. | ||
fetch-depth: 0 | ||
path: repo | ||
- name: Setup Python ${{ join(matrix.python-version, '.') }} | ||
uses: actions/setup-python@v5 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "${{ join(matrix.python-version, '.') }}" | ||
- name: Expose Pythons | ||
|
@@ -159,13 +143,13 @@ jobs: | |
skip: "${{ steps.calculate-pythons-to-expose.outputs.skip }}" | ||
- name: Restore Cached Pyenv Interpreters | ||
id: restore-pyenv-interpreters | ||
uses: actions/cache/restore@v4 | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: ${{ env._PEX_TEST_DEV_ROOT }}/pyenv | ||
key: macos-12-${{ runner.arch }}-pex-test-dev-root-pyenv-v1 | ||
- name: Restore Cached Devpi Server | ||
id: restore-devpi-server | ||
uses: actions/cache/restore@v4 | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: ${{ env._PEX_TEST_DEV_ROOT }}/devpi | ||
# We're using a key suffix / restore-keys prefix trick here to get an updatable cache. | ||
|
@@ -174,7 +158,7 @@ jobs: | |
restore-keys: macos-12-${{ runner.arch }}-${{ matrix.tox-env }}-pex-test-dev-root-devpi-v1 | ||
# Some ITs need this for VCS URLs of the form git+ssh://[email protected]/... | ||
- name: Setup SSH Agent | ||
uses: webfactory/ssh-agent@v0.9.0 | ||
uses: webfactory/ssh-agent@v0.5.4 | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | ||
if: env.SSH_PRIVATE_KEY != '' | ||
|
@@ -187,13 +171,13 @@ jobs: | |
python: ${{ matrix.tox-env-python }} | ||
tox-env: ${{ matrix.tox-env }} -- ${{ env._PEX_TEST_POS_ARGS }} | ||
- name: Cache Pyenv Interpreters | ||
uses: actions/cache/save@v4 | ||
uses: actions/cache/save@v3 | ||
if: github.ref == 'refs/heads/main' | ||
with: | ||
path: ${{ env._PEX_TEST_DEV_ROOT }}/pyenv | ||
key: ${{ steps.restore-pyenv-interpreters.outputs.cache-primary-key }} | ||
- name: Cache Devpi Server | ||
uses: actions/cache/save@v4 | ||
uses: actions/cache/save@v3 | ||
if: github.ref == 'refs/heads/main' | ||
with: | ||
path: ${{ env._PEX_TEST_DEV_ROOT }}/devpi | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ on: | |
jobs: | ||
org-check: | ||
name: Check GitHub Organization | ||
if: ${{ github.repository_owner == 'pex-tool' }} | ||
if: ${{ github.repository_owner == 'pantsbuild' }} | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Noop | ||
|
@@ -48,17 +48,17 @@ jobs: | |
id-token: write | ||
steps: | ||
- name: Checkout Pex ${{ needs.determine-tag.outputs.release-tag }} | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ needs.determine-tag.outputs.release-tag }} | ||
- name: Setup Python 3.11 | ||
uses: actions/setup-python@v5 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Build sdist and wheel | ||
uses: pantsbuild/actions/run-tox@b16b9cf47cd566acfe217b1dafc5b452e27e6fd7 | ||
with: | ||
tox-env: package -- --no-pex --additional-format sdist --additional-format wheel --embed-docs --clean-docs | ||
tox-env: package -- --no-pex --additional-format sdist --additional-format wheel | ||
- name: Publish Pex ${{ needs.determine-tag.outputs.release-tag }} | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
|
@@ -71,32 +71,27 @@ jobs: | |
environment: Release | ||
steps: | ||
- name: Checkout Pex ${{ needs.determine-tag.outputs.release-tag }} | ||
uses: actions/checkout@v4 | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ needs.determine-tag.outputs.release-tag }} | ||
# This ensures we get all branches and tags which is needed for `tox -e package`. | ||
fetch-depth: 0 | ||
- name: Setup Python 3.11 | ||
uses: actions/setup-python@v5 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Package Pex ${{ needs.determine-tag.outputs.release-tag }} PEX | ||
uses: pantsbuild/actions/run-tox@b16b9cf47cd566acfe217b1dafc5b452e27e6fd7 | ||
with: | ||
tox-env: package -- --embed-docs | ||
- name: Generate Pex ${{ needs.determine-tag.outputs.release-tag }} PDF | ||
uses: pantsbuild/actions/run-tox@b16b9cf47cd566acfe217b1dafc5b452e27e6fd7 | ||
with: | ||
tox-env: docs -- --no-html --pdf | ||
tox-env: package | ||
- name: Prepare Changelog | ||
id: prepare-changelog | ||
uses: a-scie/actions/[email protected] | ||
with: | ||
changelog-file: ${{ github.workspace }}/CHANGES.md | ||
version: ${{ needs.determine-tag.outputs.release-version }} | ||
- name: Create ${{ needs.determine-tag.outputs.release-tag }} Release | ||
# Upgrades node16 -> node20: in main but not tagged yet. | ||
uses: softprops/action-gh-release@4634c16e79c963813287e889244c50009e7f0981 | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
|
@@ -105,24 +100,35 @@ jobs: | |
body_path: ${{ steps.prepare-changelog.outputs.changelog-file }} | ||
draft: false | ||
prerelease: false | ||
files: | | ||
dist/pex | ||
dist/docs/pdf/pex.pdf | ||
files: dist/pex | ||
fail_on_unmatched_files: true | ||
discussion_category_name: Announcements | ||
deploy-docsite: | ||
name: Trigger Deploy Doc Site | ||
announce-release: | ||
name: Announce Release | ||
needs: | ||
- determine-tag | ||
- pypi | ||
- github-release | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Dispatch `release-docs` Event | ||
uses: peter-evans/repository-dispatch@v3 | ||
- name: Post Release Announcement to Pants Slack `#announce` | ||
id: slack | ||
uses: slackapi/[email protected] | ||
with: | ||
event-type: release-docs | ||
client-payload: |- | ||
channel-id: "C18RRR4JK" | ||
# N.B.: You can muck with the JSON blob and see the results rendered here: | ||
# https://app.slack.com/block-kit-builder | ||
payload: | | ||
{ | ||
"ref": "${{ github.ref }}" | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "Pex ${{ needs.determine-tag.outputs.release-version }} is released:\n* https://pypi.org/project/pex/${{ needs.determine-tag.outputs.release-version }}/\n* https://github.com/pantsbuild/pex/releases/tag/${{ needs.determine-tag.outputs.release-tag }}" | ||
} | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
*~ | ||
*.pyc | ||
*.pyo | ||
*~ | ||
|
||
/.mypy_cache/ | ||
/.tox/ | ||
/dist/ | ||
/docs/_static_dynamic/ | ||
|
||
*.egg-info | ||
/.cache | ||
/venv | ||
/build/* | ||
/dist/* | ||
/docs/_build | ||
/.tox | ||
/.idea | ||
/.coverage* | ||
/htmlcov | ||
/.pyenv_test | ||
.cache/* | ||
.eggs/* | ||
/.pytest_cache |
Oops, something went wrong.