Skip to content

Commit

Permalink
Merge branch 'release/10.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
DanySK committed Jan 14, 2021
2 parents 649c5af + 8c22de4 commit 6d24537
Show file tree
Hide file tree
Showing 1,317 changed files with 65,427 additions and 46,885 deletions.
File renamed without changes.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto eol=lf
*.bat text eol=crlf
*.ps1 text eol=crlf
26 changes: 26 additions & 0 deletions .github/build-steps/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
set -e
CUSTOM_BUILD_SCRIPT=${CUSTOM_BUILD_SCRIPT:-.github/scripts/build}
if [ -x $CUSTOM_BUILD_SCRIPT ]; then
echo 'Detected custom build instructions'
$CUSTOM_BUILD_SCRIPT
elif [ -x 'gradlew' ]; then
echo 'Detected gradle wrapper, checking for known tasks'
if ./gradlew tasks | grep '^assemble\s'; then
echo 'Detected assemble task'
./gradlew assemble --parallel
elif ./gradlew tasks | grep '^build\s'; then
echo 'Detected build task'
./gradlew build --parallel
else
echo 'No known tasks, fall back to the default tasks'
./gradlew
fi
elif [ -f 'pom.xml' ]; then
echo 'Detected Maven pom.xml, running mvn package'
mvn package -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
else
echo 'No valid configuration detected, failing'
echo "To fix, provide an *executable* build script in $CUSTOM_BUILD_SCRIPT"
exit 1
fi
21 changes: 21 additions & 0 deletions .github/build-steps/check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
set -e
CUSTOM_BUILD_SCRIPT=${CUSTOM_BUILD_SCRIPT:-.github/scripts/check}
if [ -x $CUSTOM_BUILD_SCRIPT ]; then
echo 'Detected custom check instructions'
$CUSTOM_BUILD_SCRIPT
elif [ -x 'gradlew' ]; then
echo 'Detected gradle wrapper, checking for known tasks'
if ./gradlew tasks | grep '^check\s'; then
echo 'Detected check task'
./gradlew check --parallel
if ./gradlew tasks | grep '^jacocoTestReport\s'; then
./gradlew jacocoTestReport --parallel
fi
else
echo 'No known check tasks'
fi
else
echo 'No valid configuration detected, skipping checks'
echo "To fix, provide an *executable* build script in $CUSTOM_BUILD_SCRIPT"
fi
11 changes: 11 additions & 0 deletions .github/build-steps/compatibility_check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
if [ -x .github/scripts/compatibility_check ]; then
.github/scripts/compatibility_check
else
COMPATIBLE=true
echo "COMPATIBLE=$COMPATIBLE"
echo "COMPATIBLE=$COMPATIBLE" >> $GITHUB_ENV
REFERENCE=$([ "$OS" = 'ubuntu' ] && [ "$JAVA_VERSION" = 8 ] && echo 'true' || echo 'false')
echo "REFERENCE=$REFERENCE"
echo "REFERENCE=$REFERENCE" >> $GITHUB_ENV
fi
25 changes: 25 additions & 0 deletions .github/build-steps/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
set -e
CUSTOM_BUILD_SCRIPT=${CUSTOM_BUILD_SCRIPT:-.github/scripts/deploy}
if [ -x $CUSTOM_BUILD_SCRIPT ]; then
echo 'Detected custom deploy instructions'
$CUSTOM_BUILD_SCRIPT
elif [ -x 'gradlew' ]; then
echo 'Detected gradle wrapper, checking for known tasks'
if ./gradlew tasks | grep '^deploy\s'; then
echo 'Detected deploy task'
./gradlew deploy --parallel
elif ./gradlew tasks | grep '^publish\s'; then
echo 'Detected publish task'
./gradlew publish --parallel
else
echo 'No deploy task'
fi
elif [ -f 'pom.xml' ]; then
echo 'Detected Maven pom.xml, running mvn deploy'
mvn deploy -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
else
echo 'No valid configuration detected, failing'
echo "To fix, provide an *executable* build script in $CUSTOM_BUILD_SCRIPT"
exit 1
fi
3 changes: 3 additions & 0 deletions .github/scripts/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
set -e
./gradlew assemble shadowJar dokkaJavadoc orchidBuild --parallel --scan --stacktrace
3 changes: 3 additions & 0 deletions .github/scripts/check
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
set -e
./gradlew check jacocoTestReport --parallel --scan
7 changes: 7 additions & 0 deletions .github/scripts/compatibility_check
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
COMPATIBLE=$([ "$JAVA_VERSION" -ge 11 ] && echo 'true' || echo 'false')
echo "COMPATIBLE=$COMPATIBLE"
echo "COMPATIBLE=$COMPATIBLE" >> $GITHUB_ENV
REFERENCE=$([ "$OS" = 'ubuntu' ] && [ "$JAVA_VERSION" = 11 ] && echo 'true' || echo 'false')
echo "REFERENCE=$REFERENCE"
echo "REFERENCE=$REFERENCE" >> $GITHUB_ENV
21 changes: 21 additions & 0 deletions .github/scripts/deploy
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
set -e
./gradlew publishKotlinMavenPublicationToCentralS01Repository
# Publish on GitHub. Fails due to overwritings, so it's ok to give up
./gradlew publishKotlinMavenPublicationToGithubRepository --continue || true
./gradlew orchidDeploy
if [ -n "$TAG" ] || [ "$BRANCH" = 'develop' ]
then
echo Installing surge
sudo npm install --global surge
echo Deploying ${STABILITY_MARKER}javadoc on surge
surge build/dokka/javadoc/ alchemist-${STABILITY_MARKER}doc.surge.sh
fi
if [ -n "$TAG" ]
then
MESSAGE=$(git tag -l --format='%(contents)' "$TAG")
hub release create -m "$MESSAGE" "$TAG" || true
for jar in build/shadow/*; do
gh release upload "$TAG" --clobber "$jar"
done
fi
25 changes: 25 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: automerge
on:
push:
pull_request:
types:
- labeled
- unlabeled
- reopened
- unlocked
jobs:
automerge:
runs-on: ubuntu-latest
steps:
- name: automerge
uses: "DanySK/yaagha@master"
env:
GITHUB_TOKEN: "${{ secrets.AUTOMERGE_TOKEN }}"
MERGE_FORKS: "false"
MERGE_LABELS: "version-upgrade"
BLOCK_LABELS: "blocked, wontfix, invalid"
MERGE_METHOD: "rebase"
CLOSE_ON_CONFLICT: "true"
DELETE_BRANCH_ON_CLOSE: "true"
GIT_USER_NAME: "Danilo Pianini"
GIT_USER_EMAIL: "[email protected]"
143 changes: 143 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
name: CI
on:
push:
schedule:
- cron: '0 3 * * SUN'

jobs:
Build:
strategy:
matrix:
os: [windows, macos, ubuntu]
jvm_version: [8, 11, 14]
runs-on: ${{ matrix.os }}-latest
env:
JAVA_VERSION: ${{ matrix.jvm_version }}
OS: ${{ matrix.os }}
TERM: dumb
steps:
# Checkout the repository
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: Fetch tags
shell: bash
run: git fetch --tags -f
- name: Populate TAG and BRANCH environment variables
shell: bash
run: |
TAG=$(git describe --tags --exact-match HEAD || echo '')
echo "Current tag is: '$TAG' (setup in the TAG environment variable)"
echo "TAG=$TAG" >> $GITHUB_ENV
BRANCH=$([ -z "$TAG" ] && echo ${GITHUB_REF#refs/heads/} || echo $TAG)
echo "Current tag is: '$BRANCH' (setup in BRANCH TAG environment variable)"
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
# Check if the configuration is supported
# COMPATIBLE means the build can run on this matrix combination
# REFERENCE means this is the combination that produces the reference artifacts
# (hence, artifacts from REFERENCE configuration shall be deployed)
# Only one matrix entry should be REFERENCE=true
# If REFERENCE=true, then also COMPATIBLE=true
- shell: bash
run: .github/build-steps/compatibility_check.sh
# Install the JDK
- uses: joschi/[email protected]
if: ${{ env.COMPATIBLE == 'true' }}
with:
java-version: ${{ matrix.jvm_version }}
server-id: ossrh
server-username: MAVEN_CENTRAL_USERNAME
server-password: MAVEN_CENTRAL_PASSWORD
gpg-private-key: ${{ secrets.SIGNING_KEY }}
gpg-passphrase: SIGNING_PASSWORD
# Install additional packages
- name: Configure Linux
shell: bash
if: ${{ env.COMPATIBLE == 'true' && contains(matrix.os, 'ubuntu') }}
run: |
if [ -x .github/scripts/configure_linux ]; then
.github/scripts/configure_linux
fi
- name: Configure MacOS X
shell: bash
if: ${{ env.COMPATIBLE == 'true' && contains(matrix.os, 'macos') }}
run: |
if [ -f .github/scripts/configure_macos ]; then
.github/scripts/configure_macos
fi
- name: Configure the Windows Pagefile
if: ${{ env.COMPATIBLE == 'true' && contains(matrix.os, 'windows') }}
uses: al-cheb/[email protected]
- name: Configure Windows
shell: bash
if: ${{ env.COMPATIBLE == 'true' && contains(matrix.os, 'windows') }}
run: |
if [ -f .github/scripts/configure_windows ]; then
.github/scripts/configure_windows
fi
- name: Build
if: ${{ env.COMPATIBLE == 'true' }}
shell: bash
run: .github/build-steps/build.sh
- name: Check
if: ${{ env.COMPATIBLE == 'true' }}
shell: bash
run: .github/build-steps/check.sh
- name: CodeCov
if: ${{ env.REFERENCE == 'true' }}
uses: codecov/codecov-action@v1
- name: Deploy
if: ${{ env.REFERENCE == 'true' }}
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
MAVEN_CENTRAL_USERNAME: danysk
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
run: .github/build-steps/deploy.sh
Build-Success:
runs-on: ubuntu-latest
needs: Build
steps:
- shell: bash
run: touch ok
- uses: actions/upload-artifact@v2
with:
name: success
path: ok
CI-Complete:
needs: Build-Success
if: always()
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: success
- shell: bash
run: '[ -f ok ]'
Automerge:
needs: CI-Complete
runs-on: ubuntu-latest
if: always()
steps:
- name: automerge
uses: "DanySK/yaagha@master"
env:
GITHUB_TOKEN: "${{ secrets.AUTOMERGE_TOKEN }}"
MERGE_FORKS: "false"
MERGE_LABELS: "version-upgrade"
BLOCK_LABELS: "blocked, wontfix, invalid"
MERGE_METHOD: "rebase"
CLOSE_ON_CONFLICT: "true"
DELETE_BRANCH_ON_CLOSE: "true"
GIT_USER_NAME: "Danilo Pianini"
GIT_USER_EMAIL: "[email protected]"
83 changes: 83 additions & 0 deletions .github/workflows/build-external-pull-requests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Pull Request CI
on:
pull_request:

jobs:
Build-Foreign-Pull-Request:
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
strategy:
matrix:
os: [windows, macos, ubuntu]
jvm_version: [8, 11, 14]
runs-on: ${{ matrix.os }}-latest
env:
JAVA_VERSION: ${{ matrix.jvm_version }}
OS: ${{ matrix.os }}
TERM: dumb
steps:
# Checkout the repository
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: Fetch tags
shell: bash
run: git fetch --tags -f
- name: Populate TAG and BRANCH environment variables
shell: bash
run: |
TAG=$(git describe --tags --exact-match HEAD || echo '')
echo "Current tag is: '$TAG' (setup in the TAG environment variable)"
echo "TAG=$TAG" >> $GITHUB_ENV
BRANCH=$([ -z "$TAG" ] && echo ${GITHUB_REF#refs/heads/} || echo $TAG)
echo "Current tag is: '$BRANCH' (setup in BRANCH TAG environment variable)"
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
# Check if the configuration is supported
# COMPATIBLE means the build can run on this matrix combination
# REFERENCE means this is the combination that produces the reference artifacts
# (hence, artifacts from REFERENCE configuration shall be deployed)
# Only one matrix entry should be REFERENCE=true
# If REFERENCE=true, then also COMPATIBLE=true
- shell: bash
run: .github/build-steps/compatibility_check.sh
# Install the JDK
- uses: joschi/[email protected]
if: ${{ env.COMPATIBLE }}
with:
java-version: ${{ matrix.jvm_version }}
# Install additional packages
- name: Configure Linux
shell: bash
if: ${{ env.COMPATIBLE && contains(matrix.os, 'ubuntu') }}
run: |
if [ -x .github/scripts/configure_linux ]; then
.github/scripts/configure_linux
fi
- name: Configure MacOS X
shell: bash
if: ${{ env.COMPATIBLE && contains(matrix.os, 'macos') }}
run: |
if [ -f .github/scripts/configure_macos ]; then
.github/scripts/configure_macos
fi
- name: Configure the Windows Pagefile
if: ${{ env.COMPATIBLE == 'true' && contains(matrix.os, 'windows') }}
uses: al-cheb/[email protected]
- name: Configure Windows
shell: bash
if: ${{ env.COMPATIBLE && contains(matrix.os, 'windows') }}
run: |
if [ -f .github/scripts/configure_windows ]; then
.github/scripts/configure_windows
fi
- name: Build
if: ${{ env.COMPATIBLE == 'true' }}
shell: bash
run: .github/build-steps/build.sh
- name: Check
if: ${{ env.COMPATIBLE == 'true' }}
shell: bash
run: .github/build-steps/check.sh
- name: CodeCov
if: ${{ env.REFERENCE == 'true' }}
uses: codecov/codecov-action@v1
Loading

0 comments on commit 6d24537

Please sign in to comment.