refs #522 Modify Jakarta Persistence Spec Text #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#******************************************************************************* | |
# Copyright (c) Contributors to the Eclipse Foundation | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# | |
# SPDX-License-Identifier: Apache-2.0 | |
#******************************************************************************* | |
name: CI Build | |
on: | |
push: | |
branches-ignore: | |
- 'dependabot/**' | |
paths: | |
- '**' | |
- '!.design/**' | |
- '!*.md' | |
- '!.github/**' | |
- '.github/**/*ci*' | |
pull_request: | |
paths: | |
- '**' | |
- '!.design/**' | |
- '!*.md' | |
- '!.github/**' | |
- '.github/**/*ci*' | |
env: | |
LC_ALL: en_US.UTF-8 | |
GRADLE_OPTS: >- | |
-Dorg.gradle.parallel=true | |
-Dmaven.repo.local=cnf/generated/m2 | |
canonical: ${{ (github.repository == 'osgi/osgi') && ((github.ref == 'refs/heads/main') || (github.ref == 'refs/heads/release')) && (github.event_name != 'pull_request') }} | |
java_version: 17 | |
defaults: | |
run: | |
shell: bash | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: Artifacts | |
runs-on: ubuntu-latest | |
outputs: | |
tck-matrix: ${{ steps.build.outputs.tck-matrix }} | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
- name: Git Unshallow | |
if: ${{ fromJSON(env.canonical) }} | |
run: | | |
git fetch --prune --unshallow | |
git describe --dirty --always --abbrev=9 | |
- name: Set up Java | |
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ env.java_version }} | |
- name: Build | |
id: build | |
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # v2.11.1 | |
with: | |
cache-read-only: ${{ github.ref != 'refs/heads/main' }} | |
arguments: --continue :buildscriptDependencies :build | |
- name: Upload TCK | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: OSGi-TCK | |
if-no-files-found: error | |
path: | | |
osgi.tck/generated/osgi.tck.*/ | |
!osgi.tck/generated/osgi.tck.*.jar | |
- name: Configure settings.xml for Publish | |
if: ${{ fromJSON(env.canonical) }} | |
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ env.java_version }} | |
server-id: ossrh | |
server-username: OSSRH_USERNAME | |
server-password: OSSRH_PASSWORD | |
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
gpg-passphrase: GPG_PASSPHRASE | |
- name: Create Staging Repository | |
if: ${{ fromJSON(env.canonical) && (github.ref == 'refs/heads/release') }} | |
run: | | |
./.github/scripts/cistaging.sh org.osgi | |
env: | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
- name: Publish | |
id: publish | |
if: ${{ fromJSON(env.canonical) }} | |
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # v2.11.1 | |
with: | |
cache-read-only: ${{ github.ref != 'refs/heads/main' }} | |
arguments: :publish | |
env: | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
OSSRH_RELEASE: ${{ env.OSSRH_STAGINGREPOSITORY_org_osgi }} | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
- name: Upload Generated Repo | |
if: ${{ fromJSON(env.canonical) }} | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: OSGi-Generated-Repo | |
path: | | |
cnf/generated/repo/ | |
spec: | |
name: Specification | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git Checkout | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
- name: Set up Java | |
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ env.java_version }} | |
- name: Build | |
id: build | |
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # v2.11.1 | |
with: | |
cache-read-only: ${{ github.ref != 'refs/heads/main' }} | |
arguments: --continue :osgi.specs:specifications | |
- name: Upload Specification HTML | |
if: ${{ fromJSON(env.canonical) || ((github.repository != 'osgi/osgi') && (github.event_name != 'pull_request')) }} | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: OSGi-Specification-HTML | |
path: osgi.specs/generated/html/ | |
- name: Upload Specification PDF | |
if: ${{ fromJSON(env.canonical) }} | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: OSGi-Specification-PDF | |
path: osgi.specs/generated/*.pdf | |
gh_pages: | |
if: ${{ (((github.repository == 'osgi/osgi') && (github.ref == 'refs/heads/main')) || (github.repository != 'osgi/osgi')) && (github.event_name != 'pull_request') }} | |
needs: spec | |
name: GitHub Pages | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Download Specification HTML | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: OSGi-Specification-HTML | |
path: osgi.specs/generated/html | |
- name: Publish Specification HTML | |
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages | |
publish_dir: osgi.specs/generated/html | |
force_orphan: true | |
tck: | |
permissions: | |
contents: none | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJSON(needs.build.outputs.tck-matrix) }} | |
name: TCK ${{ matrix.tck }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Java | |
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ env.java_version }} | |
- name: Download TCK | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: OSGi-TCK | |
- name: Run TCK | |
id: tck | |
run: | | |
cd osgi.tck.${{ matrix.book }} | |
java -jar jar/bnd.jar --exceptions runtests --title ${{ matrix.tck }} --reportdir reports/${{ matrix.tck }} ${{ matrix.tck }}.bnd | |
- name: Upload TCK Test Reports | |
if: ${{ always() && ((steps.tck.outcome == 'success') || (steps.tck.outcome == 'failure')) }} | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: TCK-${{ matrix.tck }}-reports | |
path: | | |
osgi.tck.${{ matrix.book }}/reports/ |