Skip to content

Commit 3aff4fe

Browse files
committed
feat: Add a Flox environment for running (unit) tests
Use Flox [1] to define a minimal environment to run ORT's (unit) tests. Test can be run in isolation from the host system [2] via env -i "$(which flox)" activate -- ./gradlew test This helps to verify that these tests indeed have no dependencies on external tools (except those present in the Flox environment). All files in `.flox` were initially auto-generated by `flox init` [3]. The only file that should ever be manually edited is `manifest.toml` via `flox edit`, but for adding packages using the combination of `flox search` and `flox install` is actually more convenient. [1]: https://flox.dev/docs/ [2]: flox/flox#2447 [3]: https://flox.dev/docs/tutorials/creating-environments/#initialize-a-project Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent e81e340 commit 3aff4fe

File tree

5 files changed

+188
-0
lines changed

5 files changed

+188
-0
lines changed

.flox/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
env/manifest.lock linguist-generated=true linguist-language=JSON

.flox/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
run/
2+
cache/
3+
lib/
4+
log/
5+
!env/

.flox/env.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "ort-flox",
3+
"version": 1
4+
}

.flox/env/manifest.lock

Lines changed: 160 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.flox/env/manifest.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Flox manifest version managed by Flox CLI
2+
version = 1
3+
4+
[vars]
5+
FLOX_DISABLE_METRICS = "true"
6+
7+
[options]
8+
activate.mode = "run"
9+
cuda-detection = false
10+
systems = ["x86_64-linux"]
11+
12+
[install]
13+
jdk21.pkg-path = "jdk21"
14+
15+
# Required to run the Gradle wrapper:
16+
coreutils.pkg-path = "coreutils"
17+
findutils.pkg-path = "findutils"
18+
gnused.pkg-path = "gnused"

0 commit comments

Comments
 (0)