Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
53f6f382cc59feb52e01c507046159cc4f9d9c82
[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           apt -y install libpugixml-dev
28           apt -y install nlohmann-json3-dev
29       - name: Install googletest
30         run: |
31           wget https://github.com/google/googletest/archive/release-1.8.0.tar.gz
32           tar xf release-1.8.0.tar.gz
33           cd googletest-release-1.8.0/googletest && cmake . && make install
34       - name: Build and test WRENCH
35         run: |
36           set -e
37           rm -rf wrench.git && git clone --depth 1 --branch simgrid-external-project-ci https://github.com/wrench-project/wrench.git wrench.git
38           mkdir wrench.git/build && cd wrench.git/build && cmake -DSIMGRID_INSTALL_PATH=/usr/ .. && make unit_tests && ./unit_tests
39
40       - name: Create the failure Message
41         if: ${{ failure() }}
42         run: |
43           echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Wrench's git failed to build on simgrid/unstable docker image! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
44       - name: Create the success Message
45         if: ${{ success() }}
46         run: |
47           echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Wrench's git successfully built on simgrid/unstable docker image. ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
48       - uses: mattermost/action-mattermost-notify@master
49         if: ${{ failure() }}
50         env:
51           MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
52           MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
53