Logo AND Algorithmique Numérique Distribuée

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