summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/dependabot.yml7
-rw-r--r--.github/pull_request_template.md17
-rw-r--r--.github/workflows/build.yml93
-rw-r--r--.github/workflows/deploy.yml26
-rw-r--r--.github/workflows/publish.yml116
-rw-r--r--.github/workflows/release.yml34
-rw-r--r--.github/workflows/test-gradle-rc.yml19
-rw-r--r--.github/workflows/test-java-ea.yml19
8 files changed, 0 insertions, 331 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index 2c932a9d..00000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-# Set update schedule for GitHub Actions
-version: 2
-updates:
- - package-ecosystem: "github-actions"
- directory: "/"
- schedule:
- interval: "weekly" \ No newline at end of file
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
deleted file mode 100644
index 3b9caac8..00000000
--- a/.github/pull_request_template.md
+++ /dev/null
@@ -1,17 +0,0 @@
-## Summary
-
-A small summary of the requirements (in one/two sentences).
-
-## Implementation Notes :hammer_and_pick:
-
-* Briefly outline the overall technical solution. If necessary, identify talking points where the reviewer's attention should be drawn to.
-
-## External Dependencies :four_leaf_clover:
-
-*
-
-## Breaking API Changes :warning:
-
-*
-
-*Simply specify none (N/A) if not applicable.* \ No newline at end of file
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
deleted file mode 100644
index 2ad559ce..00000000
--- a/.github/workflows/build.yml
+++ /dev/null
@@ -1,93 +0,0 @@
-name: Build
-
-on:
- pull_request:
- branches: [ master ]
- push:
- branches: [ master ]
- merge_group:
-
-jobs:
- build:
- name: Build (Java ${{ matrix.java }} - ${{ matrix.os }})
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os: [ ubuntu-22.04 ]
- java: [ 21 ]
- include:
- - os: windows-2022
- java: 21
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- - name: Validate Gradle wrapper
- uses: gradle/actions/wrapper-validation@v3
- - name: Set up JDK
- uses: actions/setup-java@v4
- with:
- distribution: 'zulu'
- java-version: ${{ matrix.java }}
- - name: Set up Python
- uses: actions/setup-python@v5
- with:
- python-version: '3.x'
-
- - name: Install M3SA Python requirements
- run: pip install -r opendc-experiments/opendc-experiments-m3sa/src/main/python/requirements.txt
- - name: Build with Gradle
- uses: gradle/actions/setup-gradle@v3
- with:
- arguments: build assembleDist codeCoverageReport
- # Only write to the cache for builds on the 'master' branch.
- # Builds on other branches will only read existing entries from the cache.
- cache-read-only: ${{ github.ref != 'refs/heads/master' }}
- - name: Publish report
- if: always()
- uses: mikepenz/action-junit-report@v5
- with:
- check_name: test (Java ${{ matrix.java }})
- report_paths: '**/build/test-results/test/TEST-*.xml'
- github_token: ${{ secrets.GITHUB_TOKEN }}
- - name: Upload reports
- if: always()
- continue-on-error: true # See https://github.com/actions/upload-artifact/issues/270
- uses: actions/upload-artifact@v4
- with:
- name: reports-${{ matrix.os }}-jdk${{ matrix.java }}
- path: |
- ./**/build/reports/**/*
- ./**/build/test-results/**/*
- retention-days: 5
- - name: Upload build
- continue-on-error: true
- uses: actions/upload-artifact@v4
- with:
- name: build-${{ matrix.os }}-jdk${{ matrix.java }}
- path: |
- ./**/build/distributions/**/*.zip
- retention-days: 5
- - name: Upload code coverage
- uses: codecov/codecov-action@v5
- with:
- token: ${{ secrets.CODECOV_TOKEN }}
- files: ./build/reports/jacoco/codeCoverageReport/codeCoverageReport.xml
- build-docker:
- name: Build Docker Images
- runs-on: ubuntu-22.04
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- - name: Build UI
- uses: docker/build-push-action@v6
- with:
- context: opendc-web/opendc-web-ui
- file: opendc-web/opendc-web-ui/Dockerfile
- - name: Build Web Server
- uses: docker/build-push-action@v6
- with:
- file: opendc-web/opendc-web-server/Dockerfile
- - name: Build Runner
- uses: docker/build-push-action@v6
- with:
- file: opendc-web/opendc-web-runner/Dockerfile
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
deleted file mode 100644
index 139bb7ba..00000000
--- a/.github/workflows/deploy.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-name: Deploy app.opendc.org
-
-on:
- push:
- branches: ["prod"]
-
-jobs:
- deploy-app:
- runs-on: ubuntu-22.04
- steps:
- - name: Create SSH key
- run: |
- mkdir -p ~/.ssh/
- echo "$SSH_PRIVATE_KEY" > ../opendc.key
- sudo chmod 600 ../opendc.key
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- shell: bash
- env:
- SSH_PRIVATE_KEY: ${{secrets.SSH_PRIVATE_KEY}}
- SSH_KNOWN_HOSTS: ${{secrets.SSH_KNOWN_HOSTS}}
- - name: Pull Changes
- run: ssh -i ../opendc.key opendc@opendc.org 'cd /opt/opendc && git pull origin'
- - name: Rebuild Images
- run: ssh -i ../opendc.key opendc@opendc.org 'cd /opt/opendc && sudo docker-compose -f docker-compose.yml -f docker-compose.prod.yml build frontend api simulator'
- - name: Deploy Images
- run: ssh -i ../opendc.key opendc@opendc.org 'cd /opt/opendc && sudo docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d'
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
deleted file mode 100644
index 294be1d1..00000000
--- a/.github/workflows/publish.yml
+++ /dev/null
@@ -1,116 +0,0 @@
-# Workflow for publishing the artifacts once a GitHub release is published
-name: Publish
-
-on:
- release:
- types: [published]
- workflow_dispatch:
-
-jobs:
- push-simulator:
- name: Push Simulator to DockerHub
- runs-on: ubuntu-22.04
- steps:
- - name: Prepare
- id: prep
- run: |
- DOCKER_IMAGE=ghcr.io/atlarge-research/opendc
- VERSION=3.0-SNAPSHOT
- if [[ $GITHUB_REF == refs/tags/v* ]]; then
- VERSION=${GITHUB_REF#refs/tags/v}
- fi
- echo "tags=${DOCKER_IMAGE}:${VERSION}" >> $GITHUB_OUTPUT
- - name: Login to DockerHub
- uses: docker/login-action@v3
- with:
- registry: ghcr.io
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
- - name: Push to Docker Hub
- uses: docker/build-push-action@v6
- with:
- push: true
- file: opendc-web/opendc-web-runner/Dockerfile
- tags: ${{ steps.prep.outputs.tags }}
- push-api:
- name: Push API to DockerHub
- runs-on: ubuntu-22.04
- steps:
- - name: Prepare
- id: prep
- run: |
- DOCKER_IMAGE=ghcr.io/atlarge-research/opendc-web-api
- VERSION=3.0-SNAPSHOT
- if [[ $GITHUB_REF == refs/tags/v* ]]; then
- VERSION=${GITHUB_REF#refs/tags/v}
- fi
- echo "tags=${DOCKER_IMAGE}:${VERSION}" >> $GITHUB_OUTPUT
- - name: Login to DockerHub
- uses: docker/login-action@v3
- with:
- registry: ghcr.io
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
- - name: Push to Docker Hub
- uses: docker/build-push-action@v6
- with:
- push: true
- file: opendc-web/opendc-web-server/Dockerfile
- tags: ${{ steps.prep.outputs.tags }}
- push-ui:
- name: Push UI to DockerHub
- runs-on: ubuntu-22.04
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- - name: Prepare
- id: prep
- run: |
- DOCKER_IMAGE=ghcr.io/atlarge-research/opendc-web-ui
- VERSION=3.0-SNAPSHOT
- if [[ $GITHUB_REF == refs/tags/v* ]]; then
- VERSION=${GITHUB_REF#refs/tags/v}
- fi
- echo "tags=${DOCKER_IMAGE}:${VERSION}" >> $GITHUB_OUTPUT
- - name: Login to DockerHub
- uses: docker/login-action@v3
- with:
- registry: ghcr.io
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
- - name: Push to Docker Hub
- uses: docker/build-push-action@v6
- with:
- push: true
- context: opendc-web/opendc-web-ui
- tags: ${{ steps.prep.outputs.tags }}
- publish-maven-central:
- name: Publish to Maven Central
- runs-on: ubuntu-latest
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- - name: Validate Gradle wrapper
- uses: gradle/actions/wrapper-validation@v3
- - name: Set up JDK
- uses: actions/setup-java@v4
- with:
- distribution: 'zulu'
- java-version: 21
- - name: Prepare
- id: prep
- run: |
- VERSION=3.0-SNAPSHOT
- if [[ $GITHUB_REF == refs/tags/v* ]]; then
- VERSION=${GITHUB_REF#refs/tags/v}
- fi
- echo "version=${VERSION}" >> $GITHUB_OUTPUT
- - name: Publish with Gradle
- uses: gradle/actions/setup-gradle@v3
- with:
- arguments: publish -Pversion="${{ steps.prep.outputs.version }}"
- env:
- ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }}
- ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
- ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME }}
- ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }}
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
deleted file mode 100644
index 05cf997c..00000000
--- a/.github/workflows/release.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-# Workflow for creating a draft release once a new tag is pushed to GitHub
-name: Release
-
-on:
- push:
- tags: ['v*']
- workflow_dispatch:
-
-jobs:
- build:
- name: Build OpenDC
- runs-on: ubuntu-22.04
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- - name: Validate Gradle wrapper
- uses: gradle/actions/wrapper-validation@v3
- - name: Set up JDK
- uses: actions/setup-java@v4
- with:
- distribution: 'zulu'
- java-version: 21
- - name: Publish with Gradle
- uses: gradle/actions/setup-gradle@v3
- with:
- arguments: assembleDist
- - name: Create Release
- uses: softprops/action-gh-release@v2
- with:
- draft: true
- prerelease: ${{ contains(github.ref, '-rc') || contains(github.ref, '-m') }}
- files: "**/build/distributions/*"
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/test-gradle-rc.yml b/.github/workflows/test-gradle-rc.yml
deleted file mode 100644
index d1df5017..00000000
--- a/.github/workflows/test-gradle-rc.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-name: Test latest Gradle RC
-on:
- schedule:
- - cron: 0 0 * * 0 # weekly
-
-jobs:
- gradle-rc:
- runs-on: ubuntu-22.04
- steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-java@v4
- with:
- distribution: 'zulu'
- java-version: 20
- - uses: gradle/actions/setup-gradle@v3
- with:
- cache-disabled: true
- gradle-version: release-candidate
- arguments: build --dry-run # just test build configuration
diff --git a/.github/workflows/test-java-ea.yml b/.github/workflows/test-java-ea.yml
deleted file mode 100644
index 740e103f..00000000
--- a/.github/workflows/test-java-ea.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-name: Test Java EA release
-on:
- schedule:
- - cron: 0 0 * * 0 # weekly
-
-jobs:
- java-ea:
- runs-on: ubuntu-22.04
- steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-java@v4
- with:
- distribution: 'zulu'
- java-version: 21-ea
- - uses: gradle/actions/setup-gradle@v3
- with:
- cache-disabled: true
- gradle-version: release-candidate
- arguments: build