Skip to content

Commit 6ca4a34

Browse files
hard pin sofa in sofa-python3 recipe to prevent inconsistent timing in repo indexing
1 parent d14bd9c commit 6ca4a34

File tree

4 files changed

+24
-7
lines changed

4 files changed

+24
-7
lines changed

.github/workflows/build_publish_package.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ on:
3333
git-commit-date:
3434
required: false
3535
type: string
36+
sofa-git-sha:
37+
required: false
38+
type: string
3639
secrets:
3740
api-key:
3841
required: true
@@ -117,7 +120,7 @@ jobs:
117120
cd conda/recipes/${{ inputs.recipe-dir }}/${{ inputs.package-name }}/recipe
118121
# if a git SHA1 has been provided, use it
119122
if [[ ! -z "${{ inputs.git-sha }}" && ! -z "${{ inputs.git-commit-date }}" ]]; then
120-
sed -e "s/%GIT_SHA%/${{ inputs.git-sha }}/g" -e "s/%DATE_YYYYMMDD%/${{ inputs.git-commit-date }}/g" recipe.yaml.in > recipe.yaml
123+
sed -e "s/%GIT_SHA%/${{ inputs.git-sha }}/g" -e "s/%DATE_YYYYMMDD%/${{ inputs.git-commit-date }}/g" -e "s/%GIT_SHA%/${{ inputs.sofa-git-sha }}/g" recipe.yaml.in > recipe.yaml
121124
fi
122125
# Show configured recipe
123126
echo "==== Configured recipe:"

.github/workflows/devel-sofa-all.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ jobs:
9191
if: ${{ needs.build-publish-sofa.result == 'success' }}
9292
with:
9393
git-sha: ${{ needs.extract-params.outputs.sofa-python3-git-sha }}
94-
git-commit-date: ${{ needs.extract-params.outputs.sofa-python3-git-commit-date }}
94+
git-commit-date: ${{ needs.extract-params.outputs.sofa-python3-git-commit-date }}
95+
sofa-git-sha: ${{ needs.extract-params.outputs.sofa-git-sha }}
9596
secrets: inherit
9697

9798
notify-end:

.github/workflows/devel-sofa-python3.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
description: 'Git commit date'
1111
required: true
1212
type: string
13+
sofa-git-sha:
14+
description: 'SOFA Git commit SHA1'
15+
required: true
16+
type: string
1317
workflow_dispatch:
1418
inputs:
1519
git-sha:
@@ -21,7 +25,11 @@ on:
2125
description: 'Git commit date'
2226
required: true
2327
type: string
24-
default: 'NODATE' # for testing
28+
default: 'NODATE' # for testing
29+
sofa-git-sha:
30+
description: 'SOFA Git commit SHA1'
31+
required: true
32+
type: string
2533
repository_dispatch:
2634
types: [build-devel-sofa-python3]
2735
pull_request:
@@ -64,15 +72,18 @@ jobs:
6472
if [[ "${{ github.event_name }}" == "workflow_dispatch" || "${{ github.event_name }}" == "workflow_call" ]]; then
6573
echo "git-sha=${{ inputs.git-sha }}" >> $GITHUB_OUTPUT
6674
echo "git-commit-date=${{ inputs.git-commit-date }}" >> $GITHUB_OUTPUT
75+
echo "sofa-git-sha=${{ inputs.sofa-git-sha }}" >> $GITHUB_OUTPUT
6776
elif [[ "${{ github.event_name }}" == "repository_dispatch" ]]; then
6877
echo "git-sha=${{ github.event.client_payload.sofa_python3_commit_hash }}" >> $GITHUB_OUTPUT
6978
echo "git-commit-date=${{ github.event.client_payload.sofa_python3_commit_date }}" >> $GITHUB_OUTPUT
79+
echo "sofa-git-sha=${{ github.event.client_payload.sofa_commit_hash }}" >> $GITHUB_OUTPUT
7080
fi
7181
7282
- name: Check parameters
7383
run: |
7484
echo "✓ git-sha: ${{ steps.params.outputs.git-sha }}"
7585
echo "✓ git-commit-date: ${{ steps.params.outputs.git-commit-date }}"
86+
echo "✓ sofa-git-sha: ${{ steps.params.outputs.sofa-git-sha }}"
7687
7788
build-publish-sofa-python3:
7889
strategy:
@@ -99,5 +110,6 @@ jobs:
99110
publish-package: ${{ (github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true) || github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'repository_dispatch' }}
100111
git-sha: ${{ needs.extract-params.outputs.git-sha }}
101112
git-commit-date: ${{ needs.extract-params.outputs.git-commit-date }}
113+
sofa-git-sha: ${{ needs.extract-params.outputs.sofa-git-sha }}
102114
secrets:
103115
api-key: ${{ secrets.PREFIXDEV_APIKEY }}

conda/recipes/devel/sofa-python3/recipe/recipe.yaml.in

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ context:
66
minor: ${{ (version | split('.'))[1] }}
77
major_minor: ${{ major }}.${{ minor }}
88
git_sha: %GIT_SHA%
9+
sofa_git_sha: %SOFA_GIT_SHA%
910

1011
package:
1112
name: ${{ name }}
@@ -47,8 +48,8 @@ requirements:
4748
- numpy
4849
- pybind11
4950
host:
50-
- sofa-devel ${{ major_minor }}.dev*
51-
- sofa-gl ${{ major_minor }}.dev*
51+
- sofa-devel ${{ major_minor }}.dev* dev_${{ sofa_git_sha[:7] }}
52+
- sofa-gl ${{ major_minor }}.dev* dev_${{ sofa_git_sha[:7] }}
5253
- eigen
5354
- libboost-headers
5455
- glew
@@ -57,8 +58,8 @@ requirements:
5758
- numpy
5859
- pybind11
5960
run:
60-
- sofa-devel ${{ major_minor }}.dev*
61-
- sofa-gl ${{ major_minor }}.dev*
61+
- sofa-devel ${{ major_minor }}.dev* dev_${{ sofa_git_sha[:7] }}
62+
- sofa-gl ${{ major_minor }}.dev* dev_${{ sofa_git_sha[:7] }}
6263
- ${{ pin_compatible('numpy') }}
6364
- python
6465
run_exports:

0 commit comments

Comments
 (0)