Skip to content

Commit f6f4996

Browse files
committed
NXP backend: Enable initial unit tests workflow
Fix duplicate bpe tokenizer base symbol (#63)
1 parent dcd25eb commit f6f4996

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/workflows/trunk.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,3 +658,29 @@ jobs:
658658
build-mode: Release
659659
build-tool: cmake
660660
docker-image: executorch-ubuntu-22.04-clang12
661+
662+
unittest-nxp-neutron:
663+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
664+
permissions:
665+
id-token: write
666+
contents: read
667+
with:
668+
runner: linux.2xlarge
669+
docker-image: executorch-ubuntu-22.04-clang12
670+
submodules: 'true'
671+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
672+
timeout: 90
673+
script: |
674+
set -eux
675+
676+
# The generic Linux job chooses to use base env, not the one setup by the image
677+
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
678+
conda activate "${CONDA_ENV}"
679+
680+
# Build and install Executorch
681+
PYTHON_EXECUTABLE=python \
682+
CMAKE_ARGS="-DEXECUTORCH_BUILD_NXP_NEUTRON=ON" \
683+
.ci/scripts/setup-linux.sh --build-tool "cmake"
684+
685+
# Run pytest
686+
PYTHON_EXECUTABLE=python bash backends/nxp/run_unittests.sh

backends/nxp/run_unittests.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
# Copyright 2025 NXP
3+
#
4+
# This source code is licensed under the BSD-style license found in the
5+
# LICENSE file in the root directory of this source tree.
6+
set -eux
7+
8+
SCRIPT_DIR=$(dirname $(readlink -fm $0))
9+
EXECUTORCH_DIR=$(dirname $(dirname $SCRIPT_DIR))
10+
11+
cd $EXECUTORCH_DIR
12+
13+
# '-c /dev/null' is used to ignore root level pytest.ini.
14+
PYTHONPATH=`cd ..; pwd` pytest -c /dev/null backends/nxp/tests/

0 commit comments

Comments
 (0)