Skip to content

Commit

Permalink
2 build files
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai Jeschek committed Jun 29, 2023
1 parent 8438f81 commit 4d8f48d
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 93 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: CI Build
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- develop

jobs:
build-java:
Expand All @@ -20,15 +23,18 @@ jobs:
uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.1.1
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
arguments: build

- name: Resolve OpenEMS bundles
if: ${{ github.ref != 'refs/heads/develop' }}
uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.1.1
arguments: resolve

- name: Validate Bndrun files
if: ${{ github.ref != 'refs/heads/develop' }}
run: |
git diff --exit-code io.openems.edge.application/EdgeApp.bndrun
git diff --exit-code io.openems.backend.application/BackendApp.bndrun
Expand All @@ -37,6 +43,7 @@ jobs:
uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.1.1
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
arguments: jacocoTestReport

- name: Summarize JaCoCo Report
Expand All @@ -47,6 +54,7 @@ jobs:
generate-summary: true

- name: Generate JaCoCo Badge
if: ${{ github.ref != 'refs/heads/develop' }}
id: jacoco-badge
env:
PR_NUMBER: ${{ github.event.number }}
Expand All @@ -67,6 +75,7 @@ jobs:
echo $PR_NUMBER > ./pr/pr_number
- name: Save JaCoCo Report
if: ${{ github.ref != 'refs/heads/develop' }}
uses: actions/upload-artifact@v3
with:
name: pr_comment
Expand Down Expand Up @@ -149,3 +158,38 @@ jobs:
build/openems-edge.jar
build/openems-backend.jar
build/openems-ui.zip
build-docs:
runs-on: ubuntu-latest
needs: [build-java]
if: ${{ github.ref == 'refs/heads/develop' }}
steps:
- uses: actions/checkout@v3

- name: Setup Java 17
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"

- name: Build Javadocs
uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.1.1
cache-read-only: true
arguments: buildAggregatedJavadocs --continue

- name: Build Antora-docs for openems.io
uses: gradle/gradle-build-action@v2
with:
gradle-version: 8.1.1
cache-read-only: true
arguments: buildAntoraDocs --continue

- name: Deploy to GitHub pages
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.DOCS }}
external_repository: OpenEMS/openems.io
publish_branch: master
publish_dir: build/www
93 changes: 0 additions & 93 deletions .github/workflows/develop.yml

This file was deleted.

0 comments on commit 4d8f48d

Please sign in to comment.