Skip to content

Commit

Permalink
Merge branch 'main' into 64-build-vtk-for-pychaste
Browse files Browse the repository at this point in the history
  • Loading branch information
kwabenantim committed May 7, 2024
2 parents 7392e6a + 0375a66 commit dd29a54
Show file tree
Hide file tree
Showing 38 changed files with 597 additions and 889 deletions.
19 changes: 19 additions & 0 deletions .github/actions/set-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: set-env
description: set ubuntu os version and modules base directory
outputs:
modules_dir:
description: "the modules base directory"
value: ${{ steps.set-vars.outputs.modules_dir }}
os_ver:
description: "the ubuntu os version"
value: ${{ steps.set-vars.outputs.os_ver }}
runs:
using: composite
steps:
- id: set-vars
run: |
source /etc/os-release
os_ver="$(echo ${ID}${VERSION_ID} | sed 's/\.//')"
echo "os_ver=${os_ver}" >> $GITHUB_OUTPUT
echo "modules_dir=$HOME/modules" >> $GITHUB_OUTPUT
shell: bash
28 changes: 18 additions & 10 deletions .github/actions/setup-boost/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,32 @@ inputs:
runs:
using: composite
steps:
- id: set-env
uses: ./.github/actions/set-env

- id: cache-boost
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ env.MODULES_DIR }}/opt/boost/${{ inputs.boost_ver }}
${{ env.MODULES_DIR }}/modulefiles/boost/${{ inputs.boost_ver }}
key: ${{ env.OS_VERSION }}-boost-${{ inputs.boost_ver }}-${{ hashFiles('scripts/install_boost.sh') }}
${{ steps.set-env.outputs.modules_dir }}/opt/boost/${{ inputs.boost_ver }}
${{ steps.set-env.outputs.modules_dir }}/modulefiles/boost/${{ inputs.boost_ver }}
key: |
${{ steps.set-env.outputs.os_ver }}-boost-${{ inputs.boost_ver }}-${{ hashFiles('scripts/install_boost.sh') }}
restore-keys: |
${{ env.OS_VERSION }}-boost-${{ inputs.boost_ver }}-
${{ steps.set-env.outputs.os_ver }}-boost-${{ inputs.boost_ver }}-
- name: install boost module
if: steps.cache-boost.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}
run: ./scripts/install_boost.sh --version=${{ inputs.boost_ver }} --modules-dir=${{ env.MODULES_DIR }}
run: |
./install_boost.sh \
--version=${{ inputs.boost_ver }} \
--modules-dir=${{ steps.set-env.outputs.modules_dir }}
working-directory: ${{ github.workspace }}/scripts
shell: bash

- name: test boost module
run: |
module use ${{ steps.set-env.outputs.modules_dir }}/modulefiles
module load boost/${{ inputs.boost_ver }}
module test boost/${{ inputs.boost_ver }}
shell: bash --login -e -o pipefail {0} # login to load /etc/profile.d/modules.sh
shell: bash --login -e -o pipefail {0} # login to source /etc/profile.d/modules.sh
27 changes: 8 additions & 19 deletions .github/actions/setup-defaults/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,15 @@ description: setup environment and dependencies
runs:
using: composite
steps:
- name: set environment variables
run: |
. /etc/os-release
os_version="$(echo ${ID}${VERSION_ID} | sed 's/\.//')"
echo "OS_VERSION=${os_version}" >> ${GITHUB_ENV}
echo "MODULES_DIR=${{ github.workspace }}/modules" >> ${GITHUB_ENV}
echo "CHASTE_TEST_OUTPUT=${{ github.workspace }}/testoutput" >> ${GITHUB_ENV}
shell: bash
- id: set-env
uses: ./.github/actions/set-env

- name: install dependencies
working-directory: ${{ github.workspace }}
run: sudo ./scripts/setup_${{ env.OS_VERSION }}.sh
shell: bash

- name: configure environment modules
run: |
mkdir -p ${{ env.MODULES_DIR }}/modulefiles
echo "module use ${{ env.MODULES_DIR }}/modulefiles" | sudo tee -a /etc/profile.d/modules.sh
- name: install os dependencies
run: ./scripts/setup_${{ steps.set-env.outputs.os_ver }}.sh
shell: bash

