Skip to content

Commit

Permalink
Try fixing the publish step (#706)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbachorik authored Dec 1, 2024
1 parent b54a386 commit 8b98022
Showing 1 changed file with 44 additions and 5 deletions.
49 changes: 44 additions & 5 deletions .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,23 @@ jobs:
run: chmod +x gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Generate cache key
id: cache-key
run: |
key="${{ runner.os }}-gradle-1-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}"
echo "key=${key}" >> $GITHUB_ENV
echo "cache-key=${key}" >> $GITHUB_OUTPUT
- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: ${{ env.key }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build
run: ./gradlew build
run: ./gradlew --no-daemon --parallel --build-cache build
- name: Upload dist build data
if: always()
uses: actions/upload-artifact@v4
Expand All @@ -55,6 +70,8 @@ jobs:
name: test-reports
path: |
**/reports/**/*
outputs:
cache-key: ${{ steps.cache-key.outputs.cache-key }}

test:
needs: build
Expand Down Expand Up @@ -83,6 +100,15 @@ jobs:
echo 'n' | sdk install java ${{ matrix.java }}
which java
echo 'y' | sdk install java 11.0.25-tem
- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: ${{ needs.build.outputs.cache-key }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Download build data
uses: actions/download-artifact@v4
with:
Expand All @@ -96,7 +122,9 @@ jobs:
- name: Run tests
run: |
set +x
./gradlew -Pintegration :integration-tests:test
./gradlew --no-daemon --parallel --build-cache -Pintegration :integration-tests:test
- name: Check Gradle cache size
run: du -sh ~/.gradle/caches
- name: Integration test reports
if: always()
uses: actions/upload-artifact@v4
Expand All @@ -114,7 +142,9 @@ jobs:
publish:
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master'
needs: test
needs:
- test
- build
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -128,10 +158,19 @@ jobs:
with:
java-version: 11
distribution: temurin
- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: ${{ needs.build.outputs.cache-key }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Download build data
uses: actions/download-artifact@v4
with:
name: build
name: dist-build
- name: Deploy Maven
run: ./gradlew -x test :btrace-dist:publish
env:
Expand All @@ -147,4 +186,4 @@ jobs:
- name: Cleanup temporary artifacts
uses: geekyeggo/delete-artifact@v5
with:
name: build
name: dist-build

0 comments on commit 8b98022

Please sign in to comment.