Skip to content

Commit a8413f6

Browse files
authored
Merge branch 'master' into 2025_sprintsed_BehaviorModel
2 parents 135aac9 + 7a6475a commit a8413f6

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
path: ${{ env.WORKSPACE_SRC_PATH }}
4242

4343
- name: Build and install
44+
id: build-and-install
4445
shell: bash
4546
run: |
4647
if [[ "$RUNNER_OS" == "Windows" ]]; then
@@ -82,12 +83,14 @@ jobs:
8283
echo "artifact_name=$artifact_name" >> $env:GITHUB_OUTPUT
8384
8485
- name: Create artifact
86+
id: create-artifact
8587
uses: actions/upload-artifact@v4.4.0
8688
with:
8789
name: ${{ steps.sanitize.outputs.artifact_name }}
8890
path: ${{ env.WORKSPACE_INSTALL_PATH }}
8991

9092
- name: Install artifact
93+
id: install-artifact
9194
uses: actions/download-artifact@v4.1.7
9295
with:
9396
name: ${{ steps.sanitize.outputs.artifact_name }}
@@ -120,12 +123,43 @@ jobs:
120123
ls -la "$WORKSPACE_ARTIFACT_PATH"
121124
122125
- name: Run test PluginExample_test
126+
id: unit-tests
123127
if: always()
124128
shell: bash
125129
run: |
126130
cd $WORKSPACE_BUILD_PATH
127131
./PluginExample_test/PluginExample_test${{ steps.sofa.outputs.exe }}
128132
133+
- name: Notify dashboard
134+
if: always() && startsWith(github.repository, 'sofa-framework') && startsWith(github.ref, 'refs/heads/master') # we are not on a fork and on master
135+
env:
136+
DASH_AUTH: ${{ secrets.PLUGIN_DASH }}
137+
shell: bash
138+
run: |
139+
os=$(echo "${{ matrix.os }}" | awk -F- '{ print $1 }')
140+
141+
test_status=$([ '${{ steps.unit-tests.outcome }}' == 'success' ] && \
142+
echo 'true' || echo 'false')
143+
144+
build_status=$([ '${{ steps.build-and-install.outcome }}' == 'success' ] && \
145+
echo 'true' || echo 'false')
146+
147+
binary_status=$([ '${{ steps.create-artifact.outcome }}' == 'success' ] && \
148+
[ '${{ steps.install-artifact.outcome }}' == 'success' ] && \
149+
[ '${{ steps.sanitize.outcome }}' == 'success' ] && \
150+
echo 'true' || echo 'false')
151+
152+
153+
curl -X POST -H "X-API-KEY: $DASH_AUTH" -H "Content-Type: application/json" -d \
154+
"{\"id\":\"$(echo "${{ github.repository }}" | awk -F/ '{ print $2 }')\",\
155+
\"github_ref\":\"${{ github.sha }}\",\
156+
\"url\":\"https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\",\
157+
\"os\":\"$os\",\
158+
\"build\":$build_status,\
159+
\"tests\":$test_status,\
160+
\"binary\":$binary_status}"\
161+
https://sofa-framework.org:5000/api/v1/plugins
162+
129163
deploy:
130164
name: Deploy artifacts
131165
if: always() && startsWith(github.ref, 'refs/heads/') # we are on a branch (not a PR)

0 commit comments

Comments
 (0)