From 6ac20eec2065691932ec97e312b14c587926001b Mon Sep 17 00:00:00 2001 From: SJ Date: Thu, 9 May 2024 11:01:57 -0400 Subject: [PATCH] Using scie-pants with new action in CI (#98) --- .github/workflows/pants.yml | 31 +++---- .../lock.txt => lockfiles/pants-plugins.lock} | 80 ++++++++++--------- .../python-default.lock} | 4 +- build-support/python/pyoxidizer_lock.txt | 80 ------------------- pants.toml | 4 +- 5 files changed, 64 insertions(+), 135 deletions(-) rename build-support/{pants-plugins/lock.txt => lockfiles/pants-plugins.lock} (92%) rename build-support/{python/default_lock.txt => lockfiles/python-default.lock} (99%) delete mode 100644 build-support/python/pyoxidizer_lock.txt diff --git a/.github/workflows/pants.yml b/.github/workflows/pants.yml index c422ff1..71bd50c 100644 --- a/.github/workflows/pants.yml +++ b/.github/workflows/pants.yml @@ -21,33 +21,34 @@ jobs: python-version: [3.9] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: actions/cache@v2 - id: cache - with: - path: | - ~/.cache/pants/setup - ~/.cache/pants/lmdb_store - ~/.cache/pants/named_caches - key: ${{ runner.os }}- - - - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + - 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 }} + named-caches-hash: ${{ hashFiles('build-support/lockfiles/*.lock') }} + - name: Bootstrap Pants run: | - ./pants --version + pants --version - name: Check BUILD files run: | - ./pants update-build-files --check + pants update-build-files --check - name: Lint and (TODO) typecheck run: | - ./pants lint :: + pants lint :: + + - 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 diff --git a/build-support/pants-plugins/lock.txt b/build-support/lockfiles/pants-plugins.lock similarity index 92% rename from build-support/pants-plugins/lock.txt rename to build-support/lockfiles/pants-plugins.lock index c6ff9e7..f299d6c 100644 --- a/build-support/pants-plugins/lock.txt +++ b/build-support/lockfiles/pants-plugins.lock @@ -9,8 +9,8 @@ // "CPython<3.10,>=3.9" // ], // "generated_with_requirements": [ -// "pantsbuild.pants.testutil==2.19.0", -// "pantsbuild.pants==2.19.0" +// "pantsbuild.pants.testutil==2.20.1", +// "pantsbuild.pants==2.20.1" // ], // "manylinux": "manylinux2014", // "requirement_constraints": [], @@ -231,23 +231,23 @@ "artifacts": [ { "algorithm": "sha256", - "hash": "dd2aa4d53522c16c0ae50115f4c24b492adf10abed7a21b480043bd74918475f", - "url": "https://github.com/pantsbuild/pants/releases/download/release_2.19.0/pantsbuild.pants-2.19.0-cp39-cp39-manylinux2014_x86_64.whl" + "hash": "159bc2e5cae0fdbd169a87353389e70aaea4fbdb4a38fcd2373cd8aac71e7bf1", + "url": "https://github.com/pantsbuild/pants/releases/download/release_2.20.1/pantsbuild.pants-2.20.1-cp39-cp39-manylinux2014_x86_64.whl" }, { "algorithm": "sha256", - "hash": "4e2b132155af2a24c2155d9b4eb7cc4c28080aadf24945eaf311c0548732b479", - "url": "https://github.com/pantsbuild/pants/releases/download/release_2.19.0/pantsbuild.pants-2.19.0-cp39-cp39-macosx_10_15_x86_64.whl" + "hash": "1d76e370d31b19d9fa4a94033a6184f128d68dba685407efbe6ab3b4db8cdaec", + "url": "https://github.com/pantsbuild/pants/releases/download/release_2.20.1/pantsbuild.pants-2.20.1-cp39-cp39-macosx_10_15_x86_64.whl" }, { "algorithm": "sha256", - "hash": "d7cf9283b809a7699375b1e68c20d70924c6e75871481b30a00558a52659cb67", - "url": "https://github.com/pantsbuild/pants/releases/download/release_2.19.0/pantsbuild.pants-2.19.0-cp39-cp39-macosx_11_0_arm64.whl" + "hash": "4b0361c1b277d1fbc4adb556d988908ab8bb469370c1df6d4919a7f00bf34f04", + "url": "https://github.com/pantsbuild/pants/releases/download/release_2.20.1/pantsbuild.pants-2.20.1-cp39-cp39-macosx_11_0_arm64.whl" }, { "algorithm": "sha256", - "hash": "79f8f1fe1824015eb5edcbce73708f9b6317a1090fdfb8ca751d029ae540c3fa", - "url": "https://github.com/pantsbuild/pants/releases/download/release_2.19.0/pantsbuild.pants-2.19.0-cp39-cp39-manylinux2014_aarch64.whl" + "hash": "77b8f0527c3391de43cea1f15cf8e6bfb51dfef672b87229d73cf2ab2a249b56", + "url": "https://github.com/pantsbuild/pants/releases/download/release_2.20.1/pantsbuild.pants-2.20.1-cp39-cp39-manylinux2014_aarch64.whl" } ], "project_name": "pantsbuild-pants", @@ -259,8 +259,8 @@ "ijson==3.1.4", "node-semver==0.9.0", "packaging==21.3", - "pex==2.1.148", - "psutil==5.9.0", + "pex==2.2.1", + "psutil==5.9.8", "python-lsp-jsonrpc==1.0.0", "setproctitle==1.3.2", "setuptools<64.0,>=63.1.0", @@ -271,43 +271,43 @@ "typing-extensions==4.3.0" ], "requires_python": "==3.9.*", - "version": "2.19.0" + "version": "2.20.1" }, { "artifacts": [ { "algorithm": "sha256", - "hash": "d3d879c83fdfc33b50968b08d09623949e77f0b400a08deb7358dd8a146a95d9", - "url": "https://github.com/pantsbuild/pants/releases/download/release_2.19.0/pantsbuild.pants.testutil-2.19.0-py3-none-any.whl" + "hash": "1469b85cb39b7c93bb7a3f047c72637972cba383e01e6a58bb20da92e336063c", + "url": "https://github.com/pantsbuild/pants/releases/download/release_2.20.1/pantsbuild.pants.testutil-2.20.1-py3-none-any.whl" } ], "project_name": "pantsbuild-pants-testutil", "requires_dists": [ - "pantsbuild.pants==2.19.0", + "pantsbuild.pants==2.20.1", "pytest<7.1.0,>=6.2.4" ], "requires_python": "==3.9.*", - "version": "2.19.0" + "version": "2.20.1" }, { "artifacts": [ { "algorithm": "sha256", - "hash": "b406a54e66855c537182caf618ed2c9167b021ddc8f28a6d570af88cea691101", - "url": "https://files.pythonhosted.org/packages/08/35/3aa30be9d6be587e79d22a53a3d7fea24b4e1f677e9f68fa1042db6914e5/pex-2.1.148-py2.py3-none-any.whl" + "hash": "cde6756dc1ace8b4e0175afcd62da29f6635abe5516671717dffacb512502630", + "url": "https://files.pythonhosted.org/packages/05/fd/622e288459bb8ac3c294a7fefa251f0604390d65695f619b5012010aa96d/pex-2.2.1-py2.py3-none-any.whl" }, { "algorithm": "sha256", - "hash": "5d1111dbc39b23d4ec6798792e4017844c46abe738869a04ba7da16a09295179", - "url": "https://files.pythonhosted.org/packages/44/07/05627905adaafbfc4ae71f16fbc944849ba074fa74cda2c9fc93b887361c/pex-2.1.148.tar.gz" + "hash": "23adde5fd0439fd4468ad105662ba5b23118540b26632bd2362dfedad22b1aff", + "url": "https://files.pythonhosted.org/packages/32/81/caad3c5c9626ce1f9b8eb0d971d4c5553470aedeb04b8333a2a9c9d458f4/pex-2.2.1.tar.gz" } ], "project_name": "pex", "requires_dists": [ - "subprocess32>=3.2.7; extra == \"subprocess\" and python_version < \"3\"" + "subprocess32>=3.2.7; python_version < \"3\" and extra == \"subprocess\"" ], "requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,<3.13,>=2.7", - "version": "2.1.148" + "version": "2.2.1" }, { "artifacts": [ @@ -336,23 +336,28 @@ "artifacts": [ { "algorithm": "sha256", - "hash": "3611e87eea393f779a35b192b46a164b1d01167c9d323dda9b1e527ea69d697d", - "url": "https://files.pythonhosted.org/packages/c4/35/7cec9647be077784d20913404f914fffd8fe6dfd0673e29f7bd822ac1331/psutil-5.9.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl" + "hash": "d16bbddf0693323b8c6123dd804100241da461e41d6e332fb0ba6058f630f8c8", + "url": "https://files.pythonhosted.org/packages/05/33/2d74d588408caedd065c2497bdb5ef83ce6082db01289a1e1147f6639802/psutil-5.9.8-cp38-abi3-macosx_11_0_arm64.whl" }, { "algorithm": "sha256", - "hash": "869842dbd66bb80c3217158e629d6fceaecc3a3166d3d1faee515b05dd26ca25", - "url": "https://files.pythonhosted.org/packages/47/b6/ea8a7728f096a597f0032564e8013b705aa992a0990becd773dcc4d7b4a7/psutil-5.9.0.tar.gz" + "hash": "6be126e3225486dff286a8fb9a06246a5253f4c7c53b475ea5f5ac934e64194c", + "url": "https://files.pythonhosted.org/packages/90/c7/6dc0a455d111f68ee43f27793971cf03fe29b6ef972042549db29eec39a2/psutil-5.9.8.tar.gz" }, { "algorithm": "sha256", - "hash": "539e429da49c5d27d5a58e3563886057f8fc3868a5547b4f1876d9c0f007bccf", - "url": "https://files.pythonhosted.org/packages/48/6a/c6e88a5584544033dbb8318c380e7e1e3796e5ac336577eb91dc75bdecd7/psutil-5.9.0-cp39-cp39-macosx_10_9_x86_64.whl" + "hash": "8cb6403ce6d8e047495a701dc7c5bd788add903f8986d523e3e20b98b733e421", + "url": "https://files.pythonhosted.org/packages/b3/bd/28c5f553667116b2598b9cc55908ec435cb7f77a34f2bff3e3ca765b0f78/psutil-5.9.8-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl" }, { "algorithm": "sha256", - "hash": "58c7d923dc209225600aec73aa2c4ae8ea33b1ab31bc11ef8a5933b027476f07", - "url": "https://files.pythonhosted.org/packages/f7/b1/82e95f6368dbde6b7e54ea6b18cf8ac3958223540d0bcbde23ba7be19478/psutil-5.9.0-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl" + "hash": "d06016f7f8625a1825ba3732081d77c94589dca78b7a3fc072194851e88461a4", + "url": "https://files.pythonhosted.org/packages/c5/4f/0e22aaa246f96d6ac87fe5ebb9c5a693fbe8877f537a1022527c47ca43c5/psutil-5.9.8-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl" + }, + { + "algorithm": "sha256", + "hash": "aee678c8720623dc456fa20659af736241f575d79429a0e5e9cf88ae0605cc81", + "url": "https://files.pythonhosted.org/packages/e7/e3/07ae864a636d70a8a6f58da27cb1179192f1140d5d1da10886ade9405797/psutil-5.9.8-cp36-abi3-macosx_10_9_x86_64.whl" } ], "project_name": "psutil", @@ -361,11 +366,10 @@ "ipaddress; python_version < \"3.0\" and extra == \"test\"", "mock; python_version < \"3.0\" and extra == \"test\"", "pywin32; sys_platform == \"win32\" and extra == \"test\"", - "unittest2; python_version < \"3.0\" and extra == \"test\"", "wmi; sys_platform == \"win32\" and extra == \"test\"" ], - "requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.6", - "version": "5.9.0" + "requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7", + "version": "5.9.8" }, { "artifacts": [ @@ -856,13 +860,15 @@ "platform_tag": null } ], + "only_builds": [], + "only_wheels": [], "path_mappings": {}, - "pex_version": "2.1.148", + "pex_version": "2.2.1", "pip_version": "23.1.2", "prefer_older_binary": false, "requirements": [ - "pantsbuild.pants.testutil==2.19.0", - "pantsbuild.pants==2.19.0" + "pantsbuild.pants.testutil==2.20.1", + "pantsbuild.pants==2.20.1" ], "requires_python": [ "<3.10,>=3.9" diff --git a/build-support/python/default_lock.txt b/build-support/lockfiles/python-default.lock similarity index 99% rename from build-support/python/default_lock.txt rename to build-support/lockfiles/python-default.lock index 5cb82dc..bc5f757 100644 --- a/build-support/python/default_lock.txt +++ b/build-support/lockfiles/python-default.lock @@ -3261,8 +3261,10 @@ "platform_tag": null } ], + "only_builds": [], + "only_wheels": [], "path_mappings": {}, - "pex_version": "2.1.148", + "pex_version": "2.2.1", "pip_version": "23.2", "prefer_older_binary": false, "requirements": [ diff --git a/build-support/python/pyoxidizer_lock.txt b/build-support/python/pyoxidizer_lock.txt deleted file mode 100644 index fe7b7ad..0000000 --- a/build-support/python/pyoxidizer_lock.txt +++ /dev/null @@ -1,80 +0,0 @@ -// This lockfile was autogenerated by Pants. To regenerate, run: -// -// ./pants generate-lockfiles --resolve=pyoxidizer -// -// --- BEGIN PANTS LOCKFILE METADATA: DO NOT EDIT OR REMOVE --- -// { -// "version": 3, -// "valid_for_interpreter_constraints": [ -// "CPython>=3.9" -// ], -// "generated_with_requirements": [ -// "pyoxidizer==0.22.0" -// ], -// "manylinux": "manylinux2014", -// "requirement_constraints": [], -// "only_binary": [], -// "no_binary": [] -// } -// --- END PANTS LOCKFILE METADATA --- - -{ - "allow_builds": true, - "allow_prereleases": false, - "allow_wheels": true, - "build_isolation": true, - "constraints": [], - "locked_resolves": [ - { - "locked_requirements": [ - { - "artifacts": [ - { - "algorithm": "sha256", - "hash": "8681e0d638be6b14d5f47810364b63df585deb1483ed65f09597a6d3cb35f1dc", - "url": "https://files.pythonhosted.org/packages/53/71/35a1f657903be374166ba9c9b53a53649d771d2a34f81dd31f57786d8029/pyoxidizer-0.22.0-py3-none-manylinux2014_aarch64.whl" - }, - { - "algorithm": "sha256", - "hash": "785f87f8084ab94cd47477cc8258cf126aaef0ca7e0e52bb1f4b666cffc388f8", - "url": "https://files.pythonhosted.org/packages/11/08/5247c4c363806d47776156e71753d00c25ecb46122f7d02a5cbd4d072da7/pyoxidizer-0.22.0-py3-none-macosx_11_0_arm64.whl" - }, - { - "algorithm": "sha256", - "hash": "6e1c5ad4ee1990d58ef9d09c3f950c11f921df8b30325a8c130cf1f3d2fa7a28", - "url": "https://files.pythonhosted.org/packages/70/4b/bfef31a0357412b1a43a6128fdd97644823704aa04477ee0cb369fc72620/pyoxidizer-0.22.0-py3-none-manylinux2010_x86_64.whl" - }, - { - "algorithm": "sha256", - "hash": "a07166628b1c838855d2208daad1268ed430f13751a903966ed96db1713be3fd", - "url": "https://files.pythonhosted.org/packages/b9/5f/92c3581be5b5906301b72de226705f63f6069b4cdb8d0f3e85e1dfa9e99a/pyoxidizer-0.22.0-py3-none-macosx_10_9_x86_64.whl" - } - ], - "project_name": "pyoxidizer", - "requires_dists": [], - "requires_python": null, - "version": "0.22.0" - } - ], - "platform_tag": null - } - ], - "path_mappings": {}, - "pex_version": "2.1.111", - "pip_version": "20.3.4-patched", - "prefer_older_binary": false, - "requirements": [ - "pyoxidizer==0.22.0" - ], - "requires_python": [ - ">=3.9" - ], - "resolver_version": "pip-2020-resolver", - "style": "universal", - "target_systems": [ - "linux", - "mac" - ], - "transitive": true, - "use_pep517": null -} diff --git a/pants.toml b/pants.toml index df03f67..30cb137 100644 --- a/pants.toml +++ b/pants.toml @@ -48,8 +48,8 @@ interpreter_constraints = [">=3.9"] tailor_pex_binary_targets = false [python.resolves] -pants-plugins = "build-support/pants-plugins/lock.txt" -python-default = "build-support/python/default_lock.txt" +pants-plugins = "build-support/lockfiles/pants-plugins.lock" +python-default = "build-support/lockfiles/python-default.lock" [python.resolves_to_interpreter_constraints] pants-plugins = [">=3.9,<3.10"]