mirror of https://github.com/apache/lucene.git
Add a nightly workflow to run and verify buildAndPushRelease.py and smokeTestRelease.py (#13141)
This commit is contained in:
parent
42269203cc
commit
390c109e67
|
@ -0,0 +1,74 @@
|
|||
name: "Run nightly: buildAndPushRelease and smokeTestRelease.py"
|
||||
|
||||
on:
|
||||
# Allow manual dispatch.
|
||||
workflow_dispatch:
|
||||
|
||||
# run nightly at 2:04am.
|
||||
schedule:
|
||||
- cron: '4 2 * * *'
|
||||
|
||||
jobs:
|
||||
smokeTestRelease:
|
||||
name: "Smoke test release on jdk ${{ matrix.java-version }}, ${{ matrix.os }}"
|
||||
|
||||
# only run on schedule in the main Lucene repo (not in forks).
|
||||
if: (github.event_name == 'schedule' && github.repository == 'apache/lucene') || (github.event_name != 'schedule')
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest ]
|
||||
java-version: [ '17', '21', '22-ea' ]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
env:
|
||||
LUCENE_RELEASE_DIR: /tmp/lucene-release-dir
|
||||
TMP_DIR: /tmp/lucene-tmp-dir
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-package: jdk
|
||||
check-latest: true
|
||||
# This intentionally lists two versions, the last one is used as the system default (for running gradle).
|
||||
java-version: |
|
||||
${{ matrix.java-version }}
|
||||
17
|
||||
|
||||
- name: Echo diagnostic paths and locations
|
||||
run: |
|
||||
echo "All installed JDKs:"
|
||||
set | grep "JAVA"
|
||||
|
||||
echo "Gradle's 'RUNTIME_JAVA_HOME' JDK:"
|
||||
RUNTIME_JAVA_HOME_VAR=JAVA_HOME_`echo ${{ matrix.java-version }} | egrep --only "[0-9]+"`_X64
|
||||
echo ${RUNTIME_JAVA_HOME_VAR} points at ${!RUNTIME_JAVA_HOME_VAR}
|
||||
|
||||
# This sets the environment variable and makes it available for subsequent job steps.
|
||||
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable
|
||||
echo "RUNTIME_JAVA_HOME=${!RUNTIME_JAVA_HOME_VAR}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: "Run buildAndPushRelease.py (--dev-mode)"
|
||||
run: |
|
||||
# Assemble an unsigned release, in dev mode, publish locally.
|
||||
python3 ./dev-tools/scripts/buildAndPushRelease.py --dev-mode --push-local ${{ env.LUCENE_RELEASE_DIR }}
|
||||
|
||||
- name: "Run smokeTestRelease.py (runtime java: ${{ matrix.java-version }})"
|
||||
run: |
|
||||
python3 -u dev-tools/scripts/smokeTestRelease.py \
|
||||
--not-signed \
|
||||
--tmp-dir ${{ env.TMP_DIR }} \
|
||||
file://`realpath ${{ env.LUCENE_RELEASE_DIR }}/lucene*` \
|
||||
-Ptests.filter="@skipall"
|
||||
|
||||
- name: "Store smoke tester logs"
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: smoke-tester-logs-jdk-${{ matrix.java-version }}
|
||||
path: |
|
||||
${{ env.TMP_DIR }}/**/*.log
|
|
@ -158,9 +158,9 @@ def checkJARMetaData(desc, jarFile, gitRevision, version):
|
|||
break
|
||||
else:
|
||||
if len(verify) == 1:
|
||||
raise RuntimeError('%s is missing "%s" inside its META-INF/MANIFEST.MF' % (desc, verify[0]))
|
||||
raise RuntimeError('%s is missing "%s" inside its META-INF/MANIFEST.MF: %s' % (desc, verify[0], s))
|
||||
else:
|
||||
raise RuntimeError('%s is missing one of "%s" inside its META-INF/MANIFEST.MF' % (desc, verify))
|
||||
raise RuntimeError('%s is missing one of "%s" inside its META-INF/MANIFEST.MF: %s' % (desc, verify, s))
|
||||
|
||||
if gitRevision != 'skip':
|
||||
# Make sure this matches the version and git revision we think we are releasing:
|
||||
|
@ -577,7 +577,7 @@ def verifyUnpacked(java, artifact, unpackPath, gitRevision, version, testArgs):
|
|||
# raise RuntimeError('lucene: file "%s" is missing from artifact %s' % (fileName, artifact))
|
||||
# in_root_folder.remove(fileName)
|
||||
|
||||
expected_folders = ['analysis', 'analysis.tests', 'backward-codecs', 'benchmark', 'classification', 'codecs', 'core', 'core.tests',
|
||||
expected_folders = ['analysis', 'analysis.tests', 'backward-codecs', 'benchmark', 'benchmark-jmh', 'classification', 'codecs', 'core', 'core.tests',
|
||||
'distribution.tests', 'demo', 'expressions', 'facet', 'grouping', 'highlighter', 'join',
|
||||
'luke', 'memory', 'misc', 'monitor', 'queries', 'queryparser', 'replicator',
|
||||
'sandbox', 'spatial-extras', 'spatial-test-fixtures', 'spatial3d', 'suggest', 'test-framework', 'licenses']
|
||||
|
|
Loading…
Reference in New Issue