Skip to content

Commit 47eb8cb

Browse files
README.md: Add Spack note (#132)
* README.md: Add Spack note * Update Linux.yml * package.py: remove '.builder' * CI: action & gcc version updates * developer.yml: disable docs * Update MacOS.yml * Update Spack.yml * Update Spack.yml * Update Spack.yml * Update Spack.yml * Update Spack.yml: remove grib_util * Update Spack.yml
1 parent 4510c70 commit 47eb8cb

7 files changed

Lines changed: 25 additions & 24 deletions

File tree

.github/workflows/Intel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
echo "source /opt/intel/oneapi/setvars.sh" >> ~/.bash_profile
4343
4444
- name: checkout
45-
uses: actions/checkout@v2
45+
uses: actions/checkout@v4
4646
with:
4747
path: sp
4848

.github/workflows/Linux.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
Linux:
1717
runs-on: ubuntu-latest
1818
env:
19-
FC: gfortran-10
20-
CC: gcc-10
19+
FC: gfortran
20+
CC: gcc
2121
strategy:
2222
matrix:
2323
openmp: [ON, OFF]
@@ -27,7 +27,7 @@ jobs:
2727
steps:
2828

2929
- name: checkout-sp
30-
uses: actions/checkout@v2
30+
uses: actions/checkout@v4
3131
with:
3232
path: sp
3333

.github/workflows/MacOS.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
MacOS:
1717
runs-on: macos-latest
1818
env:
19-
FC: gfortran-11
19+
FC: gfortran-12
2020
strategy:
2121
matrix:
2222
openmp: [ON, OFF]
@@ -25,7 +25,7 @@ jobs:
2525
steps:
2626

2727
- name: checkout-sp
28-
uses: actions/checkout@v2
28+
uses: actions/checkout@v4
2929
with:
3030
path: sp
3131

.github/workflows/Spack.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,33 +36,32 @@ jobs:
3636
- name: spack-build-and-test
3737
run: |
3838
git clone -c feature.manyFiles=true https://github.com/spack/spack
39+
cd spack
40+
git checkout a9c879d53e758f67cdbf4cec919425cb2a3a1082
41+
cd ..
3942
. spack/share/spack/setup-env.sh
4043
spack env create sp-env
4144
spack env activate sp-env
4245
cp $GITHUB_WORKSPACE/sp/spack/package.py $SPACK_ROOT/var/spack/repos/builtin/packages/sp/package.py
4346
spack develop --no-clone --path $GITHUB_WORKSPACE/sp sp@develop
44-
spack add sp@develop%gcc@11 ${{ matrix.openmp }} ${{ matrix.variants }}
45-
spack add ip@develop ${{ matrix.variants }} target=x86_64
47+
spack add sp@develop%gcc ${{ matrix.openmp }} ${{ matrix.variants }}
48+
spack add ip@4.4.0 ${{ matrix.variants }} target=x86_64
4649
precision=$(echo ${{ matrix.variants }} | grep -oP " precision=\K[4d8]")
47-
if [ "$precision" == "d" ]; then spack add grib-util@develop ; fi
4850
spack external find cmake gmake
4951
spack concretize
5052
# Run installation and run CTest suite
5153
spack install --verbose --fail-fast --test root
5254
# Print test results
5355
cat $(spack location -i sp)/.spack/install-time-test-log.txt
5456
cat $(spack location -i ip)/.spack/install-time-test-log.txt
55-
if [ "$precision" == "d" ]; then
56-
cat $(spack location -i grib-util)/.spack/install-time-test-log.txt
57-
fi
5857
# Run 'spack load' and check that key build options were respected
5958
spack load sp
6059
if [[ "${{ matrix.variants }}" =~ "+shared" ]]; then suffix="so" ; else suffix="a"; fi
6160
libvar=SP_LIB${precision}
6261
ls ${!libvar} | grep -cE "/libsp_${precision}\."$suffix'$'
6362
6463
- name: Upload test results
65-
uses: actions/upload-artifact@v3
64+
uses: actions/upload-artifact@v4
6665
if: ${{ failure() }}
6766
with:
6867
name: spackci-ctest-output-${{ matrix.os }}-${{ matrix.openmp }}-${{ matrix.variants }}

.github/workflows/developer.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ jobs:
1717
developer:
1818
runs-on: ubuntu-latest
1919
env:
20-
FC: gfortran-9
21-
CC: gcc-9
20+
FC: gfortran
21+
CC: gcc
2222

2323
steps:
2424

@@ -28,7 +28,7 @@ jobs:
2828
python3 -m pip install gcovr
2929
3030
- name: checkout-sp
31-
uses: actions/checkout@v2
31+
uses: actions/checkout@v4
3232
with:
3333
path: sp
3434

@@ -38,14 +38,14 @@ jobs:
3838
mkdir build
3939
cd build
4040
doxygen --version
41-
cmake -DBUILD_8=ON -DOPENMP=ON -DCMAKE_PREFIX_PATH="~/" -DENABLE_DOCS=ON -DCMAKE_Fortran_FLAGS="-g -fprofile-arcs -ftest-coverage -O0 -fsanitize=address" -DCMAKE_BUILD_TYPE=Debug -DENABLE_SHARED_LIBS=ON ..
41+
cmake -DBUILD_8=ON -DOPENMP=ON -DCMAKE_PREFIX_PATH="~/" -DENABLE_DOCS=OFF -DCMAKE_Fortran_FLAGS="-g -fprofile-arcs -ftest-coverage -O0 -fsanitize=address" -DCMAKE_BUILD_TYPE=Debug -DENABLE_SHARED_LIBS=ON ..
4242
make -j2 VERBOSE=1
4343
44-
- uses: actions/upload-artifact@v2
45-
with:
46-
name: docs
47-
path: |
48-
sp/build/docs/html
44+
# - uses: actions/upload-artifact@v4
45+
# with:
46+
# name: docs
47+
# path: |
48+
# sp/build/docs/html
4949

5050
- name: test-sp
5151
run: |
@@ -57,7 +57,7 @@ jobs:
5757
cd sp/build
5858
gcovr --root .. -v --html-details --exclude ../tests --exclude CMakeFiles --print-summary -o test-coverage.html &> /dev/null
5959
60-
- uses: actions/upload-artifact@v2
60+
- uses: actions/upload-artifact@v4
6161
with:
6262
name: sp-test-coverage
6363
path: |

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ make -j2
3535
make install
3636
```
3737

38+
NCEPLIBS-sp is also available through [Spack](https://spack.io) as '[sp](https://github.com/spack/spack/tree/develop/var/spack/repos/builtin/packages/sp)'.
39+
3840
## Disclaimer
3941

4042
The United States Department of Commerce (DOC) GitHub project code is

spack/package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@ def cmake_args(self):
6464
return args
6565

6666
def check(self):
67-
with working_dir(self.builder.build_directory):
67+
with working_dir(self.build_directory):
6868
make("test")

0 commit comments

Comments
 (0)