Skip to content

Commit

Permalink
Update workflows to latest versions and merges from hdf5
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF committed Jun 4, 2024
1 parent befee1b commit 3c4dc4f
Show file tree
Hide file tree
Showing 10 changed files with 91 additions and 68 deletions.
37 changes: 15 additions & 22 deletions .github/workflows/aocc-auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,23 @@ jobs:
sudo apt install -y doxygen openssl libtool libtool-bin build-essential
sudo apt install -y libncurses-dev libquadmath0 libstdc++6 libxml2
- name: Install AOCC 4.1.0
- name: Install AOCC 4.2.0
shell: bash
run: |
wget https://download.amd.com/developer/eula/aocc/aocc-4-1/aocc-compiler-4.1.0.tar
tar -xvf aocc-compiler-4.1.0.tar
cd aocc-compiler-4.1.0
wget https://download.amd.com/developer/eula/aocc/aocc-4-2/aocc-compiler-4.2.0.tar
tar -xvf aocc-compiler-4.2.0.tar
cd aocc-compiler-4.2.0
bash install.sh
source /home/runner/work/hdf4/hdf4/setenv_AOCC.sh
which clang
which flang
clang -v
echo "CC=/home/runner/work/hdf4/hdf4/aocc-compiler-4.1.0/bin/clang" >> $GITHUB_ENV
echo "FC=/home/runner/work/hdf4/hdf4/aocc-compiler-4.1.0/bin/flang" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=/home/runner/work/hdf4/hdf4/aocc-compiler-4.1.0/lib:/usr/local/lib" >> $GITHUB_ENV
echo "LD_RUN_PATH=/home/runner/work/hdf4/hdf4/aocc-compiler-4.1.0/lib:/usr/local/lib" >> $GITHUB_ENV
echo "DESTDIR=/tmp" >> $GITHUB_ENV
- name: Autotools Configure
shell: bash
run: |
source /home/runner/work/hdf4/hdf4/setenv_AOCC.sh
export LD_LIBRARY_PATH=/home/runner/work/hdf4/hdf4/aocc-compiler-4.2.0/lib:/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/lib:/usr/local/lib
export LD_RUN_PATH=/home/runner/work/hdf4/hdf4/aocc-compiler-4.2.0/lib:/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/lib:/usr/local/lib
export PATH=/usr/local/bin:$PATH
sh ./autogen.sh
mkdir "${{ runner.workspace }}/build"
Expand All @@ -62,7 +58,7 @@ jobs:
--enable-netcdf \
--enable-shared \
--disable-fortran \
LDFLAGS="-L/home/runner/work/hdf4/hdf4/aocc-compiler-4.1.0/lib"
LDFLAGS="-L/home/runner/work/hdf4/hdf4/aocc-compiler-4.2.0/lib"
- name: Autotools Build
shell: bash
Expand Down Expand Up @@ -101,26 +97,23 @@ jobs:
sudo apt update
sudo apt install -y libaec-dev zlib1g-dev automake autoconf libcurl4-openssl-dev libjpeg-dev wget curl bzip2 m4 flex bison cmake libzip-dev doxygen openssl libtool libtool-bin build-essential libncurses-dev libquadmath0 libstdc++6 libxml2
- name: Install AOCC 4.1.0
- name: Install AOCC 4.2.0
shell: bash
run: |
wget https://download.amd.com/developer/eula/aocc/aocc-4-1/aocc-compiler-4.1.0.tar
tar -xvf aocc-compiler-4.1.0.tar
cd aocc-compiler-4.1.0
wget https://download.amd.com/developer/eula/aocc/aocc-4-2/aocc-compiler-4.2.0.tar
tar -xvf aocc-compiler-4.2.0.tar
cd aocc-compiler-4.2.0
bash install.sh
source /home/runner/work/hdf4/hdf4/setenv_AOCC.sh
which clang
which flang
clang -v
echo "CC=/home/runner/work/hdf4/hdf4/aocc-compiler-4.1.0/bin/clang" >> $GITHUB_ENV
echo "FC=/home/runner/work/hdf4/hdf4/aocc-compiler-4.1.0/bin/flang" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=/home/runner/work/hdf4/hdf4/aocc-compiler-4.1.0/lib:/usr/local/lib" >> $GITHUB_ENV
echo "LD_RUN_PATH=/home/runner/work/hdf4/hdf4/aocc-compiler-4.1.0/lib:/usr/local/lib" >> $GITHUB_ENV
echo "DESTDIR=/tmp" >> $GITHUB_ENV
- name: Autotools Configure
shell: bash
run: |
source /home/runner/work/hdf4/hdf4/setenv_AOCC.sh
export LD_LIBRARY_PATH=/home/runner/work/hdf4/hdf4/aocc-compiler-4.2.0/lib:/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/lib:/usr/local/lib
export LD_RUN_PATH=/home/runner/work/hdf4/hdf4/aocc-compiler-4.2.0/lib:/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/lib:/usr/local/lib
export PATH=/usr/local/bin:$PATH
sh ./autogen.sh
mkdir "${{ runner.workspace }}/build"
Expand All @@ -130,7 +123,7 @@ jobs:
--enable-netcdf \
--disable-shared \
--enable-fortran \
LDFLAGS="-L/home/runner/work/hdf4/hdf4/aocc-compiler-4.1.0/lib"
LDFLAGS="-L/home/runner/work/hdf4/hdf4/aocc-compiler-4.2.0/lib"
- name: Autotools Build
shell: bash
Expand Down
20 changes: 6 additions & 14 deletions .github/workflows/aocc-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,23 @@ jobs:
sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
sudo apt install -y libaec-dev zlib1g-dev wget curl bzip2 flex bison cmake libzip-dev openssl build-essential
- name: Install AOCC 4.1.0
- name: Install AOCC 4.2.0
shell: bash
run: |
wget https://download.amd.com/developer/eula/aocc/aocc-4-1/aocc-compiler-4.1.0.tar
tar -xvf aocc-compiler-4.1.0.tar
cd aocc-compiler-4.1.0
wget https://download.amd.com/developer/eula/aocc/aocc-4-2/aocc-compiler-4.2.0.tar
tar -xvf aocc-compiler-4.2.0.tar
cd aocc-compiler-4.2.0
bash install.sh
source /home/runner/work/hdf4/hdf4/setenv_AOCC.sh
which clang
which flang
clang -v
echo "CC=/home/runner/work/hdf4/hdf4/aocc-compiler-4.1.0/bin/clang" >> $GITHUB_ENV
echo "FC=/home/runner/work/hdf4/hdf4/aocc-compiler-4.1.0/bin/flang" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=/home/runner/work/hdf4/hdf4/aocc-compiler-4.1.0/lib:/usr/local/lib" >> $GITHUB_ENV
echo "LD_RUN_PATH=/home/runner/work/hdf4/hdf4/aocc-compiler-4.1.0/lib:/usr/local/lib" >> $GITHUB_ENV
echo "DESTDIR=/tmp" >> $GITHUB_ENV
- name: CMake Configure
shell: bash
run: |
source /home/runner/work/hdf4/hdf4/setenv_AOCC.sh
export LD_LIBRARY_PATH=/home/runner/work/hdf5/hdf5/aocc-compiler-4.2.0/lib:/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/lib:/usr/local/lib
export LD_RUN_PATH=/home/runner/work/hdf5/hdf5/aocc-compiler-4.2.0/lib:/home/runner/work/hdf5/hdf5/openmpi-4.1.6-install/lib:/usr/local/lib
export PATH=/usr/local/bin:$PATH
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
Expand All @@ -65,15 +61,11 @@ jobs:
- name: CMake Build
shell: bash
run: |
source /home/runner/work/hdf4/hdf4/setenv_AOCC.sh
export PATH=/usr/local/bin:$PATH
cmake --build . --parallel 3 --config ${{ inputs.build_mode }}
working-directory: ${{ runner.workspace }}/build

