Skip to content

Build test release

Build test release #1

# 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_pluginplay: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/PluginPlay/.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: Check stable release image
id: image_exists
shell: /usr/bin/bash {0}
run: |
docker manifest inspect ghcr.io/nwchemex-project/release_pluginplay: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_pluginplay:gcc-latest
docker tag ghcr.io/nwchemex-project/release_pluginplay:gcc-latest ghcr.io/nwchemex-project/release_pluginplay:gcc-stable
docker push ghcr.io/nwchemex-project/release_pluginplay:gcc-stable
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: Check stable release image
id: image_exists
shell: /usr/bin/bash {0}
run: |
docker manifest inspect ghcr.io/nwchemex-project/release_pluginplay: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_pluginplay:clang-latest
docker tag ghcr.io/nwchemex-project/release_pluginplay:clang-latest ghcr.io/nwchemex-project/release_pluginplay:clang-stable
docker push ghcr.io/nwchemex-project/release_pluginplay:clang-stable