Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Eco-CI #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 46 additions & 1 deletion .github/workflows/assemble.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Gradle Assemble
on: [pull_request]
on:
pull_request:

jobs:
assemble:
Expand All @@ -10,12 +11,38 @@ jobs:
java: [ 11, 17, 21 ]
os: [ubuntu-latest, windows-latest, macos-13]
steps:
- name: Eco CI Energy Estimation - Initialize
if: matrix.os == 'ubuntu-latest'
uses: green-coding-solutions/eco-ci-energy-estimation@v4.0-rc3
with:
task: start-measurement
continue-on-error: true

- uses: actions/checkout@v4

- name: Eco CI Energy Estimation - Get Measurement
if: matrix.os == 'ubuntu-latest'
uses: green-coding-solutions/eco-ci-energy-estimation@v4.0-rc3
with:
task: get-measurement
label: 'checkout'
continue-on-error: true


- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: temurin

- name: Eco CI Energy Estimation - Get Measurement
if: matrix.os == 'ubuntu-latest'
uses: green-coding-solutions/eco-ci-energy-estimation@v4.0-rc3
with:
task: get-measurement
label: 'set up JDK'
continue-on-error: true

- name: Setup docker (missing on MacOS)
id: setup_docker
if: runner.os == 'macos'
Expand All @@ -24,6 +51,7 @@ jobs:
with:
upgrade-qemu: true
colima: v0.6.8

- name: Run Gradle (assemble)
if: runner.os == 'macos' && steps.setup_docker.outcome != 'success'
run: |
Expand All @@ -33,7 +61,24 @@ jobs:
if: runner.os != 'macos'
run: |
./gradlew assemble --parallel --no-build-cache -PDISABLE_BUILD_CACHE

- name: Run Gradle (assemble)
if: runner.os == 'macos' && steps.setup_docker.outcome == 'success'
run: |
./gradlew assemble --parallel --no-build-cache -PDISABLE_BUILD_CACHE

- name: Eco CI Energy Estimation - Get Measurement
if: matrix.os == 'ubuntu-latest'
uses: green-coding-solutions/eco-ci-energy-estimation@v4.0-rc3
with:
task: get-measurement
label: 'gradlew assemble'
continue-on-error: true

- name: Eco CI Energy Estimation - End Measurement
if: matrix.os == 'ubuntu-latest'
uses: green-coding-solutions/eco-ci-energy-estimation@v4.0-rc3
with:
task: display-results
send-data: true
continue-on-error: true