Skip to content

Commit 2d37b5d

Browse files
Merge pull request #1009 from ArmDeveloperEcosystem/main
Updated smoke tests
2 parents 8d7eebb + 3cf4c54 commit 2d37b5d

969 files changed

Lines changed: 22709 additions & 22637 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions/apt-bootstrap/action.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,23 @@ inputs:
3030
description: Install packages with --no-install-recommends when set to true.
3131
required: false
3232
default: "false"
33+
update_timeout_seconds:
34+
description: Maximum seconds to allow each apt-get update attempt before retrying.
35+
required: false
36+
default: "600"
37+
install_timeout_seconds:
38+
description: Maximum seconds to allow each apt-get install attempt before retrying.
39+
required: false
40+
default: "1800"
3341

3442
runs:
3543
using: composite
3644
steps:
3745
- name: Harden apt update and install
3846
shell: bash
47+
env:
48+
APT_UPDATE_TIMEOUT_SECONDS: ${{ inputs.update_timeout_seconds }}
49+
APT_INSTALL_TIMEOUT_SECONDS: ${{ inputs.install_timeout_seconds }}
3950
run: |
4051
set -euo pipefail
4152
bash "${{ github.action_path }}/bootstrap.sh" \

.github/actions/apt-bootstrap/bootstrap.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ INITIAL_BACKOFF_SECONDS=5
88
QUIET=false
99
UPDATE_ONLY=false
1010
NO_INSTALL_RECOMMENDS=false
11+
APT_UPDATE_TIMEOUT_SECONDS="${APT_UPDATE_TIMEOUT_SECONDS:-600}"
12+
APT_INSTALL_TIMEOUT_SECONDS="${APT_INSTALL_TIMEOUT_SECONDS:-1800}"
1113