- name: test module command
run: module avail
shell: bash --login -e -o pipefail {0} # login to load /etc/profile.d/modules.sh
run: |
source /etc/profile.d/modules.sh
module avail
shell: bash
28 changes: 19 additions & 9 deletions .github/actions/setup-petsc_hdf5/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,34 @@ inputs:
runs:
using: composite
steps:
- id: set-env
uses: ./.github/actions/set-env

- id: cache-petsc_hdf5
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ env.MODULES_DIR }}/opt/petsc_hdf5/${{ inputs.petsc_ver }}_${{ inputs.hdf5_ver }}
${{ env.MODULES_DIR }}/modulefiles/petsc_hdf5/${{ inputs.petsc_ver }}_${{ inputs.hdf5_ver }}/${{ inputs.petsc_arch }}
key: ${{ env.OS_VERSION }}-petsc_hdf5-${{ inputs.petsc_ver }}-${{ inputs.hdf5_ver }}-${{ inputs.petsc_arch }}-${{ hashFiles('scripts/install_petsc_hdf5.sh') }}
${{ steps.set-env.outputs.modules_dir }}/opt/petsc_hdf5/${{ inputs.petsc_ver }}_${{ inputs.hdf5_ver }}
${{ steps.set-env.outputs.modules_dir }}/modulefiles/petsc_hdf5/${{ inputs.petsc_ver }}_${{ inputs.hdf5_ver }}/${{ inputs.petsc_arch }}
key: |
${{ steps.set-env.outputs.os_ver }}-petsc_hdf5-${{ inputs.petsc_ver }}-${{ inputs.hdf5_ver }}-${{ inputs.petsc_arch }}-${{ hashFiles('scripts/install_petsc_hdf5.sh') }}
restore-keys: |
${{ env.OS_VERSION }}-petsc_hdf5-${{ inputs.petsc_ver }}-${{ inputs.hdf5_ver }}-${{ inputs.petsc_arch }}-
${{ steps.set-env.outputs.os_ver }}-petsc_hdf5-${{ inputs.petsc_ver }}-${{ inputs.hdf5_ver }}-${{ inputs.petsc_arch }}-
- name: build and install petsc_hdf5 module
if: steps.cache-petsc_hdf5.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}
run: ./scripts/install_petsc_hdf5.sh --petsc-version=${{ inputs.petsc_ver }} --hdf5-version=${{ inputs.hdf5_ver }} --petsc-arch=${{ inputs.petsc_arch }} --modules-dir=${{ env.MODULES_DIR }}
run: |
./install_petsc_hdf5.sh \
--petsc-version=${{ inputs.petsc_ver }} \
--hdf5-version=${{ inputs.hdf5_ver }} \
--petsc-arch=${{ inputs.petsc_arch }} \
--modules-dir=${{ steps.set-env.outputs.modules_dir }}
working-directory: ${{ github.workspace }}/scripts
shell: bash

- name: test petsc_hdf5 module
run: |
module use ${{ steps.set-env.outputs.modules_dir }}/modulefiles
module load petsc_hdf5/${{ inputs.petsc_ver }}_${{ inputs.hdf5_ver }}/${{ inputs.petsc_arch }}
module test petsc_hdf5/${{ inputs.petsc_ver }}_${{ inputs.hdf5_ver }}/${{ inputs.petsc_arch }}
shell: bash --login -e -o pipefail {0} # login to load /etc/profile.d/modules.sh
shell: bash --login -e -o pipefail {0} # login to source /etc/profile.d/modules.sh
28 changes: 18 additions & 10 deletions .github/actions/setup-sundials/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,32 @@ inputs:
runs:
using: composite
steps:
- id: set-env
uses: ./.github/actions/set-env

