From 02e5953069899ab6ac41830f1e7efff9574f0328 Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Tue, 20 Aug 2024 11:57:04 +0200 Subject: [PATCH 1/7] Update `pixi` lockfile in CI --- .github/workflows/update_pixi_lockfile.yml | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/update_pixi_lockfile.yml diff --git a/.github/workflows/update_pixi_lockfile.yml b/.github/workflows/update_pixi_lockfile.yml new file mode 100644 index 000000000..8e75a6c06 --- /dev/null +++ b/.github/workflows/update_pixi_lockfile.yml @@ -0,0 +1,56 @@ +name: Update pixi lockfile + +permissions: + contents: write + pull-requests: write + +on: + workflow_dispatch: + schedule: + - cron: 0 5 1 * * + +jobs: + pixi-update: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + with: + lfs: true + + - name: Set up pixi + uses: prefix-dev/setup-pixi@v0.8.1 + with: + run-install: false + + - name: Install pixi-diff-to-markdown + run: pip install pixi-diff-to-markdown + + - name: Update pixi lockfile and generate diff + run: | + set -o pipefail + pixi update --json --no-install + pixi-diff-to-markdown --explicit-column=true --hide=false > diff.md + + - name: Configure Git for LFS + run: | + git lfs install + git config --global user.name 'github-actions' + git config --global user.email 'actions@github.com' + + - name: Commit and push changes + run: | + git add pixi.lock + git commit -m "Update pixi.lock file" + git push origin HEAD:update-pixi + + - name: Create pull request + uses: peter-evans/create-pull-request@v6 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: This PR updates the `pixi` lockfile. + title: Update `pixi` lockfile + body-path: diff.md + branch: update-pixi + base: main + labels: pixi + delete-branch: true From 55cc388a3088e02f4ef785214f5eeaa8e4d3a6e5 Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Wed, 21 Aug 2024 09:44:41 +0200 Subject: [PATCH 2/7] Use uniquely named branches when opening PRs --- .github/workflows/update_pixi_lockfile.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update_pixi_lockfile.yml b/.github/workflows/update_pixi_lockfile.yml index 8e75a6c06..2953d7dce 100644 --- a/.github/workflows/update_pixi_lockfile.yml +++ b/.github/workflows/update_pixi_lockfile.yml @@ -39,9 +39,11 @@ jobs: - name: Commit and push changes run: | + BRANCH_NAME="update-pixi-$(date +'%Y%m%d%H%M%S')" + git checkout -b "$BRANCH_NAME" git add pixi.lock git commit -m "Update pixi.lock file" - git push origin HEAD:update-pixi + git push origin HEAD:"$BRANCH_NAME" - name: Create pull request uses: peter-evans/create-pull-request@v6 @@ -50,7 +52,7 @@ jobs: commit-message: This PR updates the `pixi` lockfile. title: Update `pixi` lockfile body-path: diff.md - branch: update-pixi + branch: ${{ github.ref_name }} base: main labels: pixi delete-branch: true From 667191d8239b34ce8cd15bf0ae4688d61383fb91 Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Wed, 21 Aug 2024 09:46:43 +0200 Subject: [PATCH 3/7] Install `pixi-diff-to-markdown` via `pixi` --- .github/workflows/update_pixi_lockfile.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/update_pixi_lockfile.yml b/.github/workflows/update_pixi_lockfile.yml index 2953d7dce..144db403f 100644 --- a/.github/workflows/update_pixi_lockfile.yml +++ b/.github/workflows/update_pixi_lockfile.yml @@ -23,13 +23,12 @@ jobs: run-install: false - name: Install pixi-diff-to-markdown - run: pip install pixi-diff-to-markdown + run: pixi global install pixi-diff-to-markdown - name: Update pixi lockfile and generate diff run: | set -o pipefail - pixi update --json --no-install - pixi-diff-to-markdown --explicit-column=true --hide=false > diff.md + pixi update --json | pixi exec pixi-diff-to-markdown --explicit-column > diff.md - name: Configure Git for LFS run: | @@ -39,20 +38,16 @@ jobs: - name: Commit and push changes run: | - BRANCH_NAME="update-pixi-$(date +'%Y%m%d%H%M%S')" - git checkout -b "$BRANCH_NAME" - git add pixi.lock - git commit -m "Update pixi.lock file" - git push origin HEAD:"$BRANCH_NAME" + echo "BRANCH_NAME=update-pixi-$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV - name: Create pull request uses: peter-evans/create-pull-request@v6 with: token: ${{ secrets.GITHUB_TOKEN }} - commit-message: This PR updates the `pixi` lockfile. + commit-message: Update `pixi.lock` title: Update `pixi` lockfile body-path: diff.md - branch: ${{ github.ref_name }} + branch: ${{ env.BRANCH_NAME }} base: main labels: pixi delete-branch: true From 40d275c521ad929239a514a4ca82a841e2bbb3db Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Wed, 21 Aug 2024 10:02:50 +0200 Subject: [PATCH 4/7] Fix TOML parse error in `pyproject.toml` --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index dc2ddd26a..0699a2c20 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -206,7 +206,7 @@ pytest-icdiff = "*" robot_descriptions = "*" [tool.pixi.feature.gpu] -dependencies = { cuda-version = "12.*", cuda-cupti = "*", jaxlib = "**cuda*" } +dependencies = { cuda-version = "12.*", cuda-cupti = "*" } platforms = ["linux-64"] system-requirements = { cuda = "12.1" } From 667d4f3edddad5e23b8b2ccbc34eef4c5e04b52f Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti <102977828+flferretti@users.noreply.github.com> Date: Wed, 21 Aug 2024 13:04:53 +0200 Subject: [PATCH 5/7] Ignore untracked `diff` file --- .github/workflows/update_pixi_lockfile.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/update_pixi_lockfile.yml b/.github/workflows/update_pixi_lockfile.yml index 144db403f..1bc8fa334 100644 --- a/.github/workflows/update_pixi_lockfile.yml +++ b/.github/workflows/update_pixi_lockfile.yml @@ -50,4 +50,5 @@ jobs: branch: ${{ env.BRANCH_NAME }} base: main labels: pixi + add-paths: pixi.lock delete-branch: true From 9ff30941553dbadb6c6d8d24b37af734fe7f6145 Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti <102977828+flferretti@users.noreply.github.com> Date: Wed, 21 Aug 2024 13:07:07 +0200 Subject: [PATCH 6/7] Remove `lfs` configuration setup Co-authored-by: Diego Ferigo --- .github/workflows/update_pixi_lockfile.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/update_pixi_lockfile.yml b/.github/workflows/update_pixi_lockfile.yml index 1bc8fa334..202a17533 100644 --- a/.github/workflows/update_pixi_lockfile.yml +++ b/.github/workflows/update_pixi_lockfile.yml @@ -30,12 +30,6 @@ jobs: set -o pipefail pixi update --json | pixi exec pixi-diff-to-markdown --explicit-column > diff.md - - name: Configure Git for LFS - run: | - git lfs install - git config --global user.name 'github-actions' - git config --global user.email 'actions@github.com' - - name: Commit and push changes run: | echo "BRANCH_NAME=update-pixi-$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV From aa532e299c9579665cbb46e6ac477aaff5f3ca54 Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti Date: Wed, 21 Aug 2024 13:36:32 +0200 Subject: [PATCH 7/7] Force `jaxlib` CUDA build with `pixi` GPU environment Co-authored-by: Diego Ferigo --- pyproject.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0699a2c20..d63b6d99b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -206,10 +206,14 @@ pytest-icdiff = "*" robot_descriptions = "*" [tool.pixi.feature.gpu] -dependencies = { cuda-version = "12.*", cuda-cupti = "*" } platforms = ["linux-64"] system-requirements = { cuda = "12.1" } +[tool.pixi.feature.gpu.dependencies] +cuda-cupti = "*" +cuda-version = "12.*" +jaxlib = {version = "*", build = "*cuda*"} + [tool.pixi.pypi-dependencies] jaxsim = { path = "./", editable = true }