Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
GH action: use existing runners
[simgrid.git] / .github / workflows / git.yml
1 name: Git build on various OS and setups
2
3 # This workflow uses actions that are not certified by GitHub.
4 # They are provided by a third-party and are governed by
5 # separate terms of service, privacy policy, and support
6 # documentation.
7
8 # Only trigger manually
9 on: workflow_dispatch
10
11 jobs:
12   simgrid-regular:
13     strategy:
14       matrix:
15         os: [ubuntu-latest, macos-latest]
16     runs-on: ${{ matrix.os }}
17     permissions:
18       contents: read
19       packages: write
20
21     steps:
22       - name: Checkout repository
23         uses: actions/checkout@v2
24
25       - name: build
26         run: |
27           cmake -GNinja -Denable_debug=ON -Denable_documentation=OFF -Denable_coverage=OFF \
28                 -Denable_compile_optimizations=ON -Denable_compile_warnings=ON \
29                 -Denable_model-checking=OFF -Denable_smpi_MBI_testsuite=OFF \
30                 -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON \
31                 -Denable_ns3=ON \
32                 -DCMAKE_DISABLE_SOURCE_CHANGES=ON  -DLTO_EXTRA_FLAG="auto"
33           ninja tests VERBOSE=1
34           ctest --output-on-verbose
35       - name: Create the failure Message
36         if: ${{ failure() }}
37         run: |
38           ver=$(grep set.SIMGRID_VERSION_MINOR CMakeLists.txt|sed 's/[^"]*"//'|sed 's/".*$//') echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building STABLE docker image v3.$ver! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
39       - name: Create the success Message
40         if: ${{ success() }}
41         run: |
42           ver=$(grep set.SIMGRID_VERSION_MINOR CMakeLists.txt|sed 's/[^"]*"//'|sed 's/".*$//') echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker STABLE image v3.$ver built and pushed successfully! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
43       - uses: mattermost/action-mattermost-notify@master
44         env:
45           MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
46           MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
47
48   simgrid-modelcheck-ubuntu:
49
50     runs-on: ubuntu-latest
51     permissions:
52       contents: read
53       packages: write
54
55     steps:
56       - name: Checkout repository
57         uses: actions/checkout@v2
58
59       - name: build
60         run: |
61           cmake -GNinja -Denable_debug=ON -Denable_documentation=OFF -Denable_coverage=OFF \
62                 -Denable_compile_optimizations=ON -Denable_compile_warnings=ON \
63                 -Denable_model-checking=ON -Denable_smpi_MBI_testsuite=OFF \
64                 -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=OFF \
65                 -Denable_ns3=OFF \
66                 -DCMAKE_DISABLE_SOURCE_CHANGES=ON  -DLTO_EXTRA_FLAG="auto"
67           ninja tests VERBOSE=1
68           ctest --output-on-verbose
69       - name: Create the failure Message
70         if: ${{ failure() }}
71         run: |
72           ver=$(grep set.SIMGRID_VERSION_MINOR CMakeLists.txt|sed 's/[^"]*"//'|sed 's/".*$//') echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building STABLE docker image v3.$ver! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
73       - name: Create the success Message
74         if: ${{ success() }}
75         run: |
76           ver=$(grep set.SIMGRID_VERSION_MINOR CMakeLists.txt|sed 's/[^"]*"//'|sed 's/".*$//') echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker STABLE image v3.$ver built and pushed successfully! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
77       - uses: mattermost/action-mattermost-notify@master
78         env:
79           MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
80           MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
81