- id: cache-sundials
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ env.MODULES_DIR }}/opt/sundials/${{ inputs.sundials_ver }}
${{ env.MODULES_DIR }}/modulefiles/sundials/${{ inputs.sundials_ver }}
key: ${{ env.OS_VERSION }}-sundials-${{ inputs.sundials_ver }}-${{ hashFiles('scripts/install_sundials.sh') }}
${{ steps.set-env.outputs.modules_dir }}/opt/sundials/${{ inputs.sundials_ver }}
${{ steps.set-env.outputs.modules_dir }}/modulefiles/sundials/${{ inputs.sundials_ver }}
key: |
${{ steps.set-env.outputs.os_ver }}-sundials-${{ inputs.sundials_ver }}-${{ hashFiles('scripts/install_sundials.sh') }}
restore-keys: |
${{ env.OS_VERSION }}-sundials-${{ inputs.sundials_ver }}-
${{ steps.set-env.outputs.os_ver }}-sundials-${{ inputs.sundials_ver }}-
- name: build and install sundials module
if: steps.cache-sundials.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}
run: ./scripts/install_sundials.sh --version=${{ inputs.sundials_ver }} --modules-dir=${{ env.MODULES_DIR }}
run: |
./install_sundials.sh \
--version=${{ inputs.sundials_ver }} \
--modules-dir=${{ steps.set-env.outputs.modules_dir }}
working-directory: ${{ github.workspace }}/scripts
shell: bash

- name: test sundials module
run: |
module use ${{ steps.set-env.outputs.modules_dir }}/modulefiles
module load sundials/${{ inputs.sundials_ver }}
module test sundials/${{ inputs.sundials_ver }}
shell: bash --login -e -o pipefail {0} # login to load /etc/profile.d/modules.sh
shell: bash --login -e -o pipefail {0} # login to source /etc/profile.d/modules.sh
30 changes: 19 additions & 11 deletions .github/actions/setup-vtk/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,32 @@ inputs:
runs:
using: composite
steps:
- id: set-env
uses: ./.github/actions/set-env

- id: cache-vtk
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ env.MODULES_DIR }}/opt/vtk/${{ inputs.vtk_ver }}
${{ env.MODULES_DIR }}/modulefiles/vtk/${{ inputs.vtk_ver }}
key: ${{ env.OS_VERSION }}-vtk-${{ inputs.vtk_ver }}-${{ hashFiles('scripts/install_vtk.sh') }}
${{ steps.set-env.outputs.modules_dir }}/opt/vtk/${{ inputs.vtk_ver }}
${{ steps.set-env.outputs.modules_dir }}/modulefiles/vtk/${{ inputs.vtk_ver }}
key: |
${{ steps.set-env.outputs.os_ver }}-vtk-${{ inputs.vtk_ver }}-${{ hashFiles('scripts/install_vtk.sh') }}
restore-keys: |
${{ env.OS_VERSION }}-vtk-${{ inputs.vtk_ver }}-
- name: Build and install vtk module
${{ steps.set-env.outputs.os_ver }}-vtk-${{ inputs.vtk_ver }}-
- name: build and install vtk module
if: steps.cache-vtk.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}
run: ./scripts/install_vtk.sh --version=${{ inputs.vtk_ver }} --modules-dir=${{ env.MODULES_DIR }}
run: |
./install_vtk.sh \
--version=${{ inputs.vtk_ver }} \
--modules-dir=${{ steps.set-env.outputs.modules_dir }}
working-directory: ${{ github.workspace }}/scripts
shell: bash

- name: test vtk module
run: |
module use ${{ steps.set-env.outputs.modules_dir }}/modulefiles
module load vtk/${{ inputs.vtk_ver }}
module test vtk/${{ inputs.vtk_ver }}
shell: bash --login -e -o pipefail {0} # login to load /etc/profile.d/modules.sh
shell: bash --login -e -o pipefail {0} # login to source /etc/profile.d/modules.sh
24 changes: 16 additions & 8 deletions .github/actions/setup-xercesc/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,32 @@ inputs:
runs:
using: composite
steps:
- id: set-env
uses: ./.github/actions/set-env

