Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add a GH action for the Wrench CI
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sun, 12 Sep 2021 18:03:39 +0000 (20:03 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sun, 12 Sep 2021 18:03:39 +0000 (20:03 +0200)
.github/workflows/ci-wrench.yml [new file with mode: 0644]

diff --git a/.github/workflows/ci-wrench.yml b/.github/workflows/ci-wrench.yml
new file mode 100644 (file)
index 0000000..efd30bc
--- /dev/null
@@ -0,0 +1,59 @@
+name: CI Wrench
+
+on:
+  workflow_dispatch:
+  schedule:
+    - cron: '43 18 * * 0'
+
+jobs:
+  build:
+
+    runs-on: simgrid/unstable
+
+    steps:
+      - uses: actions/checkout@v2
+      - name: Install APT dependencies
+        run: |
+         apt update
+         apt -y install cmake
+         apt -y install gcc
+         apt -y install g++
+         apt -y install unzip
+         apt -y install doxygen
+         apt -y install wget
+         apt -y install git
+         apt -y install libboost-all-dev
+      - name: Install pugixml
+        run: |
+         wget https://github.com/zeux/pugixml/releases/download/v1.8.1/pugixml-1.8.1.tar.gz
+         tar -xf pugixml-1.8.1.tar.gz 
+         cd pugixml-1.8 && cmake . && make install 
+      - name: Install json for modern c++
+        run: |
+         wget https://github.com/nlohmann/json/archive/v3.9.1.tar.gz 
+         tar -xf v3.9.1.tar.gz 
+         cd json-3.9.1 && cmake . && make install
+      - name: Install googletest
+        run: |
+         wget https://github.com/google/googletest/archive/release-1.8.0.tar.gz
+          tar xf release-1.8.0.tar.gz 
+         cd googletest-release-1.8.0/googletest && cmake . && make install
+      - name: Install WRENCH
+        run: |
+         set -e
+         rm -rf wrench.git && git clone --depth 1 --branch simgrid-external-project-ci https://github.com/wrench-project/wrench.git wrench.git
+         mkdir wrench.git/build && cd wrench.git/build && cmake -DSIMGRID_INSTALL_PATH=/usr/ .. && make unit_tests && ./unit_tests
+
+      - name: Create the failure Message
+        if: ${{ failure() }}
+        run: |
+          echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building docker images ! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
+      - name: Create the success Message
+        if: ${{ success() }}
+        run: |
+          echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker images built and pushed successfully ! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
+      - uses: mattermost/action-mattermost-notify@master
+        env:
+          MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
+          MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
+