Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
5baaa63ff4a4da9b4afbf384dfbfc6aa0e636aed
[simgrid.git] / .github / workflows / git.yml
1 name: Git builds
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-ubuntu:
13     runs-on: ubuntu-latest
14     permissions:
15       contents: read
16       packages: write
17
18     steps:
19       - name: Checkout repository
20         uses: actions/checkout@v2
21
22       - name: build
23         run: |
24           sudo apt-get update && sudo apt-get install ninja-build libboost-dev libboost-context-dev pybind11-dev libns3-dev
25           mkdir build ; cd build
26           cmake -GNinja -Denable_debug=ON -Denable_documentation=OFF -Denable_coverage=OFF \
27                 -Denable_compile_optimizations=ON -Denable_compile_warnings=ON \
28                 -Denable_model-checking=OFF -Denable_smpi_MBI_testsuite=OFF \
29                 -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON \
30                 -Denable_ns3=ON \
31                 -DCMAKE_DISABLE_SOURCE_CHANGES=ON  -DLTO_EXTRA_FLAG="auto" ..
32           ninja tests
33           ctest --output-on-failure
34       - name: Create the failure Message
35         if: ${{ failure() }}
36         run: |
37           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
38       - name: Create the success Message
39         if: ${{ success() }}
40         run: |
41           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
42       - uses: mattermost/action-mattermost-notify@master
43         env:
44           MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
45           MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
46
47   simgrid-modelcheck-ubuntu:
48
49     runs-on: ubuntu-latest
50     permissions:
51       contents: read
52       packages: write
53
54     steps:
55       - name: Checkout repository
56         uses: actions/checkout@v2
57
58       - name: build
59         run: |
60           sudo apt-get update && sudo apt-get install ninja-build libboost-dev libboost-context-dev pybind11-dev
61           sudo apt-get install libunwind-dev libdw-dev libelf-dev libevent-dev
62           mkdir build ; cd build
63           cmake -GNinja -Denable_debug=ON -Denable_documentation=OFF -Denable_coverage=OFF \
64                 -Denable_compile_optimizations=ON -Denable_compile_warnings=ON \
65                 -Denable_model-checking=ON -Denable_smpi_MBI_testsuite=OFF \
66                 -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=OFF \
67                 -Denable_ns3=OFF \
68                 -DCMAKE_DISABLE_SOURCE_CHANGES=ON  -DLTO_EXTRA_FLAG="auto" ..
69           ninja tests
70           ctest --output-on-failure
71       - name: Create the failure Message
72         if: ${{ failure() }}
73         run: |
74           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
75       - name: Create the success Message
76         if: ${{ success() }}
77         run: |
78           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
79       - uses: mattermost/action-mattermost-notify@master
80         env:
81           MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
82           MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
83