Build #1206
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -------------------------------------------- | |
# This is a basic workflow to help you get started with Actions | |
# -------------------------------------------- | |
name: Build | |
on: | |
# -------------------------------------------- | |
# Controls when the automatic build job will be run. | |
# By default uses the default branch. Runs at 03:00 UTC. | |
# -------------------------------------------- | |
schedule: | |
- cron: '0 5 * * *' | |
# -------------------------------------------- | |
# Run this workflow every time a new commit pushed to the repository | |
# -------------------------------------------- | |
push: | |
# -------------------------------------------- | |
# Run this workflow every time a pull request is created or commited to it | |
# -------------------------------------------- | |
pull_request: | |
branches: | |
- '**' | |
env: | |
# ------------------------------------------------------------- | |
# Setting up locale to have correct keyboard mapping for swtbot | |
# ------------------------------------------------------------- | |
LANG: "en_US.UTF-8" | |
# -------------------------------------------- | |
# Defines the list of jobs | |
# -------------------------------------------- | |
jobs: | |
# -------------------------------------------- | |
# Verify Job | |
#--------------------------------------------- | |
verify: | |
name: Verify | |
runs-on: ubuntu-22.04 | |
steps: | |
# -------------------------------------------- | |
# Checks out a copy of the repository | |
# -------------------------------------------- | |
- name: Setup - Checkout code | |
uses: actions/[email protected] | |
# -------------------------------------------- | |
# Run a quick sanity check if all commits are | |
# handed in by known users | |
#--------------------------------------------- | |
- name: Verify - Authors Sanity Check | |
uses: virtualsatellite/ci-actions/ci-verify-authors-action@v7 | |
# ----------------------------------------------------- | |
# Build and Test - SpotBugs Job | |
# ----------------------------------------------------- | |
spotbugs: | |
name: Build and Test - Spotbugs | |
runs-on: ubuntu-22.04 | |
needs: [verify] | |
steps: | |
# -------------------------------------------- | |
# Checks out a copy of the repository | |
# -------------------------------------------- | |
- name: Setup - Checkout code | |
uses: actions/[email protected] | |
- name: Setup - Java 17 | |
uses: actions/[email protected] | |
with: | |
java-version: 17 | |
distribution: "temurin" | |
- name: Setup - Maven 3.9.6 | |
uses: virtualsatellite/ci-actions/ci-maven-setup@v7 | |
with: | |
maven-version: "3.9.6" | |
# -------------------------------------------- | |
# Setup caching for m2 repository | |
# -------------------------------------------- | |
- name: Setup - Cache local Maven repository | |
uses: actions/[email protected] | |
with: | |
path: | | |
~/.m2/repository/ | |
./maven.tar.gz | |
save-always: true | |
key: ${{ runner.os }}-local-maven-spotbugs-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-local-maven-spotbugs- | |
${{ runner.os }}-local-maven- | |
- name: Setup - Clean local Maven repository | |
run: rm -rf ~/.m2/repository/de/dlr/sc/virsat | |
# -------------------------------------------- | |
# Perform various setup operations | |
# -------------------------------------------- | |
- name: Setup - Prepare OS | |
uses: virtualsatellite/ci-actions/ci-setup-action@v7 | |
with: | |
pkgs_file: apt_vtk_zmq_packages | |
jdk: no | |
# -------------------------------------------- | |
# Development and Feature branches | |
# -------------------------------------------- | |
- name: Build - Build and Deploy Decision | |
id: build_decision | |
uses: virtualsatellite/ci-actions/ci-build-decision-action@v7 | |
# -------------------------------------------- | |
# Development and Feature branches | |
# -------------------------------------------- | |
- name: Build and Test - Spotbugs | |
uses: virtualsatellite/ci-actions/ci-maven-build-action@v7 | |
with: | |
build_job: spotbugs | |
build_profile: ${{ steps.build_decision.outputs.build_type }} | |
# ----------------------------------------------------- | |
# Build and Test - Surefire Job | |
# ----------------------------------------------------- | |
surefire: | |
name: Build and Test - Surefire | |
runs-on: ubuntu-22.04 | |
needs: [verify] | |
steps: | |
# -------------------------------------------- | |
# Checks out a copy of your repository | |
# -------------------------------------------- | |
- name: Setup - Checkout code | |
uses: actions/[email protected] | |
- name: Setup - Java 17 | |
uses: actions/[email protected] | |
with: | |
java-version: 17 | |
distribution: "temurin" | |
- name: Setup - Maven 3.9.6 | |
uses: virtualsatellite/ci-actions/ci-maven-setup@v7 | |
with: | |
maven-version: "3.9.6" | |
# -------------------------------------------- | |
# Setup caching for m2 repository | |
# -------------------------------------------- | |
- name: Setup - Cache local Maven repository | |
uses: actions/[email protected] | |
with: | |
path: | | |
~/.m2/repository/ | |
./maven.tar.gz | |
save-always: true | |
key: ${{ runner.os }}-local-maven-surefire-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-local-maven-surefire- | |
${{ runner.os }}-local-maven- | |
- name: Setup - Clean local Maven repository | |
run: rm -rf ~/.m2/repository/de/dlr/sc/virsat | |
# -------------------------------------------- | |
# Perform various setup operations | |
# -------------------------------------------- | |
- name: Setup - Prepare OS | |
uses: virtualsatellite/ci-actions/ci-setup-action@v7 | |
with: | |
xvfb: -x | |
pkgs_file: apt_vtk_zmq_packages | |
jdk: no | |
# -------------------------------------------- | |
# Development and Feature branches | |
# -------------------------------------------- | |
- name: Build - Build and Deploy Decision | |
id: build_decision | |
uses: virtualsatellite/ci-actions/ci-build-decision-action@v7 | |
# -------------------------------------------- | |
# Development and Feature branches | |
# -------------------------------------------- | |
- name: Build and Test - Surefire | |
uses: virtualsatellite/ci-actions/ci-maven-build-action@v7 | |
with: | |
build_job: sureheadless | |
build_profile: ${{ steps.build_decision.outputs.build_type }} | |
# -------------------------------------------- | |
# Upload SWTBout screenshots to github artifacts | |
# -------------------------------------------- | |
- name: Build and Test - Upload SWTBot Screenshots on Failure | |
if: ${{ failure() }} | |
uses: actions/[email protected] | |
with: | |
name: SWTBot Screenshots | |
path: | |
swtbot/* | |
# -------------------------------------------- | |
# Upload Surefire Reports to github artifacts | |
# -------------------------------------------- | |
- name: Upload Surefire Reports on Failure | |
if: ${{ failure() }} | |
uses: actions/[email protected] | |
with: | |
name: Surefire Reports | |
path: | |
./**/target/surefire-reports/* | |
# ----------------------------------------------------- | |
# Build and Test - Checkstyle Job | |
# ----------------------------------------------------- | |
checkstyle: | |
name: Build and Test - Checkstyle | |
runs-on: ubuntu-22.04 | |
needs: [verify] | |
steps: | |
# -------------------------------------------- | |
# Checks out a copy of your repository | |
# -------------------------------------------- | |
- name: Setup - Checkout code | |
uses: actions/[email protected] | |
- name: Setup - Java 17 | |
uses: actions/[email protected] | |
with: | |
java-version: 17 | |
distribution: "temurin" | |
- name: Setup - Maven 3.9.6 | |
uses: virtualsatellite/ci-actions/ci-maven-setup@v7 | |
with: | |
maven-version: "3.9.6" | |
# -------------------------------------------- | |
# Setup caching for m2 repository | |
# -------------------------------------------- | |
- name: Setup - Cache local Maven repository | |
uses: actions/[email protected] | |
with: | |
path: | | |
~/.m2/repository/ | |
./maven.tar.gz | |
save-always: true | |
key: ${{ runner.os }}-local-maven-checkstyle-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-local-maven-checkstyle- | |
${{ runner.os }}-local-maven- | |
- name: Setup - Clean local Maven repository | |
run: rm -rf ~/.m2/repository/de/dlr/sc/virsat | |
# -------------------------------------------- | |
# Perform various setup operations | |
# -------------------------------------------- | |
- name: Setup - Prepare OS | |
uses: virtualsatellite/ci-actions/ci-setup-action@v7 | |
with: | |
pkgs_file: apt_vtk_zmq_packages | |
jdk: no | |
# -------------------------------------------- | |
# Development and Feature branches | |
# -------------------------------------------- | |
- name: Build - Build and Deploy Decision | |
id: build_decision | |
uses: virtualsatellite/ci-actions/ci-build-decision-action@v7 | |
# -------------------------------------------- | |
# Development and Feature branches | |
# -------------------------------------------- | |
- name: Build and Test - Checkstyle | |
uses: virtualsatellite/ci-actions/ci-maven-build-action@v7 | |
with: | |
build_job: checkstyle | |
build_profile: ${{ steps.build_decision.outputs.build_type }} | |
# ----------------------------------------------------- | |
# Build, Assemble and Deploy Job | |
# ----------------------------------------------------- | |
deploy: | |
name: Build, Assemble and Deploy | |
runs-on: ubuntu-22.04 | |
needs: [spotbugs, surefire, checkstyle] | |
steps: | |
# -------------------------------------------- | |
# Checks out a copy of your repository | |
# -------------------------------------------- | |
- name: Setup - Checkout code | |
uses: actions/[email protected] | |
- name: Setup - Java 17 | |
uses: actions/[email protected] | |
with: | |
java-version: 17 | |
distribution: "temurin" | |
- name: Setup - Maven 3.9.6 | |
uses: virtualsatellite/ci-actions/ci-maven-setup@v7 | |
with: | |
maven-version: "3.9.6" | |
# -------------------------------------------- | |
# Setup caching for m2 repository | |
# -------------------------------------------- | |
- name: Setup - Cache local Maven repository | |
uses: actions/[email protected] | |
with: | |
path: | | |
~/.m2/repository/ | |
./maven.tar.gz | |
save-always: true | |
key: ${{ runner.os }}-local-maven-deploy-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-local-maven-deploy- | |
${{ runner.os }}-local-maven- | |
- name: Setup - Clean local Maven repository | |
run: rm -rf ~/.m2/repository/de/dlr/sc/virsat | |
# -------------------------------------------- | |
# Perform various setup operations | |
# -------------------------------------------- | |
- name: Setup - Prepare OS | |
uses: virtualsatellite/ci-actions/ci-setup-action@v7 | |
with: | |
pkgs_file: apt_vtk_zmq_packages | |
jdk: no | |
# -------------------------------------------- | |
# Development and Feature branches | |
# -------------------------------------------- | |
- name: Build - Build and Deploy Decision | |
id: build_decision | |
uses: virtualsatellite/ci-actions/ci-build-decision-action@v7 | |
# -------------------------------------------- | |
# Development and Feature branches | |
# -------------------------------------------- | |
- name: Build - Assemble | |
uses: virtualsatellite/ci-actions/ci-maven-build-action@v7 | |
with: | |
build_job: assemble | |
build_profile: ${{ steps.build_decision.outputs.build_type }} | |
# -------------------------------------------- | |
# Upload SWTBout screenshots to github artifacts | |
# -------------------------------------------- | |
- name: Build - Upload Build Artifacts | |
uses: actions/[email protected] | |
with: | |
name: Deployable Applications | |
path: | | |
deploy/**/*.zip | |
deploy/**/*.tar.gz | |
retention-days: 3 | |
# --------------------------------------------- | |
# Deploying to github releases | |
# -------------------------------------------- | |
- name: Build - Deploy GH | |
uses: virtualsatellite/ci-actions/ci-deploy-gh-product-action@v7 | |
with: | |
build_profile: ${{ steps.build_decision.outputs.build_type }} | |
gh_token: ${{ secrets.GITHUB_TOKEN }} | |
if: ${{ steps.build_decision.outputs.deploy_type == 'deploy' }} | |
# ---------------------------------------------- | |
# SF Deploy still to be done | |
# ---------------------------------------------- | |
- name: Build - Deploy SF | |
uses: virtualsatellite/ci-actions/ci-deploy-sf-product-action@v7 | |
with: | |
build_profile: ${{ steps.build_decision.outputs.build_type }} | |
openssl_pass: ${{ secrets.SF_SSH_KEY_OPENSSL_PASS }} | |
ssh_key_pass: ${{ secrets.SF_SSH_KEY_PASS }} | |
local_dir: VirSat4_CEF_Application | |
remote_dir: virtualsatellite/VirtualSatellite4-CEF | |
if: ${{ steps.build_decision.outputs.deploy_type == 'deploy' }} | |