generated from DARMA-tasking/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#97: fix missing variable in docker base image
- Loading branch information
1 parent
efb33ce
commit 0cf007b
Showing
4 changed files
with
79 additions
and
3 deletions.
There are no files selected for viewing
76 changes: 76 additions & 0 deletions
76
.github/workflows/pushbasedockerimage_ubuntu_any-py_3.all.yml
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,76 @@ | ||
name: Build & push base Docker image (add ubuntu_*-py.all images) | ||
|
||
on: | ||
push: | ||
branches: | ||
- 97-add-more-environments-to-test-in-ci | ||
|
||
jobs: | ||
push_to_registry: | ||
name: Build & Push | ||
runs-on: ubuntu-latest | ||
env: | ||
DOCKER_REPOSITORY: lifflander1/vt | ||
strategy: | ||
matrix: | ||
image: | ||
- ubuntu_22.04-gcc_11-vtk_9.2.2-py_3.all | ||
- ubuntu_22.04-clang_11-vtk_9.2.2-py_3.all | ||
- ubuntu_22.04-gcc_12-vtk_9.3.0-py_3.all | ||
- ubuntu_24.04-gcc_13-vtk_9.3.1-py_3.all | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Extract build configuration | ||
run: | | ||
IFS='_-' read -r -a CONFIG <<< "${{ matrix.image }}" | ||
echo "BASE_IMAGE=${CONFIG[0]}:${CONFIG[1]}" >> $GITHUB_ENV | ||
echo "CC=${CONFIG[2]}-${CONFIG[3]}" >> $GITHUB_ENV | ||
if [[ "${CONFIG[2]}" == "gcc" ]]; then | ||
echo "CXX=g++-${CONFIG[3]}" >> $GITHUB_ENV | ||
echo "GCOV=gcov-${CONFIG[3]}" >> $GITHUB_ENV | ||
elif [[ "${CONFIG[2]}" == "clang" ]]; then | ||
echo "CXX=clang++-${CONFIG[3]}" >> $GITHUB_ENV | ||
echo "GCOV=gcov" >> $GITHUB_ENV | ||
else | ||
exit 1 | ||
fi | ||
echo "VTK_VERSION=${CONFIG[5]}" >> $GITHUB_ENV | ||
if [[ "${CONFIG[7]}" == "3.all" ]]; then | ||
echo "PYTHON_VERSIONS=3.8,3.9,3.10,3.11,3.12" >> $GITHUB_ENV | ||
else | ||
echo "PYTHON_VERSIONS=${CONFIG[7]}" >> $GITHUB_ENV | ||
fi | ||
echo "DOCKER_TAG=${{ matrix.image }}" >> $GITHUB_ENV | ||
- name: Build configuration | ||
run: | | ||
echo "Base image: $BASE_IMAGE" | ||
echo "C Compiler: $CC" | ||
echo "CXX Compiler: $CXX" | ||
echo "GCOV: $GCOV" | ||
echo "VTK: $VTK_VERSION" | ||
echo "Python: $PYTHON_VERSIONS" | ||
echo "Docker tag: $DOCKER_TAG" | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Build and push to Docker Hub | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
build-args: | | ||
BASE_IMAGE=${{ env.BASE_IMAGE }} | ||
CC=${{ env.CC }} | ||
CXX=${{ env.CXX }} | ||
GCOV=${{ env.GCOV }} | ||
VTK_VERSION=${{ env.VTK_VERSION }} | ||
PYTHON_VERSIONS=${{ env.PYTHON_VERSIONS }} | ||
file: ci/docker/make-base-ubuntu.dockerfile | ||
push: true | ||
tags: "${{ env.DOCKER_REPOSITORY }}:${{ env.DOCKER_TAG }}" |
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
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
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