diff --git a/.mise/README.md b/.ci/mise/README.md similarity index 63% rename from .mise/README.md rename to .ci/mise/README.md index 215b7142..e45831c4 100644 --- a/.mise/README.md +++ b/.ci/mise/README.md @@ -11,12 +11,12 @@ of Bazel and CodeChecker. Files ----- -File | Description ------------------- | ----------- -.mise/config.toml | Mise configuration, contains tools and tasks -.mise/init.sh | Source this script to install and init mise -.mise/run.sh | Run this script to run mise tasks from CI -.mise/print-env.sh | Utility script to show current versions of tools +File | Description +--------------------- | ----------- +.ci/mise/config.toml | Mise configuration, contains tools and tasks +.ci/mise/init.sh | Source this script to install and init mise +.ci/mise/run.sh | Run this script to run mise tasks from CI +.ci/mise/print-env.sh | Utility script to show current versions of tools How to use @@ -26,15 +26,20 @@ How to use To install and initialize mise just run the following: ```bash -source .mise/init.sh +source .ci/mise/init.sh ``` This script automatically downloads, installs, and runs `mise install` to install all default tools. +> [!IMPORTANT] +> You must source the `init.sh` script (not just execute it) as it sets the +> `MISE_CONFIG_FILE` environment variable to point to the custom config location +> at `.ci/mise/config.toml`. + Note that once installed in your local environment mise and tools will remain in the cache (`~/.local/share/mise/`), so next time if you run -`source .mise/init.sh` again it will take no time. +`source .ci/mise/init.sh` again it will take no time. ### After installation @@ -49,7 +54,7 @@ And execute tasks and tests in the environment controlled by mise. ### Run tests -In `.mise` directory you can find `config.toml` file which describes +In `.ci/mise` directory you can find `config.toml` file which describes all default tools and some test tasks - you can run them manually. Or use wrapper script which basically runs initialization and then executes `mise run` command. @@ -57,10 +62,10 @@ executes `mise run` command. For example, you can run unit tests with Bazel 7 and CodeChecker 6.25 using `pytest` with maximum verbosity: ```bash -.mise/run.sh test:7-25 test/unit -vvv +.ci/mise/run.sh test:7-25 test/unit -vvv ``` -Note that `.mise/run.sh` script is just a convenience for CI (Continuous Integration). +Note that `.ci/mise/run.sh` script is just a convenience for CI (Continuous Integration). ### Uninstall diff --git a/.mise/config.toml b/.ci/mise/config.toml similarity index 98% rename from .mise/config.toml rename to .ci/mise/config.toml index 40c10b28..6691f135 100644 --- a/.mise/config.toml +++ b/.ci/mise/config.toml @@ -21,7 +21,7 @@ experimental = true [vars] -run = ".mise/print-env.sh -vvv && pytest" +run = ".ci/mise/print-env.sh -vvv && pytest" [tasks."install:bazel-6"] diff --git a/.mise/init.sh b/.ci/mise/init.sh similarity index 96% rename from .mise/init.sh rename to .ci/mise/init.sh index 6f31e7c2..4a7965bf 100644 --- a/.mise/init.sh +++ b/.ci/mise/init.sh @@ -24,6 +24,7 @@ fi mise trust --quiet mise version export MISE_CONDA_CONCURRENCY=1 +export MISE_CONFIG_FILE=".ci/mise/config.toml" mise install || mise install mise reshim diff --git a/.mise/print-env.sh b/.ci/mise/print-env.sh similarity index 100% rename from .mise/print-env.sh rename to .ci/mise/print-env.sh diff --git a/.mise/run.sh b/.ci/mise/run.sh similarity index 100% rename from .mise/run.sh rename to .ci/mise/run.sh diff --git a/.github/workflows/mise.yaml b/.github/workflows/mise.yaml index f39c504d..3893fdda 100644 --- a/.github/workflows/mise.yaml +++ b/.github/workflows/mise.yaml @@ -60,12 +60,12 @@ jobs: - name: Install and init mise run: | - source .mise/init.sh + source .ci/mise/init.sh - name: Install all versions run: | - .mise/run.sh install + .ci/mise/run.sh install - name: Run Mise tests run: | - .mise/run.sh ${{ inputs.arguments }} + .ci/mise/run.sh ${{ inputs.arguments }}