Skip to content

Commit

Permalink
install clang-format-17 via llvm feature
Browse files Browse the repository at this point in the history
  • Loading branch information
trxcllnt committed Jan 3, 2024
1 parent 6a09a0b commit 0b1fb6b
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 35 deletions.
2 changes: 1 addition & 1 deletion features/src/cccl-dev/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "NVIDIA CCCL development utilities",
"id": "cccl-dev",
"version": "24.2.0",
"version": "24.2.1",
"description": "A feature to install NVIDIA CCCL development utilities",
"options": {
"litVersion": {
Expand Down
7 changes: 0 additions & 7 deletions features/src/cccl-dev/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,14 @@ 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/*;
Expand Down
55 changes: 28 additions & 27 deletions matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ 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 {
Expand All @@ -52,39 +53,39 @@ include:

- os: "ubuntu:18.04"
images:
- {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}
- {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}

- os: "ubuntu:20.04"
images:
- {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}
- {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}

- os: "ubuntu:22.04"
images:
- {features: [*nvhpc_prev, *python, *cccl_dev], env: *nvhpc_env}
- {features: [*nvhpc_curr, *python, *cccl_dev], env: *nvhpc_env}
- {features: [*gcc_11, {<<: *cuda_prev_max, <<: *cccl_cuda_opts}, *python, *cccl_dev], env: *gcc_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}
- {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_prev_max, <<: *cccl_cuda_opts}, *python, *cccl_clang_format, *cccl_dev], env: *gcc_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}
# llvm-cuda-nvhpc (needed by stdexec devcontainers)
- {features: [*llvm_curr, {<<: *cuda_curr_max, <<: *cccl_cuda_opts}, *nvhpc_curr, *python]}

Expand Down

0 comments on commit 0b1fb6b

Please sign in to comment.