Skip to content

Commit

Permalink
ci: sync with upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoklee committed Feb 21, 2024
2 parents e3c5c30 + ec211cd commit d16a9ce
Show file tree
Hide file tree
Showing 323 changed files with 2,937 additions and 3,184 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/autotools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,9 @@ jobs:
uses: ./.github/workflows/intel-auto.yml
with:
build_mode: "production"

call-release-auto-nvhpc:
name: "Autotools nvhpc Workflows"
uses: ./.github/workflows/nvhpc-auto.yml
with:
build_mode: "production"
2 changes: 1 addition & 1 deletion .github/workflows/cmake-ctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ jobs:
CXX: ${{ steps.setup-fortran.outputs.cxx }}
run: |
cd "${{ runner.workspace }}/hdf4/hdfsrc"
cmake --workflow --preset=${{ inputs.preset_name }}-win-Intel --fresh
cmake --workflow --preset=${{ inputs.preset_name }}-Intel --fresh
shell: pwsh

- name: Publish binary (Windows_intel)
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,9 @@ jobs:
uses: ./.github/workflows/intel-cmake.yml
with:
build_mode: "Release"

call-release-cmake-nvhpc:
name: "CMake nvhpc Workflows"
uses: ./.github/workflows/nvhpc-cmake.yml
with:
build_mode: "Release"
32 changes: 32 additions & 0 deletions .github/workflows/daily-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,26 @@ permissions:
# A workflow run is made up of one or more jobs that can run sequentially or
# in parallel.
jobs:
get-old-names:
runs-on: ubuntu-latest
outputs:
hdf4-name: ${{ steps.gethdf4base.outputs.HDF4_NAME_BASE }}

steps:
- uses: actions/checkout@v4.1.1

- name: Get hdf4 release base name
uses: dsaltares/fetch-gh-release-asset@master
with:
version: 'tags/snapshot'
file: 'last-file.txt'

- name: Read base-name file
id: gethdf4base
run: echo "HDF4_NAME_BASE=$(cat last-file.txt)" >> $GITHUB_OUTPUT

- run: echo "hdf4 base name is ${{ steps.gethdf4base.outputs.HDF4_NAME_BASE }}."

call-workflow-tarball:
uses: ./.github/workflows/tarball.yml
with:
Expand Down Expand Up @@ -52,3 +72,15 @@ jobs:
use_environ: snapshots
if: ${{ needs.call-workflow-tarball.outputs.has_changes == 'true' }}

call-workflow-remove:
# needs: [get-old-names, call-workflow-tarball, call-workflow-ctest, call-workflow-abi, call-workflow-release]
needs: [get-old-names, call-workflow-tarball, call-workflow-ctest, call-workflow-release]
permissions:
contents: write # In order to allow file deletion
uses: ./.github/workflows/remove-files.yml
with:
file_base: ${{ needs.get-old-names.outputs.hdf4-name }}
use_tag: snapshot
use_environ: snapshots
if: ${{ needs.call-workflow-tarball.outputs.has_changes == 'true' }}

2 changes: 1 addition & 1 deletion .github/workflows/hdfeos2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
name: Build hdfeos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.1.1

- name: Install Autotools Dependencies (Linux)
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/intel-cmake.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: hdf4 dev CMake icx CI

