Skip to content

Commit c5f4e10

Browse files
committed
fix workflow
1 parent 10687d6 commit c5f4e10

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

.github/workflows/build-wheels.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ jobs:
1818
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
1919

2020
steps:
21-
- uses: actions/checkout@v4
21+
22+
- name: Check out repository
23+
uses: actions/checkout@v4
24+
- name: Extract branch name
25+
shell: bash
26+
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
27+
id: extract_branch
2228

2329
# Ubuntu: Install CGAL and dependencies
2430
- name: Install CGAL on Ubuntu
@@ -70,8 +76,8 @@ jobs:
7076
id: cached-pip-wheels
7177
uses: actions/cache@v3
7278
with:
73-
path: ~/.cache
74-
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
79+
path: ~/.cache
80+
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ steps.extract_branch.outputs.branch }}
7581

7682
- name: Install dependencies
7783
run: |
@@ -103,6 +109,10 @@ jobs:
103109
runs-on: ubuntu-latest
104110
steps:
105111
- uses: actions/checkout@v4
112+
- name: Extract branch name
113+
shell: bash
114+
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
115+
id: extract_branch
106116

107117
- name: Set up Python
108118
id: setup-python
@@ -115,13 +125,12 @@ jobs:
115125
with:
116126
virtualenvs-create: true
117127
virtualenvs-in-project: true
118-
119128
- name: Load cached venv
120129
id: cached-pip-wheels
121130
uses: actions/cache@v3
122131
with:
123-
path: ~/.cache
124-
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
132+
path: ~/.cache
133+
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ steps.extract_branch.outputs.branch }}
125134

126135
- name: Install CGAL on Ubuntu
127136
run: |

0 commit comments

Comments
 (0)