Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
e3f37ad7f637bfbf1e6755fded66cf25b1a9bede
[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     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           apt install ninja libboost-dev libboost-context-dev libns3-dev
25           cmake -GNinja -Denable_debug=ON -Denable_documentation=OFF -Denable_coverage=OFF \
26                 -Denable_compile_optimizations=ON -Denable_compile_warnings=ON \
27                 -Denable_model-checking=OFF -Denable_smpi_MBI_testsuite=OFF \
28                 -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON \
29                 -Denable_ns3=ON \
30                 -DCMAKE_DISABLE_SOURCE_CHANGES=ON  -DLTO_EXTRA_FLAG="auto"
31           ninja tests VERBOSE=1
32           ctest --output-on-verbose
33       - name: Create the failure Message
34         if: ${{ failure() }}
35         run: |
36           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
37       - name: Create the success Message
38         if: ${{ success() }}
39         run: |
40           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
41       - uses: mattermost/action-mattermost-notify@master
42         env:
43           MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
44           MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
45
46   simgrid-modelcheck-ubuntu:
47
48     runs-on: ubuntu-latest
49     permissions:
50       contents: read
51       packages: write
52
53     steps:
54       - name: Checkout repository
55         uses: actions/checkout@v2
56
57       - name: build
58         run: |
59           apt install ninja libboost-dev libboost-context-dev
60           cmake -GNinja -Denable_debug=ON -Denable_documentation=OFF -Denable_coverage=OFF \
61                 -Denable_compile_optimizations=ON -Denable_compile_warnings=ON \
62                 -Denable_model-checking=ON -Denable_smpi_MBI_testsuite=OFF \
63                 -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=OFF \
64                 -Denable_ns3=OFF \
65                 -DCMAKE_DISABLE_SOURCE_CHANGES=ON  -DLTO_EXTRA_FLAG="auto"
66           ninja tests VERBOSE=1
67           ctest --output-on-verbose
68       - name: Create the failure Message
69         if: ${{ failure() }}
70         run: |
71           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
72       - name: Create the success Message
73         if: ${{ success() }}
74         run: |
75           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
76       - uses: mattermost/action-mattermost-notify@master
77         env:
78           MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
79           MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
80