From 3b0d5863e39106847452408babfea177858c157a Mon Sep 17 00:00:00 2001 From: "Jonathan M. Waldrop" Date: Fri, 17 Nov 2023 14:43:02 -0600 Subject: [PATCH 1/3] change over workflows --- .github/workflows/deploy_docs.yaml | 13 ------------- .github/workflows/format.yaml | 9 --------- .../{tag_and_release.yaml => merge.yaml} | 15 +++++++++------ .../{add_licenses.yaml => pull_request.yaml} | 17 ++++++++++------- .github/workflows/test_docs.yaml | 12 ------------ 5 files changed, 19 insertions(+), 47 deletions(-) delete mode 100644 .github/workflows/deploy_docs.yaml delete mode 100644 .github/workflows/format.yaml rename .github/workflows/{tag_and_release.yaml => merge.yaml} (69%) rename .github/workflows/{add_licenses.yaml => pull_request.yaml} (62%) delete mode 100644 .github/workflows/test_docs.yaml diff --git a/.github/workflows/deploy_docs.yaml b/.github/workflows/deploy_docs.yaml deleted file mode 100644 index 424be7cb..00000000 --- a/.github/workflows/deploy_docs.yaml +++ /dev/null @@ -1,13 +0,0 @@ -name: Build and Deploy Documentation -on: - push: - branches: - - master - workflow_dispatch: - -jobs: - Build-Documentation: - uses: NWChemEx-Project/.github/.github/workflows/deploy_docs_tmpl.yaml@master - with: - target: tensorwrapper_cxx_api - dependencies: cmake doxygen sphinx diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml deleted file mode 100644 index 04908e81..00000000 --- a/.github/workflows/format.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: Run clang-format Linter - -on: [push] - -jobs: - build: - uses: NWChemEx-Project/.github/.github/workflows/format_tmpl.yaml@master - with: - source: 'include src tests' diff --git a/.github/workflows/tag_and_release.yaml b/.github/workflows/merge.yaml similarity index 69% rename from .github/workflows/tag_and_release.yaml rename to .github/workflows/merge.yaml index f21d64e1..9ede7dcf 100644 --- a/.github/workflows/tag_and_release.yaml +++ b/.github/workflows/merge.yaml @@ -1,4 +1,4 @@ -# Copyright 2021 NWChemEx +# Copyright 2023 NWChemEx-Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -name: Tag and Release + +name: .github Merge Workflow on: push: @@ -20,7 +21,9 @@ on: - master jobs: - tag: - uses: NWChemEx-Project/.github/.github/workflows/tag_and_release_master.yaml@master - secrets: - token: ${{ secrets.TAG_TOKEN }} + Common-Merge: + uses: NWChemEx-Project/.github/.github/workflows/common_merge.yaml@master + with: + doc_target: 'tensorwrapper_cxx_api' + generate_module_docs: false + secrets: inherit diff --git a/.github/workflows/add_licenses.yaml b/.github/workflows/pull_request.yaml similarity index 62% rename from .github/workflows/add_licenses.yaml rename to .github/workflows/pull_request.yaml index 682cb95a..d2068dab 100644 --- a/.github/workflows/add_licenses.yaml +++ b/.github/workflows/pull_request.yaml @@ -1,4 +1,4 @@ -# Copyright 2021 NWChemEx-Project +# Copyright 2023 NWChemEx-Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # -name: Add Licenses + +name: .github Pull Request Workflow on: pull_request: @@ -20,9 +21,11 @@ on: - master jobs: - license_files: - uses: NWChemEx-Project/.github/.github/workflows/add_licenses_master.yaml@master + Common-Pull-Request: + uses: NWChemEx-Project/.github/.github/workflows/common_pull_request.yaml@master with: - config_file: .github/.licenserc.yaml - secrets: - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + config_file: '.github/.licenserc.yaml' + source_dir: 'include src tests' + compilers: '["gcc-11", "clang-11"]' + doc_target: 'tensorwrapper_cxx_api' + secrets: inherit diff --git a/.github/workflows/test_docs.yaml b/.github/workflows/test_docs.yaml deleted file mode 100644 index a82ead75..00000000 --- a/.github/workflows/test_docs.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: Test Documentation -on: - pull_request: - branches: - - master - -jobs: - Build-Documentation: - uses: NWChemEx-Project/.github/.github/workflows/test_docs_tmpl.yaml@master - with: - target: tensorwrapper_cxx_api - dependencies: cmake doxygen sphinx From db272edbf0a569c10f7c2084edbb6dc4f5c8a5ba Mon Sep 17 00:00:00 2001 From: "Jonathan M. Waldrop" Date: Fri, 17 Nov 2023 14:48:27 -0600 Subject: [PATCH 2/3] update compilers --- .github/workflows/pull_request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index d2068dab..b152b5f5 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -26,6 +26,6 @@ jobs: with: config_file: '.github/.licenserc.yaml' source_dir: 'include src tests' - compilers: '["gcc-11", "clang-11"]' + compilers: '["gcc-11"]' doc_target: 'tensorwrapper_cxx_api' secrets: inherit From 17514c4a4a630320d581a9d7b8cab9a93dfe2ae8 Mon Sep 17 00:00:00 2001 From: "Jonathan M. Waldrop" Date: Mon, 20 Nov 2023 14:59:23 -0600 Subject: [PATCH 3/3] remove previous workflows and actions --- .github/Dockerfile/base-catch2.Dockerfile | 28 --- .github/Dockerfile/base-cblas.Dockerfile | 12 -- .github/Dockerfile/base-eigen3.Dockerfile | 11 -- .github/Dockerfile/base-lapacke.Dockerfile | 12 -- .github/Dockerfile/base-libboost.Dockerfile | 11 -- .github/Dockerfile/base-openblas.Dockerfile | 12 -- .github/Dockerfile/base-openmpi.Dockerfile | 12 -- .github/Dockerfile/base-scalapack.Dockerfile | 11 -- .github/Dockerfile/base-tiledarray.Dockerfile | 16 -- .../container-build_test_release/Dockerfile | 24 --- .../container-build_test_release/action.yaml | 86 --------- .../docker-action/Dockerfile | 57 ------ .../docker-action/build_test.sh | 130 -------------- .../entrypoint.sh | 54 ------ .github/workflows/build_base.yaml | 166 ------------------ .../workflows/build_test_release-manual.yaml | 101 ----------- .github/workflows/build_test_release.yaml | 150 ---------------- 17 files changed, 893 deletions(-) delete mode 100644 .github/Dockerfile/base-catch2.Dockerfile delete mode 100644 .github/Dockerfile/base-cblas.Dockerfile delete mode 100644 .github/Dockerfile/base-eigen3.Dockerfile delete mode 100644 .github/Dockerfile/base-lapacke.Dockerfile delete mode 100644 .github/Dockerfile/base-libboost.Dockerfile delete mode 100644 .github/Dockerfile/base-openblas.Dockerfile delete mode 100644 .github/Dockerfile/base-openmpi.Dockerfile delete mode 100644 .github/Dockerfile/base-scalapack.Dockerfile delete mode 100644 .github/Dockerfile/base-tiledarray.Dockerfile delete mode 100644 .github/actions/container-build_test_release/Dockerfile delete mode 100644 .github/actions/container-build_test_release/action.yaml delete mode 100644 .github/actions/container-build_test_release/docker-action/Dockerfile delete mode 100644 .github/actions/container-build_test_release/docker-action/build_test.sh delete mode 100644 .github/actions/container-build_test_release/entrypoint.sh delete mode 100644 .github/workflows/build_base.yaml delete mode 100644 .github/workflows/build_test_release-manual.yaml delete mode 100644 .github/workflows/build_test_release.yaml diff --git a/.github/Dockerfile/base-catch2.Dockerfile b/.github/Dockerfile/base-catch2.Dockerfile deleted file mode 100644 index 8a10b047..00000000 --- a/.github/Dockerfile/base-catch2.Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2023 NWChemEx-Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -ARG PARENT_IMAGE_NAME - -FROM ${PARENT_IMAGE_NAME}:latest - -ARG CATCH2_VERSION - -# Install catch2 ## -RUN cd /tmp \ - && git clone -b v${CATCH2_VERSION} https://github.com/catchorg/Catch2.git \ - && cd Catch2 \ - && cmake -Bbuild -H. -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/install \ - && cmake --build build \ - && cmake --build build --target install \ - && rm -rf /tmp/Catch2 diff --git a/.github/Dockerfile/base-cblas.Dockerfile b/.github/Dockerfile/base-cblas.Dockerfile deleted file mode 100644 index 10cc8629..00000000 --- a/.github/Dockerfile/base-cblas.Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -ARG PARENT_IMAGE_NAME - -FROM ${PARENT_IMAGE_NAME}:latest - -ARG LIBCBLAS_VERSION - -# Install libcblas ## -RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y libgslcblas0 \ - libgsl-dev \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* diff --git a/.github/Dockerfile/base-eigen3.Dockerfile b/.github/Dockerfile/base-eigen3.Dockerfile deleted file mode 100644 index d8e3a9d2..00000000 --- a/.github/Dockerfile/base-eigen3.Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -ARG PARENT_IMAGE_NAME - -FROM ${PARENT_IMAGE_NAME}:latest - -ARG EIGEN3_VERSION - -# Install libeigen3 ## -RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y libeigen3-dev \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* diff --git a/.github/Dockerfile/base-lapacke.Dockerfile b/.github/Dockerfile/base-lapacke.Dockerfile deleted file mode 100644 index 6bcac498..00000000 --- a/.github/Dockerfile/base-lapacke.Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -ARG PARENT_IMAGE_NAME - -FROM ${PARENT_IMAGE_NAME}:latest - -ARG LAPACKE_VERSION - -# Install liblapacke ## -RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y liblapacke \ - liblapacke-dev \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* diff --git a/.github/Dockerfile/base-libboost.Dockerfile b/.github/Dockerfile/base-libboost.Dockerfile deleted file mode 100644 index 7a4782a4..00000000 --- a/.github/Dockerfile/base-libboost.Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -ARG PARENT_IMAGE_NAME - -FROM ${PARENT_IMAGE_NAME}:latest - -ARG LIBBOOST_VERSION - -# Install libboost ## -RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y libboost-all-dev \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* diff --git a/.github/Dockerfile/base-openblas.Dockerfile b/.github/Dockerfile/base-openblas.Dockerfile deleted file mode 100644 index 4945202c..00000000 --- a/.github/Dockerfile/base-openblas.Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -ARG PARENT_IMAGE_NAME - -FROM ${PARENT_IMAGE_NAME}:latest - -ARG LIBOPENBLAS_VERSION - -# Install libopenblas ## -RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y libopenblas-base \ - libopenblas-dev \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* diff --git a/.github/Dockerfile/base-openmpi.Dockerfile b/.github/Dockerfile/base-openmpi.Dockerfile deleted file mode 100644 index a5b7cd14..00000000 --- a/.github/Dockerfile/base-openmpi.Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -ARG PARENT_IMAGE_NAME - -FROM ${PARENT_IMAGE_NAME}:latest - -ARG OPENMPI_VERSION - -# Install libopenmpi ## -RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y openmpi-bin \ - libopenmpi-dev \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* diff --git a/.github/Dockerfile/base-scalapack.Dockerfile b/.github/Dockerfile/base-scalapack.Dockerfile deleted file mode 100644 index a064dcbd..00000000 --- a/.github/Dockerfile/base-scalapack.Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -ARG PARENT_IMAGE_NAME - -FROM ${PARENT_IMAGE_NAME}:latest - -ARG SCALAPACK_VERSION - -# Install libscalapack ## -RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y libscalapack-openmpi-dev \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* diff --git a/.github/Dockerfile/base-tiledarray.Dockerfile b/.github/Dockerfile/base-tiledarray.Dockerfile deleted file mode 100644 index 3f996eda..00000000 --- a/.github/Dockerfile/base-tiledarray.Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -ARG PARENT_IMAGE_NAME - -FROM ${PARENT_IMAGE_NAME}:latest - -ARG TILEDARRAY_VERSION - -# Install tiledarray -ENV INSTALL_PATH=../install -RUN git clone https://github.com/ValeevGroup/TiledArray.git tiledarray \ - && cd tiledarray \ - && git checkout ${TILEDARRAY_VERSION} \ - && cmake -Bbuild -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH} \ - && cmake --build build \ - && cmake --build build --target install \ - && cd .. \ - && rm -rf tiledarray diff --git a/.github/actions/container-build_test_release/Dockerfile b/.github/actions/container-build_test_release/Dockerfile deleted file mode 100644 index eec40bc1..00000000 --- a/.github/actions/container-build_test_release/Dockerfile +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2023 NWChemEx-Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM alpine:latest - -COPY docker-action /docker-action -COPY entrypoint.sh /entrypoint.sh - -RUN apk add --update --no-cache docker -RUN ["chmod", "+x", "/entrypoint.sh"] - -# Code file to execute when the docker container starts up (`entrypoint.sh`) -ENTRYPOINT ["/entrypoint.sh"] diff --git a/.github/actions/container-build_test_release/action.yaml b/.github/actions/container-build_test_release/action.yaml deleted file mode 100644 index baefd728..00000000 --- a/.github/actions/container-build_test_release/action.yaml +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright 2023 NWChemEx-Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: container action to build TensorWrapper - -description: container action from the base image to build TensorWrapper - -inputs: - base_tag: - description: 'tag of the base image' - type: string - required: false - default: 'stable' - dep_repo_tag: - description: 'tag of the dependent repo images' - type: string - required: false - default: '' - token: - type: string - required: true - user: - type: string - required: true - cmake_version: - type: string - required: false - default: '' - gcc_version: - type: string - required: false - default: '' - clang_version: - type: string - required: false - default: '' - ninja_build: - type: boolean - required: true - use_clang: - type: boolean - required: true - CMAIZE_GITHUB_TOKEN: - type: string - required: true - INSTALL: - type: boolean - required: true - test: - type: boolean - required: true - integration_test: - type: boolean - required: true - branch_name: - type: string - required: true -runs: - using: 'docker' - image: 'Dockerfile' - args: - - ${{ inputs.token }} # 1 - - ${{ inputs.user }} # 2 - - ${{ inputs.base_tag }} # 3 - - ${{ inputs.cmake_version }} # 4 - - ${{ inputs.gcc_version }} # 5 - - ${{ inputs.clang_version }} # 6 - - ${{ inputs.ninja_build }} # 7 - - ${{ inputs.use_clang }} # 8 - - ${{ inputs.CMAIZE_GITHUB_TOKEN }} # 9 - - ${{ inputs.INSTALL }} # 10 - - ${{ inputs.test }} # 11 - - ${{ inputs.integration_test }} # 12 - - ${{ inputs.branch_name }} # 13 - - ${{ inputs.dep_repo_tag }} # 14 diff --git a/.github/actions/container-build_test_release/docker-action/Dockerfile b/.github/actions/container-build_test_release/docker-action/Dockerfile deleted file mode 100644 index 16bcbc77..00000000 --- a/.github/actions/container-build_test_release/docker-action/Dockerfile +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 2023 NWChemEx-Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -ARG dep_repo_tag -ARG base_tag - -FROM ghcr.io/nwchemex-project/release_parallelzone:$dep_repo_tag -FROM ghcr.io/nwchemex-project/release_utilities:$dep_repo_tag - -FROM ghcr.io/nwchemex-project/base_tensorwrapper:$base_tag - -COPY --from=0 /install /install - -COPY --from=1 /install /install - -COPY build_test.sh /build_test.sh - -RUN ["chmod", "+x", "/build_test.sh"] - -ARG cmake_version -ARG gcc_version -ARG clang_version -ARG ninja_build -ARG use_clang -ARG cmaize_github_token -ARG install -ARG unit_test -ARG int_test -ARG branch_name -ARG cr_pat -ARG user - - -ENV env_cmake_version=$cmake_version -ENV env_gcc_version=$gcc_version -ENV env_clang_version=$clang_version -ENV env_ninja_build=$ninja_build -ENV env_use_clang=$use_clang -ENV env_cmaize_github_token=$cmaize_github_token -ENV env_install=$install -ENV env_unit_test=$unit_test -ENV env_int_test=$int_test -ENV env_branch_name=$branch_name -ENV env_cr_pat=$cr_pat -ENV env_user=$user - -ENTRYPOINT ["/build_test.sh"] diff --git a/.github/actions/container-build_test_release/docker-action/build_test.sh b/.github/actions/container-build_test_release/docker-action/build_test.sh deleted file mode 100644 index 38fde92e..00000000 --- a/.github/actions/container-build_test_release/docker-action/build_test.sh +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/sh -# Copyright 2023 NWChemEx-Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# Wraps the process for configuring, building, and testing an NWX repo -# -# Usage: -# build_test.sh -# -# Other variables: -# cmake_version: the version of cmake being used in the format x.y.z -# - -set -e # Exit with error if any command fails - -# checkout repo with the current branch (not master!) - -git clone -b ${env_branch_name} https://$env_user:$env_cr_pat@github.com/NWChemEx-Project/TensorWrapper.git -cd TensorWrapper - -cmake_command=cmake -ctest_command=ctest -toolchain_file=$(pwd)/toolchain.cmake - - -echo "set(BUILD_TESTING ON)" > "${toolchain_file}" -{ - echo "set(CMAKE_CXX_STANDARD 17)" - echo 'set(CMAKE_POSITION_INDEPENDENT_CODE TRUE)' - echo "set(BUILD_SHARED_LIBS ON)" - echo "set(CATCH_ENABLE_COVERAGE ON)" - echo "set(CMAKE_PREFIX_PATH /install)" - echo 'set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage -std=c++17")' - echo 'set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOMPI_SKIP_MPICXX")' - echo 'set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage")' - echo 'set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs")' - echo 'set(CMAIZE_GITHUB_TOKEN '${env_cmaize_github_token}')' - echo 'set(CMAKE_BUILD_TYPE Release)' - echo 'set(ENABLE_SCALAPACK ON)' - echo 'set(LIBDIR "/usr/lib/x86_64-linux-gnu")' - echo 'set(BLAS_LIBRARIES "-L${LIBDIR} -lopenblas")' - echo 'set(LAPACK_LIBRARIES "-L${LIBDIR} -llapack ${BLAS_LIBRARIES}")' - echo 'set(ScaLAPACK_LIBRARIES "-L${LIBDIR} -lscalapack-openmpi ${LAPACK_LIBRARIES}")' - echo 'set(NWX_MODULE_DIRECTORY "./NWX_PyModules")' -} >> "${toolchain_file}" - - -# if clang_build is true set clang and -# clang++ as default c and cxx compiler -# otherwise set gcc as default -# clang and gcc version controlled by defaults -# or inputs -if [ "${env_use_clang}" = true ] -then - { - echo "set(CMAKE_C_COMPILER /usr/bin/clang-${env_clang_version})" - echo "set(CMAKE_CXX_COMPILER /usr/bin/clang++-${env_clang_version})" - echo 'set(gpu_backend "none" CACHE STRING "" FORCE)' - } >> "${toolchain_file}" -else - { - echo "set(CMAKE_C_COMPILER /usr/bin/gcc-${env_gcc_version})" - echo "set(CMAKE_CXX_COMPILER /usr/bin/g++-${env_gcc_version})" - } >> "${toolchain_file}" -fi - -#Step 2: Configure -if [ "${env_install}" = true ]; then - export INSTALL_PATH=/install - if [ "${env_ninja_build}" = true ] ; then - ${cmake_command} -GNinja -H. -Bbuild -DCMAKE_TOOLCHAIN_FILE="${toolchain_file}" -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH} - else - ${cmake_command} -H. -Bbuild -DCMAKE_TOOLCHAIN_FILE="${toolchain_file}" -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH} - fi -else - if [ "${env_ninja_build}" = true ] ; then - ${cmake_command} -GNinja -H. -Bbuild -DCMAKE_TOOLCHAIN_FILE="${toolchain_file}" - else - ${cmake_command} -H. -Bbuild -DCMAKE_TOOLCHAIN_FILE="${toolchain_file}" - fi -fi - -#Step 3: Compile -${cmake_command} --build build - -# Step 4: test - -# set up the envs for running mpiexec in a container -# otherwise tests would fail -export OMPI_ALLOW_RUN_AS_ROOT=1 -export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 - -cd build -# unit testing -if [ "${env_unit_test}" = true ]; then - echo "Running unit tests..." - ${ctest_command} -VV -R test_unit* -fi -# integration testing -if [ "${env_int_test}" = true ]; then - echo "Running integration tests..." - ${ctest_command} -VV -R test_integration* -fi -# test docs -#echo "Running doc tests..." -#${ctest_command} -VV -R *docs - -# python testing -#echo "Running python tests..." -#${ctest_command} -VV -R py -cd .. - -#Step 5: Install -if [ "${env_install}" = true ]; then - echo "Installing package..." - ${cmake_command} --build build --target install -fi - diff --git a/.github/actions/container-build_test_release/entrypoint.sh b/.github/actions/container-build_test_release/entrypoint.sh deleted file mode 100644 index b56ad069..00000000 --- a/.github/actions/container-build_test_release/entrypoint.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh -l -# Copyright 2023 NWChemEx-Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -e - -CR_PAT=$1 -USER=$2 -BASE_TAG=$3 -CMAKE_VERSION=$4 -GCC_VRESION=$5 -CLANG_VERSION=$6 -NINJA_BUILD=$7 -USE_CLANG=$8 -CMAIZE_GITHUB_TOKEN=$9 -INSTALL=${10} -TEST=${11} -INTEGRATION_TEST=${12} -BRANCH_NAME=${13} -DEP_REPO_TAG=${14} - -cd /docker-action - -echo $CR_PAT | docker login ghcr.io -u $USER --password-stdin - -docker build -t docker-action --build-arg cr_pat=$CR_PAT --build-arg user=$USER --build-arg base_tag=$BASE_TAG --build-arg gcc_version=$GCC_VRESION --build-arg clang_version=$CLANG_VERSION --build-arg ninja_build=$NINJA_BUILD --build-arg use_clang=$USE_CLANG --build-arg cmaize_github_token=$CMAIZE_GITHUB_TOKEN --build-arg install=$INSTALL --build-arg unit_test=$TEST --build-arg int_test=$INTEGRATION_TEST --build-arg branch_name=$BRANCH_NAME --build-arg dep_repo_tag=${DEP_REPO_TAG} . && docker run docker-action - -container_id="$(docker ps -a | grep 'docker-action')" -container_id="${container_id%% *}" -docker cp ${container_id}:/install ./install - -cat <> release.Dockerfile -FROM scratch -ADD install /install -EOF - -if [ "${USE_CLANG}" = true ]; then - docker build -t ghcr.io/nwchemex-project/release_tensorwrapper:clang-latest -f release.Dockerfile . - docker push ghcr.io/nwchemex-project/release_tensorwrapper:clang-latest -else - docker build -t ghcr.io/nwchemex-project/release_tensorwrapper:gcc-latest -f release.Dockerfile . - docker push ghcr.io/nwchemex-project/release_tensorwrapper:gcc-latest -fi diff --git a/.github/workflows/build_base.yaml b/.github/workflows/build_base.yaml deleted file mode 100644 index 14ae49d7..00000000 --- a/.github/workflows/build_base.yaml +++ /dev/null @@ -1,166 +0,0 @@ -# manually input version no.s here -# will check in workflows to obtain -# this info from other files -# - -name: Build base image - -on: - workflow_call: - inputs: - cmake_version: - type: string - required: false - default: 3.17.0 - gcc_version: - type: string - required: false - default: 9 - clang_version: - type: string - required: false - default: 11 - ubuntu_version: - type: string - required: false - default: 20.04 - catch2_version: - type: string - required: false - default: 2.13.8 - libboost_version: - type: string - required: false - default: 1.71.0 - tiledarray_version: - type: string - required: false - default: 63e180bf55849c173585a734c5e7456cbf31a986 - openblas_version: - type: string - required: false - default: 0.3.8 - cblas_version: - type: string - required: false - default: 3.9.0 - lapacke_version: - type: string - required: false - default: 3.9.0 - scalapack_version: - type: string - required: false - default: 2.1.0 - eigen3_version: - type: string - required: false - default: 3.3.7 - openmpi_version: - type: string - required: false - default: 4.0.3 - -jobs: - build-image-gcc-clang-cmake: - uses: NWChemEx-Project/.github/.github/workflows/base_image_gcc-clang-cmake.yaml@master - with: - cmake_version: ${{ inputs.cmake_version }} - gcc_version: ${{ inputs.gcc_version }} - clang_version: ${{ inputs.clang_version }} - ubuntu_version: ${{ inputs.ubuntu_version }} - secrets: inherit - - build-base-image: - runs-on: ubuntu-latest - needs: build-image-gcc-clang-cmake - steps: - - uses: actions/checkout@v3 - - name: Login to GitHub Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.CONTAINER_REPO_TOKEN }} - - name: Install libboost - uses: NWChemEx-Project/.github/actions/image-install_package@master - with: - libboost_version: ${{ inputs.libboost_version }} - package_name: libboost - parent_image_name: ghcr.io/nwchemex-project/base-cmake - path_to_dockerfile: .github/Dockerfile/base-libboost.Dockerfile - - name: Install openblas - uses: NWChemEx-Project/.github/actions/image-install_package@master - with: - openblas_version: ${{ inputs.openblas_version }} - package_name: openblas - parent_image_name: base-libboost - path_to_dockerfile: .github/Dockerfile/base-openblas.Dockerfile - - name: Install cblas - uses: NWChemEx-Project/.github/actions/image-install_package@master - with: - cblas_version: ${{ inputs.cblas_version }} - package_name: cblas - parent_image_name: base-openblas - path_to_dockerfile: .github/Dockerfile/base-cblas.Dockerfile - - name: Install lapacke - uses: NWChemEx-Project/.github/actions/image-install_package@master - with: - lapacke_version: ${{ inputs.lapacke_version }} - package_name: lapacke - parent_image_name: base-cblas - path_to_dockerfile: .github/Dockerfile/base-lapacke.Dockerfile - - name: Install scalapack - uses: NWChemEx-Project/.github/actions/image-install_package@master - with: - scalapack_version: ${{ inputs.scalapack_version }} - package_name: scalapack - parent_image_name: base-lapacke - path_to_dockerfile: .github/Dockerfile/base-scalapack.Dockerfile - - name: Install eigen3 - uses: NWChemEx-Project/.github/actions/image-install_package@master - with: - eigen3_version: ${{ inputs.scalapack_version }} - package_name: eigen3 - parent_image_name: base-scalapack - path_to_dockerfile: .github/Dockerfile/base-eigen3.Dockerfile - - name: Install openmpi - uses: NWChemEx-Project/.github/actions/image-install_package@master - with: - openmpi_version: ${{ inputs.openmpi_version }} - package_name: openmpi - parent_image_name: base-eigen3 - path_to_dockerfile: .github/Dockerfile/base-openmpi.Dockerfile - - name: Install tiledarray - uses: NWChemEx-Project/.github/actions/image-install_package@master - with: - tiledarray_version: ${{ inputs.tiledarray_version }} - package_name: tiledarray - parent_image_name: base-openmpi - path_to_dockerfile: .github/Dockerfile/base-tiledarray.Dockerfile - - name: Install catch2 - uses: NWChemEx-Project/.github/actions/image-install_package@master - with: - catch2_version: ${{ inputs.catch2_version }} - package_name: catch2 - parent_image_name: base-tiledarray - path_to_dockerfile: .github/Dockerfile/base-catch2.Dockerfile - - name: Push the base image - uses: NWChemEx-Project/.github/actions/push_image@master - with: - tmp_image_name: base-catch2 - tmp_image_tag: latest - image_name: ghcr.io/nwchemex-project/base_tensorwrapper - image_tag: latest - - name: Check stable base image - id: image_exists - shell: /usr/bin/bash {0} - run: | - docker manifest inspect ghcr.io/nwchemex-project/base_tensorwrapper:stable > /dev/null - echo "conclusion=$?" >> "$GITHUB_OUTPUT" - - name: Push stable base image if not exist - if: ${{ steps.image_exists.outputs.conclusion != 0 }} - run: | - docker pull ghcr.io/nwchemex-project/base_tensorwrapper:latest - docker tag ghcr.io/nwchemex-project/base_tensorwrapper:latest ghcr.io/nwchemex-project/base_tensorwrapper:stable - docker push ghcr.io/nwchemex-project/base_tensorwrapper:stable diff --git a/.github/workflows/build_test_release-manual.yaml b/.github/workflows/build_test_release-manual.yaml deleted file mode 100644 index 2c5dfc39..00000000 --- a/.github/workflows/build_test_release-manual.yaml +++ /dev/null @@ -1,101 +0,0 @@ -# The building/testing/releasing process happens -# in a container created from the base image (container action). -# In the end two new release images -# ghcr.io/nwchemex-project/release_tensorwrapper:gcc(clang)-latest -# are generated. Whether these images are stable -# (do not break any downstream repos) or not is still -# to be tested. -# This workflow should run in the branch which opens a -# PR to dev (dev/master model to be developed). - -name: Build test release - -on: - workflow_dispatch: - -jobs: - # TODO: obtain package version info - # general packages for all repos: from NWXCmake - # specific packages for a repo: from dependency_versions.txt in - # the repo - # - # A job to retrieve all package versions and output - ### - update-base-image: - uses: NWChemEx-Project/TensorWrapper/.github/workflows/build_base.yaml@master - secrets: inherit - - build_test_release-gcc: - runs-on: ubuntu-latest - needs: update-base-image - steps: - - name: Login to GitHub Container Registry - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.CONTAINER_REPO_TOKEN }} - - uses: actions/checkout@v3 - - name: Get current branch name - id: branch-name - uses: tj-actions/branch-names@v7 - - name: build test release in a container - uses: ./.github/actions/container-build_test_release - with: - ninja_build: true - test: true - integration_test: false - INSTALL: true - base_tag: latest - dep_repo_tag: gcc-stable - token: ${{ secrets.CONTAINER_REPO_TOKEN }} - user: ${{ github.actor }} - cmake_version: 3.17.0 - gcc_version: 9 - use_clang: false - CMAIZE_GITHUB_TOKEN: ${{ secrets.CMAIZE_GITHUB_TOKEN }} - branch_name: ${{ steps.branch-name.outputs.current_branch }} - - name: Push stable release image - run: | - docker pull ghcr.io/nwchemex-project/release_tensorwrapper:gcc-latest - docker tag ghcr.io/nwchemex-project/release_tensorwrapper:gcc-latest ghcr.io/nwchemex-project/release_tensorwrapper:gcc-stable - docker push ghcr.io/nwchemex-project/release_tensorwrapper:gcc-stable - - # Temporarily truning off clang build/test/release because of failed test. - # TODO: make all tests pass with clang - # - # build_test_release-clang: - # runs-on: ubuntu-latest - # needs: update-base-image - # steps: - # - name: Login to GitHub Container Registry - # uses: docker/login-action@v1 - # with: - # registry: ghcr.io - # username: ${{ github.actor }} - # password: ${{ secrets.CONTAINER_REPO_TOKEN }} - # - uses: actions/checkout@v3 - # - name: Get current branch name - # id: branch-name - # uses: tj-actions/branch-names@v7 - # - name: build test release in a container - # uses: ./.github/actions/container-build_test_release - # with: - # ninja_build: true - # test: true - # integration_test: false - # INSTALL: true - # base_tag: latest - # dep_repo_tag: clang-stable - # token: ${{ secrets.CONTAINER_REPO_TOKEN }} - # user: ${{ github.actor }} - # cmake_version: 3.17.0 - # clang_version: 11 - # use_clang: true - # CMAIZE_GITHUB_TOKEN: ${{ secrets.CMAIZE_GITHUB_TOKEN }} - # branch_name: ${{ steps.branch-name.outputs.current_branch }} - # - name: Push stable release image - # run: | - # docker pull ghcr.io/nwchemex-project/release_tensorwrapper:clang-latest - # docker tag ghcr.io/nwchemex-project/release_tensorwrapper:clang-latest ghcr.io/nwchemex-project/release_tensorwrapper:clang-stable - # docker push ghcr.io/nwchemex-project/release_tensorwrapper:clang-stable diff --git a/.github/workflows/build_test_release.yaml b/.github/workflows/build_test_release.yaml deleted file mode 100644 index f58e5c07..00000000 --- a/.github/workflows/build_test_release.yaml +++ /dev/null @@ -1,150 +0,0 @@ -# The building/testing/releasing process happens -# in a container created from the base image (container action). -# In the end two new release images -# ghcr.io/nwchemex-project/release_tensorwrapper:gcc(clang)-latest -# are generated. Whether these images are stable -# (do not break any downstream repos) or not is still -# to be tested. -# This workflow should run in the branch which opens a -# PR to dev (dev/master model to be developed). - -name: Build test release - -on: - pull_request: - branches: - - master - -jobs: - # TODO: obtain package version info - # general packages for all repos: from NWXCmake - # specific packages for a repo: from dependency_versions.txt in - # the repo - # - # A job to retrieve all package versions and output - ### - docker-file-changes: - runs-on: ubuntu-latest - outputs: - build_dockfile: ${{ steps.changes.outputs.bdfile }} - steps: - - uses: actions/checkout@v3 - - uses: dorny/paths-filter@v2 - id: changes - with: - filters: | - bdfile: - - '.github/Dockerfile/**' - - update-base-image: - needs: docker-file-changes - if: ${{ needs.docker-file-changes.outputs.build_dockfile == 'true' }} - uses: NWChemEx-Project/TensorWrapper/.github/workflows/build_base.yaml@master - secrets: inherit - - build_update_check: - runs-on: ubuntu-latest - needs: docker-file-changes - outputs: - bi_check: ${{ steps.building-image-update.outputs.tag }} - steps: - - name: Check if the building image has been updated - id: building-image-update - run: | - if [ ${{ needs.docker-file-changes.outputs.build_dockfile == 'true' }} ]; then - tag="latest" - else - tag="stable" - fi - echo "tag=$tag" >> $GITHUB_OUTPUT - - build_test_release-gcc: - runs-on: ubuntu-latest - needs: [update-base-image, build_update_check] - if: always() && (needs.update-base-image.result == 'success' || needs.update-base-image.result == 'skipped') - steps: - - name: Login to GitHub Container Registry - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.CONTAINER_REPO_TOKEN }} - - uses: actions/checkout@v3 - - name: Get current branch name - id: branch-name - uses: tj-actions/branch-names@v7 - - name: build test release in a container - uses: ./.github/actions/container-build_test_release - with: - ninja_build: true - test: true - integration_test: false - INSTALL: true - base_tag: ${{needs.build_update_check.outputs.bi_check}} - dep_repo_tag: gcc-stable - token: ${{ secrets.CONTAINER_REPO_TOKEN }} - user: ${{ github.actor }} - cmake_version: 3.17.0 - gcc_version: 9 - use_clang: false - CMAIZE_GITHUB_TOKEN: ${{ secrets.CMAIZE_GITHUB_TOKEN }} - branch_name: ${{ steps.branch-name.outputs.current_branch }} - - name: Check stable release image - id: image_exists - shell: /usr/bin/bash {0} - run: | - docker manifest inspect ghcr.io/nwchemex-project/release_tensorwrapper:gcc-stable > /dev/null - echo "conclusion=$?" >> "$GITHUB_OUTPUT" - - name: Push stable release image if not exist - if: ${{ steps.image_exists.outputs.conclusion != 0 }} - run: | - docker pull ghcr.io/nwchemex-project/release_tensorwrapper:gcc-latest - docker tag ghcr.io/nwchemex-project/release_tensorwrapper:gcc-latest ghcr.io/nwchemex-project/release_tensorwrapper:gcc-stable - docker push ghcr.io/nwchemex-project/release_tensorwrapper:gcc-stable - - # Temporarily truning off clang build/test/release because of failed test. - # TODO: make all tests pass with clang - # - # build_test_release-clang: - # runs-on: ubuntu-latest - # needs: [update-base-image, build_update_check] - # if: always() && (needs.update-base-image.result == 'success' || needs.update-base-image.result == 'skipped') - # steps: - # - name: Login to GitHub Container Registry - # uses: docker/login-action@v1 - # with: - # registry: ghcr.io - # username: ${{ github.actor }} - # password: ${{ secrets.CONTAINER_REPO_TOKEN }} - # - uses: actions/checkout@v3 - # - name: Get current branch name - # id: branch-name - # uses: tj-actions/branch-names@v7 - # - name: build test release in a container - # uses: ./.github/actions/container-build_test_release - # with: - # ninja_build: true - # test: true - # integration_test: false - # INSTALL: true - # base_tag: ${{needs.build_update_check.outputs.bi_check}} - # dep_repo_tag: clang-stable - # token: ${{ secrets.CONTAINER_REPO_TOKEN }} - # user: ${{ github.actor }} - # cmake_version: 3.17.0 - # clang_version: 11 - # use_clang: true - # CMAIZE_GITHUB_TOKEN: ${{ secrets.CMAIZE_GITHUB_TOKEN }} - # branch_name: ${{ steps.branch-name.outputs.current_branch }} - # - name: Check stable release image - # id: image_exists - # shell: /usr/bin/bash {0} - # run: | - # docker manifest inspect ghcr.io/nwchemex-project/release_tensorwrapper:clang-stable > /dev/null - # echo "conclusion=$?" >> "$GITHUB_OUTPUT" - # - name: Push stable release image if not exist - # if: ${{ steps.image_exists.outputs.conclusion != 0 }} - # run: | - # docker pull ghcr.io/nwchemex-project/release_tensorwrapper:clang-latest - # docker tag ghcr.io/nwchemex-project/release_tensorwrapper:clang-latest ghcr.io/nwchemex-project/release_tensorwrapper:clang-stable - # docker push ghcr.io/nwchemex-project/release_tensorwrapper:clang-stable