Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add a GH action for the Wrench CI
[simgrid.git] / .github / workflows / ci-wrench.yml
1 name: CI Wrench
2
3 on:
4   workflow_dispatch:
5   schedule:
6     - cron: '43 18 * * 0'
7
8 jobs:
9   build:
10
11     runs-on: simgrid/unstable
12
13     steps:
14       - uses: actions/checkout@v2
15       - name: Install APT dependencies
16         run: |
17           apt update
18           apt -y install cmake
19           apt -y install gcc
20           apt -y install g++
21           apt -y install unzip
22           apt -y install doxygen
23           apt -y install wget
24           apt -y install git
25           apt -y install libboost-all-dev
26       - name: Install pugixml
27         run: |
28           wget https://github.com/zeux/pugixml/releases/download/v1.8.1/pugixml-1.8.1.tar.gz
29           tar -xf pugixml-1.8.1.tar.gz 
30           cd pugixml-1.8 && cmake . && make install 
31       - name: Install json for modern c++
32         run: |
33           wget https://github.com/nlohmann/json/archive/v3.9.1.tar.gz 
34           tar -xf v3.9.1.tar.gz 
35           cd json-3.9.1 && cmake . && make install
36       - name: Install googletest
37         run: |
38           wget https://github.com/google/googletest/archive/release-1.8.0.tar.gz
39           tar xf release-1.8.0.tar.gz 
40           cd googletest-release-1.8.0/googletest && cmake . && make install
41       - name: Install WRENCH
42         run: |
43           set -e
44           rm -rf wrench.git && git clone --depth 1 --branch simgrid-external-project-ci https://github.com/wrench-project/wrench.git wrench.git
45           mkdir wrench.git/build && cd wrench.git/build && cmake -DSIMGRID_INSTALL_PATH=/usr/ .. && make unit_tests && ./unit_tests
46
47       - name: Create the failure Message
48         if: ${{ failure() }}
49         run: |
50           echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building docker images ! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
51       - name: Create the success Message
52         if: ${{ success() }}
53         run: |
54           echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker images built and pushed successfully ! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
55       - uses: mattermost/action-mattermost-notify@master
56         env:
57           MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
58           MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
59