diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0f68e4cc3..b75407334 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -135,6 +135,9 @@ jobs: ubuntu-focal-make: runs-on: ubuntu-20.04 + env: + LLAMA_NODE_AVAILABLE: true + LLAMA_PYTHON_AVAILABLE: true steps: - name: Clone @@ -147,6 +150,14 @@ jobs: sudo apt-get update sudo apt-get install build-essential gcc-8 + - uses: actions/setup-node@v4 + with: + node-version: "20" + + - uses: actions/setup-python@v4 + with: + python-version: "3.11" + - name: Build id: make_build env: diff --git a/tests/test-json-schema-to-grammar.cpp b/tests/test-json-schema-to-grammar.cpp index 33309e285..f1a8a6f16 100755 --- a/tests/test-json-schema-to-grammar.cpp +++ b/tests/test-json-schema-to-grammar.cpp @@ -804,7 +804,7 @@ int main() { } }); - if (std::system("python --version") == 0) { + if (getenv("LLAMA_PYTHON_AVAILABLE") || (std::system("python --version") == 0)) { test_all("Python", [](const TestCase & tc) { write("test-json-schema-input.tmp", tc.schema); tc.verify_status(std::system( @@ -815,7 +815,7 @@ int main() { fprintf(stderr, "\033[33mWARNING: Python not found, skipping Python JSON schema -> grammar tests.\n\033[0m"); } - if (std::system("node --version") == 0) { + if (getenv("LLAMA_NODE_AVAILABLE") || (std::system("node --version") == 0)) { test_all("JavaScript", [](const TestCase & tc) { write("test-json-schema-input.tmp", tc.schema); tc.verify_status(std::system(