- id: cache-xercesc
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ env.MODULES_DIR }}/opt/xercesc/${{ inputs.xercesc_ver }}
${{ env.MODULES_DIR }}/modulefiles/xercesc/${{ inputs.xercesc_ver }}
key: ${{ env.OS_VERSION }}-xercesc-${{ inputs.xercesc_ver }}-${{ hashFiles('scripts/install_xercesc.sh') }}
${{ steps.set-env.outputs.modules_dir }}/opt/xercesc/${{ inputs.xercesc_ver }}
${{ steps.set-env.outputs.modules_dir }}/modulefiles/xercesc/${{ inputs.xercesc_ver }}
key: |
${{ steps.set-env.outputs.os_ver }}-xercesc-${{ inputs.xercesc_ver }}-${{ hashFiles('scripts/install_xercesc.sh') }}
restore-keys: |
${{ env.OS_VERSION }}-xercesc-${{ inputs.xercesc_ver }}-
${{ steps.set-env.outputs.os_ver }}-xercesc-${{ inputs.xercesc_ver }}-
- name: build and install xercesc module
if: steps.cache-xercesc.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}
run: ./scripts/install_xercesc.sh --version=${{ inputs.xercesc_ver }} --modules-dir=${{ env.MODULES_DIR }}
run: |
./install_xercesc.sh \
--version=${{ inputs.xercesc_ver }} \
--modules-dir=${{ steps.set-env.outputs.modules_dir }}
working-directory: ${{ github.workspace }}/scripts
shell: bash

- name: test xercesc module
run: |
module use ${{ steps.set-env.outputs.modules_dir }}/modulefiles
module load xercesc/${{ inputs.xercesc_ver }}
module test xercesc/${{ inputs.xercesc_ver }}
shell: bash --login -e -o pipefail {0} # login to load /etc/profile.d/modules.sh
shell: bash --login -e -o pipefail {0} # login to source /etc/profile.d/modules.sh
28 changes: 18 additions & 10 deletions .github/actions/setup-xsd/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,32 @@ inputs:
runs:
using: composite
steps:
- id: set-env
uses: ./.github/actions/set-env

- id: cache-xsd
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ env.MODULES_DIR }}/opt/xsd/${{ inputs.xsd_ver }}
${{ env.MODULES_DIR }}/modulefiles/xsd/${{ inputs.xsd_ver }}
key: ${{ env.OS_VERSION }}-xsd-${{ inputs.xsd_ver }}-${{ hashFiles('scripts/install_xsd.sh') }}
${{ steps.set-env.outputs.modules_dir }}/opt/xsd/${{ inputs.xsd_ver }}
${{ steps.set-env.outputs.modules_dir }}/modulefiles/xsd/${{ inputs.xsd_ver }}
key: |
${{ steps.set-env.outputs.os_ver }}-xsd-${{ inputs.xsd_ver }}-${{ hashFiles('scripts/install_xsd.sh') }}
restore-keys: |
${{ env.OS_VERSION }}-xsd-${{ inputs.xsd_ver }}-
${{ steps.set-env.outputs.os_ver }}-xsd-${{ inputs.xsd_ver }}-
- name: install xsd module
if: steps.cache-xsd.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}
run: ./scripts/install_xsd.sh --version=${{ inputs.xsd_ver }} --modules-dir=${{ env.MODULES_DIR }}
run: |
./install_xsd.sh \
--version=${{ inputs.xsd_ver }} \
--modules-dir=${{ steps.set-env.outputs.modules_dir }}
working-directory: ${{ github.workspace }}/scripts
shell: bash

- name: test xsd module
run: |
module use ${{ steps.set-env.outputs.modules_dir }}/modulefiles
module load xsd/${{ inputs.xsd_ver }}
module test xsd/${{ inputs.xsd_ver }}
shell: bash --login -e -o pipefail {0} # login to load /etc/profile.d/modules.sh
shell: bash --login -e -o pipefail {0} # login to source /etc/profile.d/modules.sh
20 changes: 11 additions & 9 deletions .github/workflows/boost.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,31 @@ on:
workflow_dispatch:
inputs:
boost_ver:
description: 'Boost version'
description: "Boost version"
required: true
type: string
default: '1.74.0'
default: "1.83.0"

os:
description: 'OS'
description: "OS"
required: true
type: choice
options:
- 'ubuntu-20.04'
- 'ubuntu-22.04'
default: 'ubuntu-22.04'
- "ubuntu:22.04"
- "ubuntu:24.04"
default: "ubuntu:24.04"

jobs:
setup:
name: build and cache boost

runs-on: ${{ github.event.inputs.os }}

runs-on: ubuntu-latest
container:
image: ${{ github.event.inputs.os }}

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: setup os
uses: ./.github/actions/setup-defaults
Expand Down
Loading

0 comments on commit dd29a54

Please sign in to comment.