# Controls when the action will run. Triggers the workflow on a call
on:
workflow_call:
inputs:
Expand Down Expand Up @@ -122,5 +121,5 @@ jobs:
CC: ${{ steps.setup-fortran.outputs.cc }}
CXX: ${{ steps.setup-fortran.outputs.cxx }}
run: |
ctest . --parallel 2 -C ${{ inputs.build_mode }} -V -E "HDP-dumpv|h4ex_GR_create|h4ex_GR_write|h4ex_VG_add"
ctest . --parallel 2 -C ${{ inputs.build_mode }} -V
working-directory: ${{ runner.workspace }}/build
2 changes: 1 addition & 1 deletion .github/workflows/j.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
whoami
env | sort
sudo pkg_add git
git clone https://github.com/hyoklee/hdf4-1 hdf4
git clone https://github.com/hyoklee/hdf4
cd hdf4
sudo pkg_add cmake
sudo pkg_add jpeg
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/lin-auto-aocc-f.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ jobs:
tar -xvf aocc-compiler-4.1.0.tar
cd aocc-compiler-4.1.0
bash install.sh
source /home/runner/work/hdf4-1/hdf4-1/setenv_AOCC.sh
source /home/runner/work/hdf4/hdf4/setenv_AOCC.sh
which clang
which flang
clang -v
- name: Install HDF4
run: |
source /home/runner/work/hdf4-1/hdf4-1/setenv_AOCC.sh
source /home/runner/work/hdf4/hdf4/setenv_AOCC.sh
which clang
export LD_LIBRARY_PATH=/home/runner/work/hdf4-1/hdf4-1/aocc-compiler-4.1.0/lib:/usr/local/lib
export LD_RUN_PATH=/home/runner/work/hdf4-1/hdf4-1/aocc-compiler-4.1.0/lib:/usr/local/lib
export LD_LIBRARY_PATH=/home/runner/work/hdf4/hdf4/aocc-compiler-4.1.0/lib:/usr/local/lib
export LD_RUN_PATH=/home/runner/work/hdf4/hdf4/aocc-compiler-4.1.0/lib:/usr/local/lib
export PATH=/usr/local/bin:$PATH
./autogen.sh
./configure --prefix=/tmp --enable-fortran --enable-shared CC=clang F77=flang LDFLAGS="-L/home/runner/work/hdf4-1/hdf4-1/aocc-compiler-4.1.0/lib"
./configure --prefix=/tmp --enable-fortran --enable-shared CC=clang F77=flang LDFLAGS="-L/home/runner/work/hdf4/hdf4/aocc-compiler-4.1.0/lib"
make -j
make check -j
make install
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/lin-auto-aocc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ jobs:
tar -xvf aocc-compiler-4.1.0.tar
cd aocc-compiler-4.1.0
bash install.sh
source /home/runner/work/hdf4-1/hdf4-1/setenv_AOCC.sh
source /home/runner/work/hdf4/hdf4/setenv_AOCC.sh
which clang
which flang
clang -v
- name: Install HDF4
run: |
source /home/runner/work/hdf4-1/hdf4-1/setenv_AOCC.sh
source /home/runner/work/hdf4/hdf4/setenv_AOCC.sh
which clang
export LD_LIBRARY_PATH=/home/runner/work/hdf4-1/hdf4-1/aocc-compiler-4.1.0/lib:/usr/local/lib
export LD_RUN_PATH=/home/runner/work/hdf4-1/hdf4-1/aocc-compiler-4.1.0/lib:/usr/local/lib
export LD_LIBRARY_PATH=/home/runner/work/hdf4/hdf4/aocc-compiler-4.1.0/lib:/usr/local/lib
export LD_RUN_PATH=/home/runner/work/hdf4/hdf4/aocc-compiler-4.1.0/lib:/usr/local/lib
export PATH=/usr/local/bin:$PATH
./autogen.sh
./configure --prefix=/tmp --enable-shared CC=clang LDFLAGS="-L/home/runner/work/hdf4-1/hdf4-1/aocc-compiler-4.1.0/lib"
./configure --prefix=/tmp --enable-shared CC=clang LDFLAGS="-L/home/runner/work/hdf4/hdf4/aocc-compiler-4.1.0/lib"
make -j
make check -j
make install
Expand Down
25 changes: 3 additions & 22 deletions .github/workflows/lin-auto-gcc_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,43 +15,24 @@ jobs:
uses: actions/checkout@v4
- name: Build and Test
run: |
echo $PWD
echo $PATH
wget -q https://musl.cc/aarch64-linux-musl-cross.tgz
tar -xzf aarch64-linux-musl-cross.tgz
./aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc --version
sudo cp -r ./aarch64-linux-musl-cross/aarch64-linux-musl/lib/* /lib/
git clone https://github.com/alisw/libtirpc
cd libtirpc
mkdir -p src/sys
cd src/sys
wget https://raw.githubusercontent.com/openbsd/src/master/sys/sys/queue.h
wget https://raw.githubusercontent.com/openbsd/src/master/sys/sys/_null.h
cd ../..
chmod u+x ./autogen.sh
./autogen.sh
./configure CC=/home/runner/work/hdf4-1/hdf4-1/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc AR=/home/runner/work/hdf4-1/hdf4-1/aarch64-linux-musl-cross/bin/aarch64-linux-musl-ar --disable-gssapi --host=aarch64-linux-musl --prefix=/home/runner/work/hdf4-1/hdf4-1/aarch64-linux-musl-cross
make
sudo make install
cd ..
wget -q https://gamma.hdfgroup.org/ftp/pub/outgoing/h4map/src/h4map.tar.gz
tar -xzf h4map.tar.gz
cd h4map/jpeg-6b
./configure CC=/home/runner/work/hdf4-1/hdf4-1/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc AR=/home/runner/work/hdf4-1/hdf4-1/aarch64-linux-musl-cross/bin/aarch64-linux-musl-ar --prefix=/home/runner/work/hdf4-1/hdf4-1/aarch64-linux-musl-cross
./configure CC=/home/runner/work/hdf4/hdf4/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc AR=/home/runner/work/hdf4/hdf4/aarch64-linux-musl-cross/bin/aarch64-linux-musl-ar --prefix=/home/runner/work/hdf4/hdf4/aarch64-linux-musl-cross
make
sudo make install-lib
cd ../..
pwd
ls
git clone https://github.com/madler/zlib
cd zlib
CC=/home/runner/work/hdf4-1/hdf4-1/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc AR=/home/runner/work/hdf4-1/hdf4-1/aarch64-linux-musl-cross/bin/aarch64-linux-musl-ar ./configure --prefix=/home/runner/work/hdf4-1/hdf4-1/aarch64-linux-musl-cross
CC=/home/runner/work/hdf4/hdf4/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc AR=/home/runner/work/hdf4/hdf4/aarch64-linux-musl-cross/bin/aarch64-linux-musl-ar ./configure --prefix=/home/runner/work/hdf4/hdf4/aarch64-linux-musl-cross --static
make
sudo make install
cd ..
pwd
ls
autoreconf -fvi
./configure CC=/home/runner/work/hdf4-1/hdf4-1/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc CXX=/home/runner/work/hdf4-1/hdf4-1/aarch64-linux-musl-cross/bin/aarch64-linux-musl-g++ AR=/home/runner/work/hdf4-1/hdf4-1/aarch64-linux-musl-cross/bin/aarch64-linux-musl-ar CFLAGS="-I/home/runner/work/hdf4-1/hdf4-1/aarch64-linux-musl-cross/include/tirpc/" LDFLAGS="-L/home/runner/work/hdf4-1/hdf4-1/aarch64-linux-musl-cross/lib/ -ltirpc" --host=aarch64-linux-musl --disable-netcdf --disable-fortran --prefix=/home/runner/work/hdf4-1/hdf4-1/aarch64-linux-musl-cross --with-jpeg=/home/runner/work/hdf4-1/hdf4-1/aarch64-linux-musl-cross --with-zlib=/home/runner/work/hdf4-1/hdf4-1/aarch64-linux-musl-cross
./configure CC=/home/runner/work/hdf4/hdf4/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc CXX=/home/runner/work/hdf4/hdf4/aarch64-linux-musl-cross/bin/aarch64-linux-musl-g++ AR=/home/runner/work/hdf4/hdf4/aarch64-linux-musl-cross/bin/aarch64-linux-musl-ar LDFLAGS="-L/home/runner/work/hdf4/hdf4/aarch64-linux-musl-cross/lib/" --host=aarch64-linux-musl --disable-netcdf --disable-fortran --prefix=/home/runner/work/hdf4/hdf4/aarch64-linux-musl-cross --with-jpeg=/home/runner/work/hdf4/hdf4/aarch64-linux-musl-cross --with-zlib=/home/runner/work/hdf4/hdf4/aarch64-linux-musl-cross
make
make check
2 changes: 1 addition & 1 deletion .github/workflows/main-auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get Sources
uses: actions/checkout@v4
uses: actions/checkout@v4.1.1

# AUTOTOOLS CONFIGURE
- name: Autotools Configure
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main-cmake-mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get Sources
uses: actions/checkout@v4
uses: actions/checkout@v4.1.1

#
# CMAKE CONFIGURE
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/main-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,4 +225,3 @@ jobs:
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') }}

2 changes: 1 addition & 1 deletion .github/workflows/msys2-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ jobs:
# RUN TESTS
- name: CMake Run Tests
run: |
ctest . --parallel 2 -C ${{ inputs.build_mode }} -V -E "HDP-dumpv|h4ex_GR_create|h4ex_GR_write|h4ex_VG_add"
ctest . --parallel 2 -C ${{ inputs.build_mode }} -V
working-directory: ${{ runner.workspace }}/build
67 changes: 67 additions & 0 deletions .github/workflows/netcdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: netCDF dev

on:
workflow_dispatch:
push:
pull_request:
branches: [ master ]
paths-ignore:
- '.github/CODEOWNERS'
- 'release_notes/**'
- 'COPYING'
- '**.md'

permissions:
contents: read

# Using concurrency to cancel any in-progress job or run
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install System dependencies
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 --disable-netcdf-tools --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
autoreconf -if
CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ./configure --enable-hdf5 --enable-hdf4 --enable-hdf4-file-tests --enable-dap --disable-dap-remote-tests --enable-external-server-tests
cat config.log
cat libnetcdf.settings
CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make -j
CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check TESTS="" -j
LD_LIBRARY_PATH="/home/runner/work/hdf4/hdf4/netcdf-c/liblib/.libs:/usr/local/lib:${LD_LIBRARY_PATH}"
CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check -j
82 changes: 82 additions & 0 deletions .github/workflows/nvhpc-auto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: hdf4 dev autotools nvhpc

on:
workflow_call:
inputs:
build_mode:
description: "release vs. debug build"
required: true
type: string

permissions:
contents: read

jobs:
nvhpc_build_and_test:
name: "nvhpc ${{ inputs.build_mode }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1

- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install autoconf automake libtool libtool-bin libaec-dev
- name: Install NVHPC
shell: bash
run: |
curl https://developer.download.nvidia.com/hpc-sdk/ubuntu/DEB-GPG-KEY-NVIDIA-HPC-SDK | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg
echo 'deb [signed-by=/usr/share/keyrings/nvidia-hpcsdk-archive-keyring.gpg] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | sudo tee /etc/apt/sources.list.d/nvhpc.list
sudo apt-get update -y
sudo apt-get install -y nvhpc-23-9
echo "NVHPCSDK=/opt/nvidia/hpc_sdk" >> $GITHUB_ENV
echo "OMPI_CC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.9/compilers/bin/nvc" >> $GITHUB_ENV
echo "OMPI_FC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.9/compilers/bin/nvfortran" >> $GITHUB_ENV
echo "CC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.9/compilers/bin/nvc" >> $GITHUB_ENV
echo "FC=/opt/nvidia/hpc_sdk/Linux_x86_64/23.9/compilers/bin/nvfortran" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.9/compilers/lib" >> $GITHUB_ENV
echo "DESTDIR=/tmp" >> $GITHUB_ENV
- name: Autotools Configure
shell: bash
run: |
export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.9/compilers/bin:$PATH
sh ./autogen.sh
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
$GITHUB_WORKSPACE/configure \
FCFLAGS="-fPIC -fortranlibs" \
--enable-build-mode=${{ inputs.build_mode }} \
--disable-fortran \
--enable-shared \
#cat config.log
# BUILD
- name: Autotools Build
shell: bash
run: |
export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.9/compilers/bin:$PATH
make -j3
working-directory: ${{ runner.workspace }}/build

# RUN TESTS
# NORMAL
- name: Autotools Run Tests
run: |
export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.9/compilers/bin:$PATH
make check -j
working-directory: ${{ runner.workspace }}/build

# INSTALL (note that this runs even when we don't run the tests)
- name: Autotools Install
run: |
export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.9/compilers/bin:$PATH
make install
working-directory: ${{ runner.workspace }}/build

# - name: Autotools Verify Install
# run: |
# export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.9/compilers/bin:$PATH
# make check-install
# working-directory: ${{ runner.workspace }}/build
Loading

0 comments on commit d16a9ce

Please sign in to comment.