diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 59310035..3aa77ac4 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -48,40 +48,35 @@ env: REPORTS_LOCATIONS: | pravega-sensor-collector/build/reports + jobs: build: name: Build runs-on: ubuntu-20.04 steps: + - name: Build Information + run: echo Building a '${{ github.event_name }}' for target '${{ github.ref }}'. - name: Checkout uses: actions/checkout@v2 - - - name: Set up JDK - uses: actions/setup-java@v2 + - uses: actions/setup-java@v2 with: - distribution: 'zulu' - java-version: '11' # major or semver Java version will be acceptable, see https://github.com/marketplace/actions/setup-java-jdk#basic + distribution: 'temurin' + java-version: '11' + - name: Test script + run: ./scripts/build-installer.sh - name: Clean if: ${{ startsWith(github.ref, 'refs/heads/') }} run: ./gradlew clean ${{env.GRADLE_OPTS}} - name: Compile & Checkstyle run: ./gradlew jar compileTest checkstyleMain checkstyleTest --parallel ${{env.GRADLE_OPTS}} - - name: Build - run: ./scripts/build-installer.sh - - - name: Set env - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - - name: Release - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') - uses: softprops/action-gh-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Tar Reports + run: tar --use-compress-program zstd -cf reports-${{github.job}}.tzst `echo ${{env.REPORTS_LOCATIONS}}` + - name: Upload Reports + uses: actions/upload-artifact@v2 with: - files: ./pravega-sensor-collector/build/distributions/pravega-sensor-collector-*.tgz - draft: true - name: pravega-sensor-collector ${{ env.RELEASE_VERSION }} + name: ${{github.job}}-reports + retention-days: 4 + path: reports-${{github.job}}.tzst # Uncomment these two lines if you need ssh access to debug a build. # - name: Setup upterm session # uses: lhotari/action-upterm@v1 @@ -99,7 +94,7 @@ jobs: distribution: 'temurin' java-version: '11' - name: Unit tests - run: ./gradlew test --parallel ${{env.GRADLE_OPTS}} + run: ./gradlew build --parallel ${{env.GRADLE_OPTS}} - name: PWD run: pwd - name: LS