forked from apache/lucene
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (60 loc) · 2.58 KB
/
run-nightly-smoketester.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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: [ '21', '22', '23-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 }}
21
- 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
/tmp/release.log