diff --git a/features/src/cccl-dev/install.sh b/features/src/cccl-dev/install.sh index e9d65afb..3f05fda4 100644 --- a/features/src/cccl-dev/install.sh +++ b/features/src/cccl-dev/install.sh @@ -31,16 +31,24 @@ fi check_packages ${PKG[@]} ${PKG_TO_REMOVE[@]}; +CC=gcc CXX=g++ python -m pip install --upgrade pip CC=gcc CXX=g++ python -m pip install wheel setuptools; CC=gcc CXX=g++ python -m pip install psutil $LIT_VERSION_TO_INSTALL; +CC=gcc CXX=g++ python -m pip install clang-format==17.*; export LIT_VERSION="$(lit --version | grep -o -e '[0-9].*')"; +# there must be a cleaner way, but it works +export CLANG_FORMAT_PATH="$(pip show clang-format | grep "^Location: " | awk '{print $2}')/clang-format"; + # export envvars in bashrc files append_to_etc_bashrc "$(cat .bashrc | envsubst '$LIT_VERSION')"; +append_to_etc_bashrc "$(cat .bashrc | envsubst '$CLANG_FORMAT_PATH')"; append_to_all_bashrcs "$(cat .bashrc | envsubst '$LIT_VERSION')"; +append_to_all_bashrcs "$(cat .bashrc | envsubst '$CLANG_FORMAT_PATH')"; # export envvars in /etc/profile.d add_etc_profile_d_script cccl-dev "$(cat .bashrc | envsubst '$LIT_VERSION')"; +add_etc_profile_d_script cccl-dev "$(cat .bashrc | envsubst '$CLANG_FORMAT_PATH')"; # Clean up # rm -rf /tmp/*; diff --git a/matrix.yml b/matrix.yml index b4956291..bdbc0485 100644 --- a/matrix.yml +++ b/matrix.yml @@ -36,7 +36,6 @@ x-mambaforge: &conda { name: "mambaforge" } x-python: &python { name: "ghcr.io/devcontainers/features/python:1", version: "os-provided", installTools: "false", hide: true } x-cccl_dev: &cccl_dev { name: "cccl-dev", hide: true } -x-cccl-clang-format: &cccl_clang_format {name: "llvm", version: "17", packages: "clang-format", hide: true} # CCCL only needs a subset of the full CTK: x-cccl-cuda-opts: &cccl_cuda_opts { @@ -53,38 +52,38 @@ include: - os: "ubuntu:18.04" images: - - {features: [*gcc_6, {<<: *cuda_prev_min, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *gcc_env} - - {features: [*gcc_7, {<<: *cuda_prev_min, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *gcc_env} - - {features: [*gcc_8, {<<: *cuda_prev_min, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *gcc_env} - - {features: [*gcc_9, {<<: *cuda_prev_min, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *gcc_env} - - {features: [*llvm_9, {<<: *cuda_prev_min, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *llvm_env} - - {features: [*oneapi_2022, {<<: *cuda_prev_min, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *onapi_env} + - {features: [*gcc_6, {<<: *cuda_prev_min, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *gcc_env} + - {features: [*gcc_7, {<<: *cuda_prev_min, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *gcc_env} + - {features: [*gcc_8, {<<: *cuda_prev_min, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *gcc_env} + - {features: [*gcc_9, {<<: *cuda_prev_min, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *gcc_env} + - {features: [*llvm_9, {<<: *cuda_prev_min, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *llvm_env} + - {features: [*oneapi_2022, {<<: *cuda_prev_min, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *onapi_env} - os: "ubuntu:20.04" images: - - {features: [*gcc_7, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *gcc_env} - - {features: [*gcc_8, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *gcc_env} - - {features: [*gcc_9, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *gcc_env} - - {features: [*gcc_10, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *gcc_env} - - {features: [*llvm_9, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *llvm_env} - - {features: [*llvm_10, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *llvm_env} - - {features: [*llvm_11, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *llvm_env} - - {features: [*llvm_12, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *llvm_env} - - {features: [*llvm_13, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *llvm_env} - - {features: [*llvm_14, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *llvm_env} - - {features: [*oneapi_2022, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *onapi_env} + - {features: [*gcc_7, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *gcc_env} + - {features: [*gcc_8, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *gcc_env} + - {features: [*gcc_9, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *gcc_env} + - {features: [*gcc_10, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *gcc_env} + - {features: [*llvm_9, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *llvm_env} + - {features: [*llvm_10, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *llvm_env} + - {features: [*llvm_11, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *llvm_env} + - {features: [*llvm_12, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *llvm_env} + - {features: [*llvm_13, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *llvm_env} + - {features: [*llvm_14, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *llvm_env} + - {features: [*oneapi_2022, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *onapi_env} - os: "ubuntu:22.04" images: - - {features: [*nvhpc_prev, *python, *cccl_clang_format, *cccl_dev], env: *nvhpc_env} - - {features: [*nvhpc_curr, *python, *cccl_clang_format, *cccl_dev], env: *nvhpc_env} - - {features: [*gcc_11, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *gcc_env} - - {features: [*gcc_12, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *gcc_env} - - {features: [*gcc_13, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *gcc_env} - - {features: [*llvm_15, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *llvm_env} - - {features: [*llvm_prev, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *llvm_env} - - {features: [*llvm_curr, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *llvm_env} - - {features: [*oneapi_2022, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *onapi_env} + - {features: [*nvhpc_prev, *python, *cccl_dev], env: *nvhpc_env} + - {features: [*nvhpc_curr, *python, *cccl_dev], env: *nvhpc_env} + - {features: [*gcc_11, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *gcc_env} + - {features: [*gcc_12, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *gcc_env} + - {features: [*gcc_13, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *gcc_env} + - {features: [*llvm_15, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *llvm_env} + - {features: [*llvm_prev, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *llvm_env} + - {features: [*llvm_curr, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *llvm_env} + - {features: [*oneapi_2022, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *onapi_env} # llvm-cuda-nvhpc (needed by stdexec devcontainers) - {features: [*llvm_curr, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *nvhpc_curr, *python]}