Skip to content

Commit

Permalink
Merge pull request #3906 from spyridon97/ci-external-examples-build
Browse files Browse the repository at this point in the history
CI Contract Build examples with external ADIOS
  • Loading branch information
spyridon97 committed Nov 20, 2023
2 parents 05c3200 + c1098b6 commit 515db03
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/everything.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Note the use of multiple checkout actions in most jobs. This has been
# implemented to allow the use of CI scripts at a different ref or sha than
# the source code they're evaluating. For push events (when a pull_request is
# merged) ther is no difference. However, for pull_request events this allows
# merged) there is no difference. However, for pull_request events this allows
# us test code at the head of a pull_request using the CI scripts from the
# prospectively merged pull_request, which will include any CI updates that
# may have made it to the target branch after the pull_request was started.
Expand Down Expand Up @@ -451,8 +451,9 @@ jobs:
strategy:
fail-fast: false
matrix:
code: [lammps, tau]
code: [examples, lammps, tau]
include:
- code: examples
- code: lammps
repo: pnorbert/lammps
ref: fix-deprecated-adios-init
Expand Down
12 changes: 12 additions & 0 deletions testing/contract/examples/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -x
set -e

# shellcheck disable=SC1091
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/setup.sh

# Fail if is not set
build_dir="${build_dir:?}"

cmake --build "${build_dir}" -j8
17 changes: 17 additions & 0 deletions testing/contract/examples/config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

set -x
set -e

# shellcheck disable=SC1091
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/setup.sh

# Fail if is not set
source_dir="${source_dir:?}"
build_dir="${build_dir:?}"
install_dir="${install_dir:?}"

mkdir -p "${build_dir}"
cd "${build_dir}"

cmake -DCMAKE_INSTALL_PREFIX="${install_dir}" "${source_dir}"
3 changes: 3 additions & 0 deletions testing/contract/examples/depends.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

exit 0
12 changes: 12 additions & 0 deletions testing/contract/examples/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -x
set -e

# shellcheck disable=SC1091
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/setup.sh

# Fail if is not set
build_dir="${build_dir:?}"

cmake --install "${build_dir}"
13 changes: 13 additions & 0 deletions testing/contract/examples/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

source_dir="/opt/adios2/source/examples"
build_dir=$(readlink -f "${PWD}")/build
install_dir=$(readlink -f "${PWD}")/install

export source_dir
export build_dir
export install_dir

echo "source_dir = \"${source_dir}\""
echo "build_dir = \"${build_dir}\""
echo "install_dir = \"${install_dir}\""
12 changes: 12 additions & 0 deletions testing/contract/examples/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -x
set -e

# shellcheck disable=SC1091
source "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"/setup.sh

# Fail if is not set
install_dir="${install_dir:?}"

"${install_dir}"/bin/adios2_hello_helloWorld

0 comments on commit 515db03

Please sign in to comment.