-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into deprecate_ipxetas
- Loading branch information
Showing
5 changed files
with
45 additions
and
101 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,51 +25,29 @@ jobs: | |
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
|
||
- name: checkout-ip | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ip | ||
|
||
- name: spack-build-and-test | ||
run: | | ||
sudo apt install libopenblas-serial-dev | ||
git clone -c feature.manyFiles=true https://github.com/spack/spack | ||
. spack/share/spack/setup-env.sh | ||
spack env create ip-env | ||
spack env activate ip-env | ||
cp $GITHUB_WORKSPACE/ip/spack/package.py $SPACK_ROOT/var/spack/repos/builtin/packages/ip/package.py | ||
spack develop --no-clone --path $GITHUB_WORKSPACE/ip ip@develop | ||
spack add ip@develop%gcc@11 ${{ matrix.variants }} target=x86_64 | ||
precision=$(echo ${{ matrix.variants }} | grep -oP " precision=\K[4d8]") | ||
if [ "$precision" == "d" ]; then spack add [email protected] ^g2c@develop +utils +build_v2_api ; fi | ||
spack external find cmake gmake | ||
spack external find --path /usr/lib/x86_64-linux-gnu/openblas-serial openblas | ||
spack config add "packages:lapack:buildable:false" | ||
spack concretize | ||
# Run installation and run CTest suite | ||
spack install --fail-fast --test root | ||
# Run 'spack load' and check that key build options were respected | ||
spack load ip | ||
if [[ "${{ matrix.variants }}" =~ "+shared" ]]; then suffix="so" ; else suffix="a"; fi | ||
libvar=IP_LIB${precision} | ||
ls ${!libvar} | grep -cE "/libip_${precision}\."$suffix'$' | ||
- name: "Install OpenBLAS" | ||
run: sudo apt install libopenblas-serial-dev | ||
|
||
- name: "Build Spack package" | ||
uses: NOAA-EMC/ci-test-spack-package@develop | ||
with: | ||
package-name: ip | ||
package-variants: ${{ matrix.variants }} ${{ matrix.variants == '+openmp +shared +pic precision=d' && 'grib-util@develop +tests ^g2c@develop +utils +build_v2_api' || '' }} | ||
custom-recipe: spack/package.py | ||
spack-compiler: gcc | ||
spack-externals: gmake cmake openblas | ||
repo-cache-key-suffix: ${{ matrix.os }}-${{ matrix.variants }}-1 | ||
|
||
# This job validates the Spack recipe by making sure each cmake build option is represented | ||
recipe-check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: checkout-ip | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ip | ||
|
||
- name: recipe-check | ||
run: | | ||
echo "If this jobs fails, look at the most recently output CMake option below and make sure that option appears in spack/package.py" | ||
for opt in $(grep -ioP '^option\(\K(?!(ENABLE_DOCS|TEST_TIME_LIMIT))[^ ]+' $GITHUB_WORKSPACE/ip/CMakeLists.txt) ; do | ||
echo "Checking for presence of '$opt' CMake option in package.py" | ||
grep -cP "define.+\b${opt}\b" $GITHUB_WORKSPACE/ip/spack/package.py | ||
done | ||
uses: NOAA-EMC/ci-check-spack-recipe@develop | ||
with: | ||
recipe-file: package/spack/package.py | ||
cmakelists-txt: package/CMakeLists.txt | ||
ignore-list: ENABLE_DOCS,TEST_TIME_LIMIT |
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