From 98cd087b93b7de4444cf681b4ca7476d683e0e6e Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Wed, 7 Aug 2024 11:07:20 +1200 Subject: [PATCH 1/3] Let conda-lock produce both unified and platform-specific lockfiles Passing `--kind=lock` flag to produce unified 'conda-lock.yml' file, in addition to the current 'conda-linux-64.lock' file. --- .github/workflows/conda-lock-command.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/conda-lock-command.yml b/.github/workflows/conda-lock-command.yml index 7495787..e9115ee 100644 --- a/.github/workflows/conda-lock-command.yml +++ b/.github/workflows/conda-lock-command.yml @@ -45,10 +45,10 @@ jobs: conda-lock mamba - # Run "conda-lock" for linux-64 only + # Generate unified 'conda-lock.yml' and platform-specific lockfiles - name: Run conda-lock run: | - conda-lock lock --mamba --kind explicit --file environment.yml --platform linux-64 + conda-lock lock --mamba --kind lock --kind explicit --file environment.yml --platform linux-64 # Commit the change to the PR branch if any changes - name: Commit condalock files to PR From db20db3db96a2f2cbd6a2dcf25286c3135cda311 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Wed, 7 Aug 2024 11:16:54 +1200 Subject: [PATCH 2/3] Generate unified lockfile first, then render to linux-specific lockfile Separate the two steps so that the unified lockfile is the source that is used to produce the platform-specific lockfiles later. --- .github/workflows/conda-lock-command.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/conda-lock-command.yml b/.github/workflows/conda-lock-command.yml index e9115ee..b07e7eb 100644 --- a/.github/workflows/conda-lock-command.yml +++ b/.github/workflows/conda-lock-command.yml @@ -48,7 +48,8 @@ jobs: # Generate unified 'conda-lock.yml' and platform-specific lockfiles - name: Run conda-lock run: | - conda-lock lock --mamba --kind lock --kind explicit --file environment.yml --platform linux-64 + conda-lock lock --mamba --kind lock --file environment.yml --platform linux-64 + conda-lock render --kind explicit --platform linux-64 # Commit the change to the PR branch if any changes - name: Commit condalock files to PR From 0018bf6652dca7e15eccc044bec739b38f03122a Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Wed, 7 Aug 2024 13:20:39 +1200 Subject: [PATCH 3/3] Update .github/workflows/conda-lock-command.yml Co-authored-by: Scott Henderson --- .github/workflows/conda-lock-command.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda-lock-command.yml b/.github/workflows/conda-lock-command.yml index b07e7eb..a018288 100644 --- a/.github/workflows/conda-lock-command.yml +++ b/.github/workflows/conda-lock-command.yml @@ -48,7 +48,7 @@ jobs: # Generate unified 'conda-lock.yml' and platform-specific lockfiles - name: Run conda-lock run: | - conda-lock lock --mamba --kind lock --file environment.yml --platform linux-64 + conda-lock lock --mamba --file environment.yml --platform linux-64 conda-lock render --kind explicit --platform linux-64 # Commit the change to the PR branch if any changes