-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from NWChemEx-Project/base_image_build
Build the base image for building/testing step-by-step
- Loading branch information
Showing
14 changed files
with
738 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# 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 CEREAL_VERSION | ||
|
||
# Install cereal | ||
RUN cd /tmp \ | ||
&& git clone https://github.com/USCiLab/cereal.git \ | ||
&& cd cereal \ | ||
&& git checkout tags/v${CEREAL_VERSION} \ | ||
&& export BUILD_TARGET=cereal \ | ||
&& export FIND_TARGET=cereal \ | ||
&& cmake -DJUST_INSTALL_CEREAL=ON -DCMAKE_INSTALL_PREFIX=/install -Bbuild . \ | ||
&& cmake --build build \ | ||
&& cmake --build build --target install \ | ||
&& rm -rf /tmp/cereal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# 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 | ||
|
||
# Install mpi | ||
RUN apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
openmpi-bin \ | ||
libopenmpi-dev | ||
ARG MADNESS_VERSION | ||
|
||
# Install MADNESS | ||
RUN cd /tmp \ | ||
&& git clone https://github.com/m-a-d-n-e-s-s/madness.git \ | ||
&& cd madness \ | ||
&& git checkout ${MADNESS_VERSION} \ | ||
&& export BUILD_TARGET=MADworld \ | ||
&& export FIND_TARGET=MADworld \ | ||
&& cmake -DENABLE_UNITTESTS=OFF -DMADNESS_BUILD_MADWORLD_ONLY=ON -DMADNESS_ENABLE_CEREAL=ON -DENABLE_MKL=OFF -DENABLE_ACML=OFF -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=/install -Bbuild . \ | ||
&& cmake --build build \ | ||
&& cmake --build build --target install \ | ||
&& rm -rf /tmp/madness |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# 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 SPDLOG_VERSION | ||
|
||
# Install spdlog | ||
RUN cd /tmp \ | ||
&& git clone https://github.com/gabime/spdlog.git \ | ||
&& cd spdlog \ | ||
&& git checkout ${SPDLOG_VERSION} \ | ||
&& export BUILD_TARGET=spdlog \ | ||
&& export FIND_TARGET=spdlog::spdlog \ | ||
&& cmake -DSPDLOG_INSTALL=ON -DCMAKE_INSTALL_PREFIX=/install -DCMAKE_CXX_FLAGS="-fPIC" -Bbuild . \ | ||
&& cmake --build build \ | ||
&& cmake --build build --target install \ | ||
&& rm -rf /tmp/spdlog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# 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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# 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 ParallelZone | ||
|
||
description: container action from the base image to build ParallelZone | ||
|
||
inputs: | ||
base_tag: | ||
description: 'tag of the base image' | ||
required: false | ||
default: 'stable' | ||
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 |
45 changes: 45 additions & 0 deletions
45
.github/actions/container-build_test_release/docker-action/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# 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 base_tag | ||
|
||
FROM ghcr.io/nwchemex-project/base_parallelzone:$base_tag | ||
|
||
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 | ||
|
||
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 | ||
|
||
ENTRYPOINT ["/build_test.sh"] |
Oops, something went wrong.