Skip to content

RoboSim warning

RoboSim warning #74

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allows us to run this workflow through an API call
repository_dispatch:
types: [rebuild]
# An attempt at clearly specifying deployment for all steps
env:
deploy: ${{ github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'rebuild' || github.event_name == 'workflow_dispatch') }}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Setup java
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Checkout ${{ github.ref }}
uses: actions/checkout@master
- name: Build with Maven
run: mvn clean install
# This should now be whitelisted?
- if: env.deploy == 'true'
name: Setup SSH
uses: webfactory/ssh-agent@v0.5.1
with:
# Private key required to access the host
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- if: env.deploy == 'true'
name: Add SSH known hosts
run: echo "${ROBOSTAR_WEB_HOST} ${ROBOSTAR_WEB_SSH_FINGERPRINT_TYPE} ${ROBOSTAR_WEB_SSH_FINGERPRINT}" >> ~/.ssh/known_hosts
env:
ROBOSTAR_WEB_HOST: ${{ secrets.ROBOSTAR_WEB_HOST }}
ROBOSTAR_WEB_SSH_FINGERPRINT: ${{ secrets.ROBOSTAR_WEB_SSH_FINGERPRINT }}
ROBOSTAR_WEB_SSH_FINGERPRINT_TYPE: ${{ secrets.ROBOSTAR_WEB_SSH_FINGERPRINT_TYPE }}
- if: env.deploy == 'true'
id: deploy
name: Deploy
uses: UoY-RoboStar/ga-eclipse-deploy@master
with:
remote-host: ${{ secrets.ROBOSTAR_WEB_HOST }}
remote-user: ${{ secrets.ROBOSTAR_WEB_USER }}
remote-root: ${{ secrets.ROBOSTAR_WEB_ROOT }}
remote-baseurl: 'https://robostar.cs.york.ac.uk'
remote-relative-path: 'robotool/robosim-textual/'
maven-target: 'circus.robocalc.robosim.textual.repository/target/repository/'
- if: env.deploy == 'true'
name: Create commit comment
uses: peter-evans/commit-comment@v1
with:
body: 'Successfully deployed at: https://robostar.cs.york.ac.uk/robotool/robosim-textual/${{ steps.deploy.outputs.dest }}'
- if: env.deploy == 'true'
name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.ROBOSTAR_GITHUB_ACTIONS_TOKEN }}
repository: UoY-RoboStar/robosim-assertions
event-type: rebuild
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
- if: env.deploy == 'true'
name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.ROBOSTAR_GITHUB_ACTIONS_TOKEN }}
repository: UoY-RoboStar/robosim-graphical
event-type: rebuild
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
# name: Uploading update site
# run: ./upload.sh
# env:
# ROBOSTAR_WEB_ROOT: ${{ secrets.ROBOSTAR_WEB_ROOT }}
# ROBOSTAR_WEB_USER: ${{ secrets.ROBOSTAR_WEB_USER }}
# ROBOSTAR_WEB_HOST: ${{ secrets.ROBOSTAR_WEB_HOST }}
# For commits to master other than pull requests, send RoboTool email updates.
#- if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
# name: Send email update
# run: ./send_emails.sh
# env:
# MAILCHIMPKEY: ${{ secrets.MAILCHIMPKEY }}
# MAILCHIMPUSR: ${{ secrets.MAILCHIMPUSR }}
#- name: Rebuild CSP generator
# run: |
# # Propagate recompilation if global flag is active
# if [[ -z ${ROBOSTAR_RECOMPILE_ALL} || ${ROBOSTAR_RECOMPILE_ALL} = false ]]; then
# echo "Recompilation is disabled or not set."
# else
# curl -H "Authorization: token ${ROBOSTAR_GITHUB_ACTIONS_TOKEN}" \
# -X POST \
# -d '{"event_type":"rebuild"}' \
# https://api.github.com/repos/UoY-RoboStar/robochart-csp-gen/dispatches
# fi
# env:
# ROBOSTAR_RECOMPILE_ALL: ${{ secrets.ROBOSTAR_RECOMPILE_ALL }}
# ROBOSTAR_GITHUB_ACTIONS_TOKEN: ${{ secrets.ROBOSTAR_GITHUB_ACTIONS_TOKEN }}
#- name: The job has failed
# if: failure()
# run: rm -rf /tmp/$GITHUB_RUN_NUMBER