- name: CMake Run Tests
shell: bash
run: |
source /home/runner/work/hdf4/hdf4/setenv_AOCC.sh
export PATH=/usr/local/bin:$PATH
ctest . --parallel 2 -C ${{ inputs.build_mode }} -V
working-directory: ${{ runner.workspace }}/build
2 changes: 1 addition & 1 deletion .github/workflows/cmake-bintest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ jobs:
- name: Get published binary (MacOS)
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: tgz-osx12-${{ inputs.build_mode }}-binary
name: tgz-osx-${{ inputs.build_mode }}-binary
path: ${{ github.workspace }}

- name: Uncompress hdf4 binary (MacOS)
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/cmake-ctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ jobs:
cp ${{ runner.workspace }}/hdf4/build/${{ inputs.preset_name }}-Clang/README.txt ${{ runner.workspace }}/build/hdf4
cp ${{ runner.workspace }}/hdf4/build/${{ inputs.preset_name }}-Clang/*.tar.gz ${{ runner.workspace }}/build/hdf4
cd "${{ runner.workspace }}/build"
tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-osx12.tar.gz hdf4
tar -zcvf ${{ steps.set-file-base.outputs.FILE_BASE }}-osx.tar.gz hdf4
shell: bash

- name: List files in the space (MacOS)
Expand All @@ -315,8 +315,8 @@ jobs:
- name: Save published binary (MacOS)
uses: actions/upload-artifact@v4
with:
name: tgz-osx12-binary
path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-osx12.tar.gz
name: tgz-osx-binary
path: ${{ runner.workspace }}/build/${{ steps.set-file-base.outputs.FILE_BASE }}-osx.tar.gz
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`

####### intel builds
Expand All @@ -334,7 +334,7 @@ jobs:
id: setup-fortran
with:
compiler: intel
version: '2023.2'
version: '2024.1'

- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1.13.0
Expand Down Expand Up @@ -382,7 +382,7 @@ jobs:
CXX: ${{ steps.setup-fortran.outputs.cxx }}
run: |
cd "${{ runner.workspace }}/hdf4/${{ steps.set-file-base.outputs.SOURCE_BASE }}"
cmake --workflow --preset=${{ inputs.preset_name }}-Intel --fresh
cmake --workflow --preset=${{ inputs.preset_name }}-win-Intel --fresh
shell: pwsh

- name: Publish binary (Windows_intel)
Expand Down Expand Up @@ -427,7 +427,7 @@ jobs:
id: setup-fortran
with:
compiler: intel
version: '2023.2'
version: '2024.1'

- name: Set file base name (Linux_intel)
id: set-file-base
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/intel-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
id: setup-fortran
with:
compiler: intel
version: '2024.0'
version: '2024.1'

- name: CMake Configure (Linux)
shell: bash
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
id: setup-fortran
with:
compiler: intel
version: '2024.0'
version: '2024.1'

- name: CMake Configure (Windows)
shell: pwsh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ jobs:
- name: Save published binary (Mac)
uses: actions/upload-artifact@v4
with:
name: tgz-osx12-${{ inputs.build_mode }}-binary
name: tgz-osx-${{ inputs.build_mode }}-binary
path: ${{ runner.workspace }}/build/HDF-*-Darwin.tar.gz
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
if: ${{ (matrix.os == 'macos-13') && (inputs.netcdf == 'true') && (inputs.shared == 'true') }}
16 changes: 3 additions & 13 deletions .github/workflows/netcdf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,33 +28,23 @@ jobs:
run: |
sudo apt update
sudo apt install -y libaec-dev zlib1g-dev automake autoconf libcurl4-openssl-dev libjpeg-dev wget curl bzip2 m4 flex bison cmake libzip-dev doxygen openssl libtool libtool-bin
- name: Checkout HDF4
uses: actions/checkout@v4.1.1

- name: Install HDF4
run: |
./autogen.sh
./configure --prefix=/usr/local --disable-netcdf --enable-shared --with-szlib
make -j
sudo make install -j
- name: Checkout HDF5
uses: actions/checkout@v4.1.1
with:
repository: HDFGroup/hdf5
path: hdf5
- name: Install HDF5
run: |
cd hdf5
./autogen.sh
./configure --prefix=/usr/local --disable-tests --disable-static --enable-shared --enable-hl --with-szlib
make -j
sudo make install -j
- name: Checkout netCDF
uses: actions/checkout@v4.1.1
with:
repository: unidata/netcdf-c
path: netcdf-c

- name: Test netCDF
run: |
cd netcdf-c
Expand Down
39 changes: 31 additions & 8 deletions .github/workflows/release-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,16 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
ref: '${{ github.head_ref || github.ref_name }}'

- uses: rickstaa/action-create-tag@a1c7777fcb2fee4f19b0f283ba888afa11678b72 # v1.7.2
id: "tag_create"
with:
commit_sha: ${{ inputs.file_sha }}
tag: "${{ inputs.use_tag }}"
force_push_tag: true
force_push_tag: false
tag_exists_error: false
message: "Latest snapshot"
if: ${{ inputs.use_environ == 'snapshots' }}

# Print result using the action output.
- run: |
Expand Down Expand Up @@ -102,7 +103,7 @@ jobs:
- name: Get published binary (MacOS)
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: tgz-osx12-binary
name: tgz-osx-binary
path: ${{ github.workspace }}

- name: Get published binary (Linux)
Expand Down Expand Up @@ -141,12 +142,26 @@ jobs:
name: abi-reports
path: ${{ github.workspace }}

- name: Get published nonversioned source (tgz)
if: ${{ (inputs.use_environ == 'release') }}
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: tgz-tarball-nover
path: ${{ github.workspace }}

- name: Get published nonversioned source (zip)
if: ${{ (inputs.use_environ == 'release') }}
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: zip-tarball-nover
path: ${{ github.workspace }}

- name: Create sha256 sums for files
run: |
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen.zip > ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.zip >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-osx12.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-osx.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.deb.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
Expand All @@ -155,6 +170,12 @@ jobs:
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}-win-vs2022_intel.zip >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum ${{ steps.get-file-base.outputs.FILE_BASE }}.html.abi.reports.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
- name: Create sha256 sums for files for nonversioned files
if: ${{ (inputs.use_environ == 'release') }}
run: |
sha256sum hdf.zip >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
sha256sum hdf.tar.gz >> ${{ steps.get-file-base.outputs.FILE_BASE }}.sha256sums.txt
- name: Store snapshot name
run: |
echo "${{ steps.get-file-base.outputs.FILE_BASE }}" > ./last-file.txt
Expand All @@ -172,7 +193,7 @@ jobs:
- name: PreRelease tag
id: create_prerelease
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564 # v2.0.4
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5
with:
tag_name: "${{ inputs.use_tag }}"
prerelease: true
Expand All @@ -182,7 +203,7 @@ jobs:
${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen.zip
${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-osx12.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-osx.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.deb.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm.tar.gz
Expand All @@ -196,7 +217,7 @@ jobs:
- name: Release tag
id: create_release
if: ${{ (inputs.use_environ == 'release') }}
uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564 # v2.0.4
uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5
with:
tag_name: "${{ inputs.use_tag }}"
prerelease: false
Expand All @@ -205,7 +226,9 @@ jobs:
${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen.zip
${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-osx12.tar.gz
hdf.tar.gz
hdf.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-osx.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.deb.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/remove-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
${{ steps.get-file-base.outputs.FILE_BASE }}.doxygen.zip
${{ steps.get-file-base.outputs.FILE_BASE }}.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}.zip
${{ steps.get-file-base.outputs.FILE_BASE }}-osx12.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-osx.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.deb.tar.gz
${{ steps.get-file-base.outputs.FILE_BASE }}-ubuntu-2204_gcc.rpm.tar.gz
Expand Down
Loading

0 comments on commit 3c4dc4f

Please sign in to comment.