@@ -27,33 +27,27 @@ jobs:
27
27
28
28
- uses : conda-incubator/setup-miniconda@v2
29
29
with :
30
- miniconda-version : latest
30
+ miniforge-variant : Mambaforge
31
+ miniforge-version : latest
31
32
activate-environment : conda-lock
32
- channels : conda-forge
33
- channel-priority : strict
34
33
python-version : " 3.11"
35
34
condarc-file : ci/conda-lock/condarc
35
+ use-mamba : true
36
36
37
37
- name : install conda libmamba solver
38
- run : conda install -n base conda-libmamba-solver
39
-
40
- - name : set solver to libmamba
41
- run : conda config --set solver libmamba
42
-
43
- - name : install conda-lock
44
- run : conda install conda-lock=1.4
38
+ run : mamba install --name base conda-lock=2.3
45
39
46
40
- name : generate lock file
47
- run : ./ci/conda-lock/generate.sh " ${{ matrix.python-version }}"
41
+ run : ./ci/conda-lock/generate.sh ${{ matrix.python-version }} --lockfile ci/conda-lock/python-${{ matrix.python-version }}.yml
48
42
49
43
- name : create conda environment
50
- run : conda create --name ibis${{ matrix.python-version }} --file conda-lock/linux-64- ${{ matrix.python-version }}.lock
44
+ run : conda-lock install --name ibis${{ matrix.python-version }} --file ci/ conda-lock/python- ${{ matrix.python-version }}.yml
51
45
52
46
- name : upload conda lock files
53
47
uses : actions/upload-artifact@v3
54
48
with :
55
49
name : conda-lock-files-${{ github.run_attempt }}
56
- path : conda-lock/*-${{ matrix. python-version }}.lock
50
+ path : ci/ conda-lock/python-*.yml
57
51
58
52
condalock_pr :
59
53
if : github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
81
75
uses : actions/download-artifact@v3
82
76
with :
83
77
name : conda-lock-files-${{ github.run_attempt }}
84
- path : conda-lock
78
+ path : ci/ conda-lock
85
79
86
80
- uses : peter-evans/create-pull-request@v5
87
81
id : create_pr
90
84
commit-message : " chore(conda-lock): relock"
91
85
branch : " create-pull-request/conda-relock"
92
86
delete-branch : true
93
- add-paths : conda-lock/*.lock
87
+ add-paths : ci/ conda-lock/python-*.yml
94
88
committer : " ibis-squawk-bot[bot] <ibis-squawk-bot[bot]@users.noreply.github.com>"
95
89
author : " ibis-squawk-bot[bot] <ibis-squawk-bot[bot]@users.noreply.github.com>"
96
90
title : " chore(conda-lock): relock"
@@ -110,49 +104,3 @@ jobs:
110
104
token : ${{ steps.generate_pr_token.outputs.token }}
111
105
pull-request-number : ${{ steps.create_pr.outputs.pull-request-number }}
112
106
merge-method : rebase
113
-
114
- condalock_push :
115
- if : github.event_name == 'repository_dispatch'
116
- runs-on : ubuntu-latest
117
- needs :
118
- - condalock
119
- steps :
120
- - uses : tibdex/github-app-token@v2
121
- id : generate_token
122
- with :
123
- app_id : ${{ secrets.SQUAWK_BOT_APP_ID }}
124
- private_key : ${{ secrets.SQUAWK_BOT_APP_PRIVATE_KEY }}
125
-
126
- - uses : actions/checkout@v4
127
- with :
128
- token : ${{ steps.generate_token.outputs.token }}
129
- repository : ${{ github.event.client_payload.pull_request.head.repo.full_name }}
130
- ref : ${{ github.event.client_payload.pull_request.head.ref }}
131
-
132
- - name : download conda lock files
133
- uses : actions/download-artifact@v3
134
- with :
135
- name : conda-lock-files-${{ github.run_attempt }}
136
- path : conda-lock
137
-
138
- - name : Configure git info
139
- run : |
140
- set -euo pipefail
141
-
142
- git config --global user.name 'ibis-squawk-bot[bot]'
143
- git config --global user.email 'ibis-squawk-bot[bot]@users.noreply.github.com'
144
-
145
- - name : commit lock files and push to PR
146
- run : |
147
- set -euo pipefail
148
-
149
- git add conda-lock/*.lock
150
-
151
- if git commit -m 'chore(conda-lock): relock'; then
152
- # pull in case another commit happened in the meantime
153
- #
154
- # `ours` is actually the *other* changeset, not the current branch, per
155
- # https://stackoverflow.com/a/3443225/564538
156
- git pull --rebase -s recursive -X ours
157
- git push
158
- fi
0 commit comments