mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2026-10-13 09:52:01 -05:00
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 6.0.0 to 6.0.1. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/v6.0.0...v6.0.1) --- updated-dependencies: - dependency-name: actions/setup-java dependency-version: 6.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
159 lines
4.4 KiB
YAML
159 lines
4.4 KiB
YAML
name: build
|
|
|
|
# This workflow should run for any push or pull request which is neither
|
|
# a preview build nor a release build.
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "![0-9]+.[0-9]+.[0-9]+-preview"
|
|
- "![0-9]+.[0-9]+.[0-9]+-release"
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
name: checkout nosqlbench
|
|
|
|
- uses: actions/setup-java@v6.0.1
|
|
name: setup java
|
|
with:
|
|
architecture: x64
|
|
distribution: 'oracle'
|
|
java-package: jdk
|
|
java-version: '25'
|
|
|
|
- name: install fuse2
|
|
run: sudo apt install libfuse2
|
|
|
|
- name: install desktop-file-utils
|
|
run: sudo apt install desktop-file-utils
|
|
|
|
- name: Cache Maven packages
|
|
uses: actions/cache@v6
|
|
with:
|
|
path: ~/.m2
|
|
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: ${{ runner.os }}-m2
|
|
|
|
- name: Installing dependencies
|
|
run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
|
|
|
|
- name: Running tests
|
|
run: mvn -B test
|
|
|
|
# Note: the target/coverage-report is not getting generated, involves pom settings not working as expected.
|
|
# - name: Collecting reports
|
|
# run: tar -zcvf codecov-report.tgz target/coverage-report/**/*
|
|
#
|
|
# - name: Uploading test coverage
|
|
# uses: actions/upload-artifact@v3
|
|
# with:
|
|
# node-version: '16'
|
|
# name: codecov-report
|
|
# path: codecov-report.tgz
|
|
|
|
# - name: Collecting logfiles
|
|
# if: success() || failure()
|
|
# run: tar -zcvf logfiles.tgz [a-zA-Z]**/logs/*
|
|
|
|
# - name: Uploading log files
|
|
# if: success() || failure()
|
|
# uses: actions/upload-artifact@v3
|
|
# with:
|
|
# node-version: '16'
|
|
# name: nb-logs
|
|
# path: logfiles.tgz
|
|
|
|
- name: generate javadoc
|
|
run: mvn javadoc:aggregate-jar
|
|
continue-on-error: false
|
|
|
|
- name: upload javadoc
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: javadocs
|
|
path: target/nosqlbench-*-javadoc.jar
|
|
|
|
- name: export docs
|
|
if: success()
|
|
run: nb5/target/nb5 export-docs
|
|
|
|
- name: upload docs artifact
|
|
if: success()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: exported-docs
|
|
path: exported_docs.zip
|
|
|
|
builddocs:
|
|
needs: build
|
|
runs-on: ubuntu-22.04
|
|
if: ${{ github.repository == 'nosqlbench/nosqlbench' && github.event_name == 'pull_request' && github.ref_name == 'main' }}
|
|
steps:
|
|
|
|
- name: checkout build docs
|
|
uses: actions/checkout@v7
|
|
with:
|
|
repository: nosqlbench/nosqlbench-build-docs
|
|
path: build-docs
|
|
|
|
- name: download exported_docs
|
|
uses: actions/download-artifact@v8
|
|
with:
|
|
name: exported-docs
|
|
path: build-docs
|
|
|
|
- name: overlay docs changes and push
|
|
run: |
|
|
set -x
|
|
cd build-docs
|
|
./doimport.sh
|
|
rm exported_docs.zip
|
|
git config --global user.email "${{ secrets.NBDROID_EMAIL }}"
|
|
git config --global user.name "${{ secrets.NBDROID_NAME }}"
|
|
git add .
|
|
CHANGES=$(git status --porcelain 2>/dev/null| wc -l)
|
|
echo "found $CHANGES to push for doc updates"
|
|
if (( $CHANGES > 0 ))
|
|
then
|
|
git commit -m"docs update for $GITHUB_REF"
|
|
git push
|
|
fi
|
|
|
|
javadocs:
|
|
needs: builddocs
|
|
runs-on: ubuntu-22.04
|
|
if: ${{ github.repository == 'nosqlbench/nosqlbench' && github.event_name == 'pull_request' && github.ref_name == 'main' }}
|
|
steps:
|
|
|
|
- name: checkout javadocs
|
|
uses: actions/checkout@v7
|
|
with:
|
|
repository: nosqlbench/nosqlbench-javadocs
|
|
path: javadocs
|
|
|
|
- name: download javadocs
|
|
uses: actions/download-artifact@v8
|
|
with:
|
|
name: javadocs
|
|
path: javadocs
|
|
|
|
- name: overlay javadocs changes and push
|
|
run: |
|
|
set -x
|
|
git config --global user.email "${{ secrets.NBDROID_EMAIL }}"
|
|
git config --global user.name "${{ secrets.NBDROID_NAME }}"
|
|
cd javadocs
|
|
./refresh.sh snapshot
|
|
git add .
|
|
CHANGES=$(git status --porcelain 2>/dev/null| wc -l)
|
|
echo "found $CHANGES to push for javadocs updates"
|
|
if (( $CHANGES > 0 ))
|
|
then
|
|
git commit -m"javadocs update for $GITHUB_REF"
|
|
git push
|
|
fi
|