forked from sofa-framework/sofa
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlaunch-conda-packages-build.yml
More file actions
65 lines (54 loc) · 2.54 KB
/
launch-conda-packages-build.yml
File metadata and controls
65 lines (54 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Launch build of development conda packages of SOFA
on:
push:
branches:
- master
jobs:
run:
runs-on: ubuntu-slim
if: ${{ github.repository_owner == 'sofa-framework' }}
steps:
# first extract SOFA and SofaPython3 last commit sha and date on their resp
# master branches, which be used as ref for building the devel conda packages
- uses: actions/checkout@v4
- name: Get SOFA commit date
run: |
SOFA_COMMIT_DATE=$(git show -s --date=format:%Y%m%d --format=%cd ${{ github.sha }})
echo "SOFA_COMMIT_DATE=$SOFA_COMMIT_DATE" >> $GITHUB_ENV
- name: Checkout SOFA Python3
uses: actions/checkout@v4
with:
repository: sofa-framework/SofaPython3
ref: master
token: ${{ secrets.PERF_REG_TOKEN }}
path: SofaPython3
- name: Get SofaPython3 commit info
run: |
cd SofaPython3
SOFA_PYTHON3_SHA=$(git rev-parse HEAD)
SOFA_PYTHON3_COMMIT_DATE=$(git show -s --date=format:%Y%m%d --format=%cd $SOFA_PYTHON3_SHA)
echo "SOFA_PYTHON3_SHA=$SOFA_PYTHON3_SHA" >> $GITHUB_ENV
echo "SOFA_PYTHON3_COMMIT_DATE=$SOFA_PYTHON3_COMMIT_DATE" >> $GITHUB_ENV
- name: Checkout SOFA GLFW
uses: actions/checkout@v4
with:
repository: sofa-framework/SofaGLFW
ref: master
token: ${{ secrets.PERF_REG_TOKEN }}
path: SofaGLFW
- name: Get SofaGLFW commit info
run: |
cd SofaGLFW
SOFAGLFW_SHA=$(git rev-parse HEAD)
SOFAGLFW_COMMIT_DATE=$(git show -s --date=format:%Y%m%d --format=%cd $SOFAGLFW_SHA)
echo "SOFAGLFW_SHA=$SOFAGLFW_SHA" >> $GITHUB_ENV
echo "SOFAGLFW_COMMIT_DATE=$SOFAGLFW_COMMIT_DATE" >> $GITHUB_ENV
- name: Launch build of development conda packages of SOFA
run: |
sudo apt install curl
curl -L -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.PERF_REG_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/sofa-framework/conda-ci/dispatches \
-d '{"event_type":"build-devel-sofa-all","client_payload":{"sofa_commit_date":"${{ env.SOFA_COMMIT_DATE }}","sofa_commit_hash":"${{ github.sha }}","sofa_python3_commit_hash":"${{ env.SOFA_PYTHON3_SHA }}","sofa_python3_commit_date":"${{ env.SOFA_PYTHON3_COMMIT_DATE }}","sofaglfw_commit_hash":"${{ env.SOFAGLFW_SHA }}","sofaglfw_commit_date":"${{ env.SOFAGLFW_COMMIT_DATE }}"}}'