diff --git a/.github/workflows/contributor-build.yml b/.github/workflows/contributor-build.yml index 6c17d34f5a..9a2e885e05 100644 --- a/.github/workflows/contributor-build.yml +++ b/.github/workflows/contributor-build.yml @@ -4,7 +4,7 @@ # See https://docs.github.com/en/free-pro-team@latest/actions # for more information about GitHub actions. -name: Hibernate ORM contributor build +name: Hibernate ORM build on: push: @@ -17,25 +17,30 @@ on: - 'wip/6.0' jobs: build: - name: Build and test on Java 8 against a wide range of DBs + name: Java 8 runs-on: ubuntu-latest + # We want to know the test results of all matrix entries + continue-on-error: true strategy: + fail-fast: false matrix: + # When GitHub Actions supports it: https://github.com/actions/toolkit/issues/399 + # We will use the experimental flag as indicator whether a failure should cause a workflow failure include: - rdbms: h2 - jdk: 8 + experimental: false - rdbms: derby - jdk: 8 + experimental: true - rdbms: mariadb - jdk: 8 + experimental: true - rdbms: postgresql - jdk: 8 + experimental: true - rdbms: oracle - jdk: 8 + experimental: true - rdbms: db2 - jdk: 8 + experimental: true - rdbms: mssql - jdk: 8 + experimental: true steps: - uses: actions/checkout@v2 - name: Set up Java 8 @@ -60,20 +65,21 @@ jobs: - name: Run build script env: RDBMS: ${{ matrix.rdbms }} - JDK: ${{ matrix.jdk }} - run: ./ci/build-guthub.sh + run: ./ci/build-github.sh shell: bash - name: Upload test reports (if Gradle failed) uses: actions/upload-artifact@v2 if: failure() with: - name: test-reports-java8 + name: test-reports-java8-${{ matrix.rdbms }} path: './**/target/reports/tests/test/' - name: Omit produced artifacts from build cache run: ./ci/before-cache.sh build11: - name: Build and test on Java 11 + name: Java 11 runs-on: ubuntu-latest + # We want to know the test results of all matrix entries + continue-on-error: true steps: - uses: actions/checkout@v2 - name: Set up Java 11 @@ -96,9 +102,7 @@ jobs: # refresh cache every month to avoid unlimited growth key: maven-localrepo-${{ steps.get-date.outputs.yearmonth }} - name: Run build script - env: - JDK: 11 - run: ./ci/build-guthub.sh + run: ./ci/build-github.sh shell: bash - name: Upload test reports (if Gradle failed) uses: actions/upload-artifact@v2 diff --git a/ci/before-cache.sh b/ci/before-cache.sh old mode 100644 new mode 100755 diff --git a/ci/build-github.sh b/ci/build-github.sh old mode 100644 new mode 100755 index 517409b7fa..611aecd98b --- a/ci/build-github.sh +++ b/ci/build-github.sh @@ -1,21 +1,23 @@ #! /bin/bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + java -version ./gradlew assemble if [ "$RDBMS" == 'mysql' ]; then - bash ../docker_db.sh mysql_5_7 + bash $DIR/../docker_db.sh mysql_5_7 elif [ "$RDBMS" == 'mysql8' ]; then - bash ../docker_db.sh mysql_8_0 + bash $DIR/../docker_db.sh mysql_8_0 elif [ "$RDBMS" == 'mariadb' ]; then - bash ../docker_db.sh mariadb + bash $DIR/../docker_db.sh mariadb elif [ "$RDBMS" == 'postgresql' ]; then - bash ../docker_db.sh postgresql_9_5 + bash $DIR/../docker_db.sh postgresql_9_5 elif [ "$RDBMS" == 'db2' ]; then - bash ../docker_db.sh db2 + bash $DIR/../docker_db.sh db2 elif [ "$RDBMS" == 'oracle' ]; then - bash ../docker_db.sh oracle + bash $DIR/../docker_db.sh oracle elif [ "$RDBMS" == 'mssql' ]; then - bash ../docker_db.sh mssql + bash $DIR/../docker_db.sh mssql fi -exec bash ./build.sh \ No newline at end of file +exec bash $DIR/build.sh \ No newline at end of file diff --git a/ci/build-travis.sh b/ci/build-travis.sh old mode 100644 new mode 100755 index f5360f2d2c..d1b5d38480 --- a/ci/build-travis.sh +++ b/ci/build-travis.sh @@ -1,25 +1,27 @@ #! /bin/bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + java -version ./gradlew assemble if [ "$RDBMS" == 'mysql' ]; then sudo service mysql stop - bash ../docker_db.sh mysql_5_7 + bash $DIR/../docker_db.sh mysql_5_7 elif [ "$RDBMS" == 'mysql8' ]; then sudo service mysql stop - bash ../docker_db.sh mysql_8_0 + bash $DIR/../docker_db.sh mysql_8_0 elif [ "$RDBMS" == 'mariadb' ]; then sudo service mysql stop - bash ../docker_db.sh mariadb + bash $DIR/../docker_db.sh mariadb elif [ "$RDBMS" == 'postgresql' ]; then sudo service postgres stop - bash ../docker_db.sh postgresql_9_5 + bash $DIR/../docker_db.sh postgresql_9_5 elif [ "$RDBMS" == 'db2' ]; then - bash ../docker_db.sh db2 + bash $DIR/../docker_db.sh db2 elif [ "$RDBMS" == 'oracle' ]; then - bash ../docker_db.sh oracle + bash $DIR/../docker_db.sh oracle elif [ "$RDBMS" == 'mssql' ]; then - bash ../docker_db.sh mssql + bash $DIR/../docker_db.sh mssql fi -exec bash ./build.sh \ No newline at end of file +exec bash $DIR/build.sh \ No newline at end of file diff --git a/ci/build.sh b/ci/build.sh old mode 100644 new mode 100755