Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
5baaaef6bc766b2dba8853140d53b4d88b11b75b
[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           apt -y install googletest
30       - name: Build and test WRENCH
31         run: |
32           set -e
33           rm -rf wrench.git && git clone --depth 1 --branch simgrid-external-project-ci https://github.com/wrench-project/wrench.git wrench.git
34           mkdir wrench.git/build && cd wrench.git/build && cmake -DSIMGRID_INSTALL_PATH=/usr/ .. && make unit_tests && ./unit_tests
35
36       - name: Create the failure Message
37         if: ${{ failure() }}
38         run: |
39           echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"Failure when building docker images ! See ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
40       - name: Create the success Message
41         if: ${{ success() }}
42         run: |
43           echo "{\"attachments\": [{\"color\": \"#00FF00\", \"text\":\"Docker images built and pushed successfully ! ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json
44       - uses: mattermost/action-mattermost-notify@master
45         env:
46           MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
47           MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}}
48