diff --git a/Taskfile.dist.yml b/Taskfile.dist.yml index af3a8e715c..9d8b431782 100644 --- a/Taskfile.dist.yml +++ b/Taskfile.dist.yml @@ -11,22 +11,24 @@ vars: CMAKE_PRESET: 'mamba-unix-shared-debug-dev' CACHE_DIR: '{{.BUILD_DIR}}/pkgs' CPU_PERCENTAGE: 75 - CPU_COUNT: + CPU_TOTAL: sh: >- {{- if eq OS "linux" -}} - echo $(($(cat /proc/cpuinfo | grep processor | wc -l) * {{.CPU_PERCENTAGE}} / 100)) + cat /proc/cpuinfo | grep processor | wc -l + {{- else if eq OS "darwin" -}} + sysctl -n hw.ncpu {{- else -}} echo 1 {{- end -}} + CPU_COUNT: + sh: echo $(({{.CPU_TOTAL}} * {{.CPU_PERCENTAGE}} / 100)) tasks: _create-env: run: 'when_changed' internal: true cmds: - # Pin some version of Python so that we don' develop witha too recent version - - 'micromamba create --yes --prefix "{{.prefix}}" python=3.9' - - 'micromamba install --yes --prefix "{{.prefix}}" --file ./dev/environment-dev.yml' + - 'micromamba create --yes --prefix "{{.prefix}}" --file ./dev/environment-dev.yml' - 'micromamba install --yes --prefix "{{.prefix}}" --file ./dev/environment-dev-extra.yml' sources: - './dev/environment-dev.yml' diff --git a/dev/environment-dev-extra.yml b/dev/environment-dev-extra.yml index 5d8d5b92b3..30c1b18f8f 100644 --- a/dev/environment-dev-extra.yml +++ b/dev/environment-dev-extra.yml @@ -10,8 +10,9 @@ dependencies: - lld - cmake-format # C++ Debugging - - gdb - - valgrind + - sel(linux): gdb + - sel(osx): lldb + - sel(linux): valgrind # Out of date on MacOS # Python LSP support - python-lsp-server-base - python-lsp-black diff --git a/dev/environment-dev.yml b/dev/environment-dev.yml index 34dcef4311..9d7796a7e0 100644 --- a/dev/environment-dev.yml +++ b/dev/environment-dev.yml @@ -24,6 +24,7 @@ dependencies: # micromamba dependencies - cli11 >=2.2 # micromamba test dependencies + - python =3.9 # Some not too recent version - mitmproxy - pytest >=7.3.0 - pytest-asyncio