1214
while [[ $# -gt 0 ]]; do
1315
case "$1" in
@@ -50,6 +52,10 @@ apt_update() {
5052
sudo apt-get clean
5153
sudo rm -rf /var/lib/apt/lists/*
5254
local cmd=(
55+
timeout
56+
--signal=TERM
57+
--kill-after=60s
58+
"${APT_UPDATE_TIMEOUT_SECONDS}s"
5359
sudo apt-get
5460
-o Acquire::Retries=3
5561
-o Acquire::http::No-Cache=true
@@ -91,6 +97,10 @@ fi
9197

9298
read -r -a package_array <<< "$FULL_PACKAGES"
9399
install_cmd=(
100+
timeout
101+
--signal=TERM
102+
--kill-after=60s
103+
"${APT_INSTALL_TIMEOUT_SECONDS}s"
94104
sudo env
95105
DEBIAN_FRONTEND=noninteractive
96106
APT_LISTCHANGES_FRONTEND=none

.github/actions/generic-source-regression-check/action.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ inputs:
2020
description: Manually pinned upstream tag/ref to clone for the next stable candidate
2121
required: false
2222
default: ""
23+
pypi_package:
24+
description: Optional PyPI distribution name to use for next-version resolution when the runnable artifact is published on PyPI.
25+
required: false
26+
default: ""
2327
limited_cpu_probe:
2428
description: Optional bounded Arm64 CPU/source/import/help proof script to run after the candidate source resolves.
2529
required: false
@@ -80,6 +84,7 @@ runs:
8084
LANE_KIND="${{ inputs.lane_kind }}"
8185
OVERRIDE_VERSION="${{ inputs.next_version_override }}"
8286
OVERRIDE_TAG="${{ inputs.candidate_tag_override }}"
87+
PYPI_PACKAGE="${{ inputs.pypi_package }}"
8388
LIMITED_CPU_PROBE="${INPUT_LIMITED_CPU_PROBE:-}"
8489
LIMITED_CPU_DESCRIPTION="${INPUT_LIMITED_CPU_DESCRIPTION:-A bounded CPU-side proof completed on the Arm64 runner. This is not a full specialized runtime validation.}"
8590
DEFER_ON_LIMITED_CPU_PROBE_FAILURE="${INPUT_DEFER_ON_LIMITED_CPU_PROBE_FAILURE:-false}"
@@ -154,6 +159,69 @@ runs:
154159
STATUS_KIND="FOUND_OVERRIDE"
155160
LATEST_VERSION="$OVERRIDE_VERSION"
156161
CANDIDATE_TAG="$OVERRIDE_TAG"
162+
elif [ -n "$PYPI_PACKAGE" ]; then
163+
PIP_INDEX_OUTPUT=$(python3 -m pip index versions "$PYPI_PACKAGE" --only-binary=:all: 2>/tmp/pypi-index-error.log || true)
164+
PYPI_RESULT=$(PIP_INDEX_OUTPUT="$PIP_INDEX_OUTPUT" python3 - "$CURRENT" "$PYPI_PACKAGE" <<'PY'
165+
import os
166+
import re
167+
import sys
168+
169+
current = sys.argv[1].strip()
170+
package = sys.argv[2].strip()
171+
output = os.environ.get("PIP_INDEX_OUTPUT", "")
172+
pre_re = re.compile(r"(?:alpha|beta|rc|preview|pre|nightly|dev)", re.I)
173+
174+
def normalize(value: str):
175+
value = value.strip().lstrip("vV")
176+
if pre_re.search(value):
177+
return None
178+
if not re.match(r"^\d+(?:[._-]\d+)*$", value):
179+
return None
180+
display = value
181+
parts = tuple(int(x) for x in re.split(r"[._-]", value))
182+
return parts, display
183+
184+
match = re.search(r"Available versions:\s*(.+)", output)
185+
versions = []
186+
if match:
187+
versions = [item.strip() for item in match.group(1).split(",") if item.strip()]
188+
else:
189+
# Older pip output may only print the current latest as "package (version)".
190+
latest_match = re.search(rf"^{re.escape(package)}\s+\(([^)]+)\)", output, re.M | re.I)
191+
if latest_match:
192+
versions = [latest_match.group(1).strip()]
193+
194+
current_norm = normalize(current)
195+
parsed = []
196+
for version in versions:
197+
norm = normalize(version)
198+
if norm is not None:
199+
parsed.append(norm)
200+
201+
if not parsed:
202+
print("UNRESOLVED\t\t")
203+
raise SystemExit(0)
204+
205+
parsed.sort(key=lambda item: item[0])
206+
latest = parsed[-1]
207+
208+
if current_norm is None:
209+
print(f"METADATA_REVIEW\t{latest[1]}\t{latest[1]}")
210+
raise SystemExit(0)
211+
212+
newer = [item for item in parsed if item[0] > current_norm[0]]
213+
if not newer:
214+
print(f"NONE\t{current_norm[1]}\t{current}")
215+
raise SystemExit(0)
216+
217+
candidate = newer[-1]
218+
print(f"FOUND_PYPI\t{candidate[1]}\t{candidate[1]}")
219+
PY
220+
)
221+
222+
STATUS_KIND=$(printf '%s' "$PYPI_RESULT" | awk -F '\t' '{print $1}')
223+
LATEST_VERSION=$(printf '%s' "$PYPI_RESULT" | awk -F '\t' '{print $2}')
224+
CANDIDATE_TAG=$(printf '%s' "$PYPI_RESULT" | awk -F '\t' '{print $3}')
157225
else
158226
mapfile -t RAW_TAGS < <(git ls-remote --tags --refs "https://github.com/${REPO}.git" 2>/dev/null | awk '{print $2}' | sed 's#refs/tags/##')
159227
@@ -247,6 +315,14 @@ runs:
247315
"Automatic next-version resolution needs manual review and runtime validation is not automated" \
248316
"The baseline version ${CURRENT} does not parse cleanly for automatic ordering, while ${REPO} exposes newer stable-looking tags such as ${LATEST_VERSION}. This workflow also does not install and execute the package on Arm64."
249317
;;
318+
FOUND_PYPI)
319+
run_limited_cpu_probe "${LATEST_VERSION}" "${CANDIDATE_TAG}" || \
320+
emit_runtime_not_automated \
321+
"${LATEST_VERSION}" \
322+
"${LATEST_VERSION}" \
323+
"Next PyPI release resolved, but runtime validation is not automated" \
324+
"Baseline ${CURRENT} passed bounded checks. PyPI resolved ${PYPI_PACKAGE} candidate ${LATEST_VERSION}, but this workflow does not have a package-specific runtime probe configured."
325+
;;
250326
FOUND_OVERRIDE)
251327
rm -rf next-src
252328
if git clone --depth 1 --branch "$CANDIDATE_TAG" "https://github.com/${REPO}.git" next-src >/dev/null 2>&1; then

.github/workflows/test-activemq.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Test ActiveMQ on Arm64
22

33
on:
4+
workflow_dispatch:
45
workflow_call:
56
outputs:
67
contract_version:
@@ -113,14 +114,10 @@ jobs:
113114
- name: Install ActiveMQ
114115
id: install
115116
run: |
116-
set -e
117+
set -euo pipefail
117118
echo "Installing ActiveMQ from Ubuntu packages..."
118119
119-
sudo apt-get update
120-
# Install Java + ActiveMQ (classic)
121-
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
122-
default-jre-headless \
123-
activemq
120+
bash .github/actions/apt-bootstrap/bootstrap.sh --packages "default-jre-headless activemq"
124121
125122
# Find activemq binary
126123
ACTIVEMQ_BIN=$(command -v activemq || dpkg -L activemq | grep '/bin/activemq$' | head -1 || true)
@@ -377,4 +374,3 @@ jobs:
377374
echo "3. Check 'activemq --help' output: ${{ steps.test3.outputs.status || 'skipped' }}" >> $GITHUB_STEP_SUMMARY
378375
echo "4. Check Java dependency: ${{ steps.test4.outputs.status || 'skipped' }}" >> $GITHUB_STEP_SUMMARY
379376
echo "5. Check ActiveMQ has configuration files under /etc: ${{ steps.test5.outputs.status || 'skipped' }}" >> $GITHUB_STEP_SUMMARY
380-

.github/workflows/test-java-openjdk.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ jobs:
142142
- name: Install Java/OpenJDK
143143
id: install
144144
run: |
145+
set -euo pipefail
145146
echo "Installing OpenJDK 17..."
146147
147-
sudo apt-get update
148-
if sudo apt-get install -y openjdk-17-jdk; then
148+
if bash .github/actions/apt-bootstrap/bootstrap.sh --packages "openjdk-17-jdk"; then
149149
echo "OpenJDK installed successfully"
150150
echo "install_status=success" >> $GITHUB_OUTPUT
151151
else

.github/workflows/test-shap.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ jobs:
379379
baseline_version: ${{ steps.version.outputs.version || env.BASELINE_VERSION }}
380380
github_repo: ${{ env.GITHUB_REPO }}
381381
lane_kind: ${{ env.LANE_KIND }}
382+
pypi_package: shap
382383
limited_cpu_probe: |
383384
python -m venv next-venv
384385
. next-venv/bin/activate

.github/workflows/test-spacy.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ jobs:
7979
permissions:
8080
contents: read
8181
actions: read
82+
env:
83+
SPACY_VERSION: "3.8.14"
84+
NUMPY_CONSTRAINT: "numpy<2.0"
85+
CLICK_CONSTRAINT: "click<9"
8286

8387
outputs:
8488
contract_version: "2.0"
@@ -121,9 +125,14 @@ jobs:
121125
python3 -m venv venv
122126
source venv/bin/activate
123127
python -m pip install --upgrade pip
124-
python -m pip install spacy
128+
python -m pip install "$NUMPY_CONSTRAINT" "$CLICK_CONSTRAINT" "spacy==${SPACY_VERSION}"
129+
python -m pip check
125130
echo "$PWD/venv/bin" >> "$GITHUB_PATH"
126-
if python -c "import spacy" >/dev/null 2>&1; then
131+
if python - <<'PY'
132+
import spacy
133+
print(f"spaCy import OK: {spacy.__version__}")
134+
PY
135+
then
127136
echo "install_status=success" >> "$GITHUB_OUTPUT"
128137
else
129138
echo "install_status=failed" >> "$GITHUB_OUTPUT"
@@ -142,7 +151,7 @@ jobs:
142151
continue-on-error: true
143152
run: |
144153
START_TIME=$(date +%s)
145-
if python -c "import spacy" >/dev/null 2>&1; then
154+
if python -c "import spacy; print('spaCy import OK')"; then
146155
echo "status=passed" >> "$GITHUB_OUTPUT"
147156
else
148157
echo "status=failed" >> "$GITHUB_OUTPUT"

.github/workflows/test-wireshark.yml

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
test-wireshark:
8181
runs-on: ubuntu-24.04-arm
8282
env:
83-
WIRESHARK_VERSION: "4.6.3"
83+
WIRESHARK_VERSION: "4.6.6"
8484

8585
outputs:
8686
contract_version: "2.0"
@@ -123,38 +123,7 @@ jobs:
123123
id: install
124124
run: |
125125
set -euo pipefail
126-
sudo apt-get update
127-
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
128-
build-essential \
129-
cmake \
130-
ninja-build \
131-
flex \
132-
bison \
133-
curl \
134-
python3-dev \
135-
qt6-base-dev \
136-
qt6-tools-dev \
137-
qt6-multimedia-dev \
138-
libbrotli-dev \
139-
libc-ares-dev \
140-
libcap-dev \
141-
libgcrypt20-dev \
142-
libglib2.0-dev \
143-
libgnutls28-dev \
144-
libkrb5-dev \
145-
liblua5.4-dev \
146-
libmaxminddb-dev \
147-
libminizip-dev \
148-
libnghttp2-dev \
149-
libnl-3-dev \
150-
libnl-genl-3-dev \
151-
libpcap-dev \
152-
libsbc-dev \
153-
libsnappy-dev \
154-
libspeexdsp-dev \
155-
libssh-gcrypt-dev \
156-
libsystemd-dev \
157-
libxml2-dev
126+
bash .github/actions/apt-bootstrap/bootstrap.sh --packages "build-essential cmake ninja-build flex bison curl python3-dev qt6-base-dev qt6-tools-dev qt6-multimedia-dev libbrotli-dev libc-ares-dev libcap-dev libgcrypt20-dev libglib2.0-dev libgnutls28-dev libkrb5-dev liblua5.4-dev libmaxminddb-dev libminizip-dev libnghttp2-dev libnl-3-dev libnl-genl-3-dev libpcap-dev libsbc-dev libsnappy-dev libspeexdsp-dev libssh-gcrypt-dev libsystemd-dev libxml2-dev"
158127
159128
BASE_DIR="${RUNNER_TEMP}/wireshark-current"
160129
rm -rf "$BASE_DIR"

0 commit comments

Comments
 (0)