From dc22e12051add2631b4e452043d7687d36031369 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 13 Sep 2021 11:27:54 +0200 Subject: [PATCH] New GH action for BatSim CI --- .github/workflows/ci-batsim.yml | 34 ++++++++++++++++++++++ tools/jenkins/ci-batsim.sh | 51 +++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 .github/workflows/ci-batsim.yml create mode 100755 tools/jenkins/ci-batsim.sh diff --git a/.github/workflows/ci-batsim.yml b/.github/workflows/ci-batsim.yml new file mode 100644 index 0000000000..f850fa14bd --- /dev/null +++ b/.github/workflows/ci-batsim.yml @@ -0,0 +1,34 @@ +name: CI BatSim + +on: + workflow_dispatch: + schedule: + - cron: '43 18 * * 0' + +jobs: + build: + + runs-on: ubuntu-latest + container: simgrid/unstable + + steps: + - uses: actions/checkout@v2 + - name: Build and test BatSim + run: | + set -e + ./tools/jenkins/ci-batsim.sh + + - name: Create the failure Message + if: ${{ failure() }} + run: | + echo "{\"attachments\": [{\"color\": \"#FF0000\", \"text\":\"@millian: BatSim failed to build on simgrid/unstable docker image! 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\":\"BatSim successfully built on simgrid/unstable docker image. ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}]}" > mattermost.json + - uses: mattermost/action-mattermost-notify@master + if: ${{ always() }} + env: + MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} + MATTERMOST_CHANNEL: ${{ secrets.MATTERMOST_CHANNEL}} + diff --git a/tools/jenkins/ci-batsim.sh b/tools/jenkins/ci-batsim.sh new file mode 100755 index 0000000000..7f532c587b --- /dev/null +++ b/tools/jenkins/ci-batsim.sh @@ -0,0 +1,51 @@ +#! /bin/sh + +# Test this script locally as follows (rerun `docker pull simgrid/unstable` to get a fresh version). +# cd