Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
json: ensure py/js schema conv tested on ubuntu-focal-make
  • Loading branch information
ochafik committed Mar 22, 2024
commit cbb3e2f62993ddd90a272e204f2b9dc29ae2a7cc
11 changes: 11 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tests/test-json-schema-to-grammar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down