Skip to content

Commit cd57918

Browse files
Merge pull request #1007 from ArmDeveloperEcosystem/fix-spacy-smoke-import
Fix spaCy smoke install on Arm64
2 parents 44a1bb4 + 006c3c3 commit cd57918

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

.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"

0 commit comments

Comments
 (0)