Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
A few spelling mistakes and many replacements: [Ss]imgrid -> SimGrid.
[simgrid.git] / .github / workflows / git.yml
index 09ef13c..39d03c2 100644 (file)
@@ -22,7 +22,7 @@ jobs:
 
     steps:
       - name: Checkout repository
-        uses: actions/checkout@v2
+        uses: actions/checkout@v3
       - name: Init options
         run: |
           echo "CC=${{ matrix.config.cc }}"   >> $GITHUB_ENV
@@ -43,7 +43,7 @@ jobs:
                 -Denable_smpi=ON -Denable_smpi_MPICH3_testsuite=ON \
                 -DCMAKE_DISABLE_SOURCE_CHANGES=ON  -DLTO_EXTRA_FLAG="auto" ..
           ninja tests
-          ctest --output-on-failure
+          ctest --output-on-failure -j$(nproc)
       - name: Create the failure Message
         if: ${{ failure() }}
         run: |
@@ -51,11 +51,13 @@ jobs:
       - name: Create the success Message
         if: ${{ success() }}
         run: |
-          ver=$(grep set.SIMGRID_VERSION_MINOR CMakeLists.txt|sed 's/[^"]*"//'|sed 's/".*$//') echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Simgrid built successfully on ${{ matrix.config.name }}! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
-      - uses: mattermost/action-mattermost-notify@master
+          ver=$(grep set.SIMGRID_VERSION_MINOR CMakeLists.txt|sed 's/[^"]*"//'|sed 's/".*$//') echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"SimGrid built successfully on ${{ matrix.config.name }}! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
+      - uses: komarnitskyi/action-mattermost-notification@v0.1.2-beta
+        if: ${{ always() }}
         env:
-          MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
-          MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
+          webhook: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
+          channel: ${{ secrets.MATTERMOST_CHANNEL}}
+          json: mattermost.json
 
   simgrid-modelcheck-ubuntu:
 
@@ -66,7 +68,7 @@ jobs:
 
     steps:
       - name: Checkout repository
-        uses: actions/checkout@v2
+        uses: actions/checkout@v3
 
       - name: build
         run: |
@@ -80,7 +82,7 @@ jobs:
                 -Denable_ns3=OFF \
                 -DCMAKE_DISABLE_SOURCE_CHANGES=ON  -DLTO_EXTRA_FLAG="auto" ..
           ninja tests
-          ctest --output-on-failure
+          ctest --output-on-failure -j$(nproc)
       - name: Create the failure Message
         if: ${{ failure() }}
         run: |
@@ -89,8 +91,9 @@ jobs:
         if: ${{ success() }}
         run: |
           ver=$(grep set.SIMGRID_VERSION_MINOR CMakeLists.txt|sed 's/[^"]*"//'|sed 's/".*$//') echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Simgrid Modelchecker built successfully on ubuntu-stable! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
-      - uses: mattermost/action-mattermost-notify@master
+      - uses: komarnitskyi/action-mattermost-notification@v0.1.2-beta
+        if: ${{ always() }}
         env:
-          MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
-          MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
-
+          webhook: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
+          channel: ${{ secrets.MATTERMOST_CHANNEL}}
+          json: mattermost.json