Skip to content

Commit

Permalink
Update snapshot-ci.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Clément Leclerc <[email protected]>
  • Loading branch information
clementleclercRTE authored Dec 2, 2024
1 parent 9c1bb98 commit 8043586
Showing 1 changed file with 20 additions and 49 deletions.
69 changes: 20 additions & 49 deletions .github/workflows/snapshot-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,14 @@ jobs:
name: Build ${{ matrix.config.name }} ${{ matrix.python.name }} wheel
runs-on: ${{ matrix.config.os }}
outputs:
matrix_result: ${{ steps.set_result.outputs.result }}
build_status: ${{ steps.build_status.outputs.BUILD_STATUS_CONTENT }}
strategy:
matrix:
config:
- { name: ubuntu, os: ubuntu-latest}
- { name: darwin, os: macos-12, macosx_deployment_target: "10.16", bdist_wheel_args: "--plat-name macosx-11.0-x86_64" }
- { name: darwin-arm64, os: macos-14, macosx_deployment_target: "11", bdist_wheel_args: "--plat-name macosx-11.0-arm64" }
- { name: windows, os: windows-2022 }
python:
- { name: cp38, version: '3.8' }
- { name: cp39, version: '3.9' }
- { name: cp310, version: '3.10' }
- { name: cp311, version: '3.11' }
- { name: cp312, version: '3.12' }
fail-fast: false
defaults:
run:
Expand All @@ -52,14 +45,6 @@ jobs:
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}

#INITIALISE REPORT
- name: Initialize test summary
run: |
if [[ "${{ matrix.config.name }}" == "windows" ]]; then
mkdir -p $(dirname "$BUILD_STATUS")
fi
touch "$BUILD_STATUS"
#DEFINE SCRIPTS PATH
- name: Set up script path
run: |
Expand Down Expand Up @@ -261,16 +246,11 @@ jobs:
with:
name: pypowsybl-wheel-${{ matrix.config.name }}-${{ matrix.python.name }}
path: dist/*.whl
- name: Upload wheel
uses: actions/upload-artifact@v3
with:
name: pypowsybl-wheel-${{ matrix.config.name }}-${{ matrix.python.name }}
path: dist/*.whl

- name: Record Matrix Status
if: always()
- name: Record Job Name
if: failure()
run: |
echo "Config: ${{ matrix.config.name }}, Python: ${{ matrix.python.name }} - Status: ${{ job.status }}" >> $BUILD_STATUS
echo "Failed job : Build ${{ matrix.config.name }} ${{ matrix.python.name }} wheel" >> $BUILD_STATUS
- name: Show Build Status Report
if: always()
Expand All @@ -280,31 +260,22 @@ jobs:
cat $BUILD_STATUS
echo "=========================="
- name: Read Build Status
if: always()
id: build_status
run: |
echo "BUILD_STATUS_CONTENT<<EOF" >> $GITHUB_OUTPUT
cat $BUILD_STATUS >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
#SLACK NOTIFICATION ON FAILURE
notify_slack:
needs: build_pypowsybl
runs-on: ubuntu-latest
if: failure()
steps:
- name: Send Slack Notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
text: |
:x: *Failed workflow ${{ github.workflow }}*
*Matrix Jobs Status:*
```
${{ needs.build_pypowsybl.outputs.build_status }}
```
See logs: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
needs: build_pypowsybl
runs-on: ubuntu-latest
if: failure()
steps:
- name: Send Slack Notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
text: |
:x: *Failed workflow ${{ github.workflow }}*
*Failure details:*
```
${{ needs.build_pypowsybl.outputs.build_status }}
```
See logs: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 comments on commit 8043586

Please sign in to comment.