|
| 1 | +[config] |
| 2 | +default_to_workspace = false |
| 3 | +skip_core_tasks = true |
| 4 | + |
| 5 | +[tasks.build] |
| 6 | +run_task = { name = [ |
| 7 | + "build-openai", |
| 8 | + "build-cohere", |
| 9 | + "build-hugging-face", |
| 10 | + "build-voyageai", |
| 11 | +] } |
| 12 | + |
| 13 | +[tasks.build-portable] |
| 14 | +run_task = { name = [ |
| 15 | + "build-openai-portable", |
| 16 | + "build-cohere-portable", |
| 17 | + "build-hugging-face-portable", |
| 18 | + "build-voyageai-portable", |
| 19 | +] } |
| 20 | + |
| 21 | +[tasks.release-build] |
| 22 | +run_task = { name = [ |
| 23 | + "release-build-openai", |
| 24 | + "release-build-cohere", |
| 25 | + "release-build-hugging-face", |
| 26 | + "release-build-voyageai", |
| 27 | +] } |
| 28 | + |
| 29 | +[tasks.release-build-portable] |
| 30 | +run_task = { name = [ |
| 31 | + "release-build-openai-portable", |
| 32 | + "release-build-cohere-portable", |
| 33 | + "release-build-hugging-face-portable", |
| 34 | + "release-build-voyageai-portable", |
| 35 | +] } |
| 36 | + |
| 37 | +[tasks.build-openai] |
| 38 | +install_crate = { crate_name = "cargo-component", version = "0.20.0" } |
| 39 | +command = "cargo-component" |
| 40 | +args = ["build", "-p", "golem-embed-openai"] |
| 41 | + |
| 42 | +[tasks.build-openai-portable] |
| 43 | +install_crate = { crate_name = "cargo-component", version = "0.20.0" } |
| 44 | +command = "cargo-component" |
| 45 | +args = ["build", "-p", "golem-embed-openai", "--no-default-features"] |
| 46 | + |
| 47 | +[tasks.build-cohere] |
| 48 | +install_crate = { crate_name = "cargo-component", version = "0.20.0" } |
| 49 | +command = "cargo-component" |
| 50 | +args = ["build", "-p", "golem-embed-cohere"] |
| 51 | + |
| 52 | +[tasks.build-cohere-portable] |
| 53 | +install_crate = { crate_name = "cargo-component", version = "0.20.0" } |
| 54 | +command = "cargo-component" |
| 55 | +args = ["build", "-p", "golem-embed-cohere", "--no-default-features"] |
| 56 | + |
| 57 | +[tasks.build-hugging-face] |
| 58 | +install_crate = { crate_name = "cargo-component", version = "0.20.0" } |
| 59 | +command = "cargo-component" |
| 60 | +args = ["build", "-p", "golem-embed-hugging-face"] |
| 61 | + |
| 62 | +[tasks.build-hugging-face-portable] |
| 63 | +install_crate = { crate_name = "cargo-component", version = "0.20.0" } |
| 64 | +command = "cargo-component" |
| 65 | +args = ["build", "-p", "golem-embed-hugging-face", "--no-default-features"] |
| 66 | + |
| 67 | +[tasks.build-voyageai] |
| 68 | +install_crate = { crate_name = "cargo-component", version = "0.20.0" } |
| 69 | +command = "cargo-component" |
| 70 | +args = ["build", "-p", "golem-embed-voyageai"] |
| 71 | + |
| 72 | +[tasks.build-voyageai-portable] |
| 73 | +install_crate = { crate_name = "cargo-component", version = "0.20.0" } |
| 74 | +command = "cargo-component" |
| 75 | +args = ["build", "-p", "golem-embed-voyageai", "--no-default-features"] |
| 76 | + |
| 77 | +[tasks.release-build-openai] |
| 78 | +install_crate = { crate_name = "cargo-component", version = "0.20.0" } |
| 79 | +command = "cargo-component" |
| 80 | +args = ["build", "-p", "golem-embed-openai", "--release"] |
| 81 | + |
| 82 | +[tasks.release-build-openai-portable] |
| 83 | +install_crate = { crate_name = "cargo-component", version = "0.20.0" } |
| 84 | +command = "cargo-component" |
| 85 | +args = ["build", "-p", "golem-embed-openai", "--release", "--no-default-features"] |
| 86 | + |
| 87 | +[tasks.release-build-cohere] |
| 88 | +install_crate = { crate_name = "cargo-component", version = "0.20.0" } |
| 89 | +command = "cargo-component" |
| 90 | +args = ["build", "-p", "golem-embed-cohere", "--release"] |
| 91 | + |
| 92 | +[tasks.release-build-cohere-portable] |
| 93 | +install_crate = { crate_name = "cargo-component", version = "0.20.0" } |
| 94 | +command = "cargo-component" |
| 95 | +args = ["build", "-p", "golem-embed-cohere", "--release", "--no-default-features"] |
| 96 | + |
| 97 | +[tasks.release-build-hugging-face] |
| 98 | +install_crate = { crate_name = "cargo-component", version = "0.20.0" } |
| 99 | +command = "cargo-component" |
| 100 | +args = ["build", "-p", "golem-embed-hugging-face", "--release"] |
| 101 | + |
| 102 | +[tasks.release-build-hugging-face-portable] |
| 103 | +install_crate = { crate_name = "cargo-component", version = "0.20.0" } |
| 104 | +command = "cargo-component" |
| 105 | +args = ["build", "-p", "golem-embed-hugging-face", "--release", "--no-default-features"] |
| 106 | + |
| 107 | +[tasks.release-build-voyageai] |
| 108 | +install_crate = { crate_name = "cargo-component", version = "0.20.0" } |
| 109 | +command = "cargo-component" |
| 110 | +args = ["build", "-p", "golem-embed-voyageai", "--release"] |
| 111 | + |
| 112 | +[tasks.release-build-voyageai-portable] |
| 113 | +install_crate = { crate_name = "cargo-component", version = "0.20.0" } |
| 114 | +command = "cargo-component" |
| 115 | +args = ["build", "-p", "golem-embed-voyageai", "--release", "--no-default-features"] |
| 116 | + |
| 117 | +[tasks.wit-update] |
| 118 | +install_crate = { crate_name = "wit-deps-cli" } |
| 119 | +command = "wit-deps" |
| 120 | +args = ["update"] |
| 121 | + |
| 122 | +[tasks.wit] |
| 123 | +dependencies = ["wit-update"] |
| 124 | + |
| 125 | +script_runner = "@duckscript" |
| 126 | +script = """ |
| 127 | +modules = array embed openai cohere hugging-face voyageai ../test/embed |
| 128 | +
|
| 129 | +for module in ${modules} |
| 130 | + rm -r ${module}/wit/deps |
| 131 | + mkdir ${module}/wit/deps/golem-embed |
| 132 | + cp wit/golem-embed.wit ${module}/wit/deps/golem-embed/golem-embed.wit |
| 133 | + cp wit/deps/wasi:io ${module}/wit/deps |
| 134 | +
|
| 135 | + echo "Copied WIT for module embed::${module}" |
| 136 | +end |
| 137 | +
|
| 138 | +""" |
| 139 | + |
| 140 | +[tasks.build-test-components] |
| 141 | +dependencies = ["build"] |
| 142 | +install_crate = "cargo-binstall" |
| 143 | +description = "Builds embed test components with golem-cli" |
| 144 | +script = ''' |
| 145 | +cargo-binstall [email protected] --locked --no-confirm |
| 146 | +cargo-binstall wac-cli --locked --no-confirm |
| 147 | +cd ../test/embed |
| 148 | +
|
| 149 | +golem-cli --version |
| 150 | +golem-cli app clean |
| 151 | +golem-cli app build -b openai-debug |
| 152 | +golem-cli app clean |
| 153 | +golem-cli app build -b cohere-debug |
| 154 | +golem-cli app clean |
| 155 | +golem-cli app build -b hugging-face-debug |
| 156 | +golem-cli app clean |
| 157 | +golem-cli app build -b voyageai-debug |
| 158 | +''' |
| 159 | + |
| 160 | + |
| 161 | + |
0 commit comments