Files
00af100181 Harden scheduled/downstream build workflows against zizmor findings (#6544)
* Harden scheduled/downstream build workflows against zizmor findings

Fix all zizmor static-analysis findings in the scheduled/downstream build
workflows without changing behavior:

- template-injection: move ${{ }} expressions out of run: script bodies
  into step-level env: blocks referenced as shell variables
- artipacked: add persist-credentials: false to actions/checkout steps
  (none of these jobs push to git)
- excessive-permissions: add top-level 'permissions: contents: read' to
  macos-26-matrix.yml (other files already restrict permissions)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Address Copilot review comments on PR #6544

- Drop unnecessary command substitution in daily-schedule.yml's
  FILE_NAME_BASE assignment
- Name the two env-block steps in daily-build.yml that previously ran
  unnamed (easier to scan in logs)
- Quote $GITHUB_OUTPUT in the getinputs step

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Remove extra blank lines.

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
2026-08-04 16:41:29 -04:00

82 lines
3.0 KiB
YAML

name: hdfeos5 dev
# Triggers the workflow on a daily schedule or on demand.
#
# This test downloads an HDF-EOS5 source tarball from an external host
# (git.earthdata.nasa.gov) that has proven unreliable. Running it on a daily
# schedule rather than on every pull request prevents transient network
# failures to that host from blocking PR merges, while still catching genuine
# HDF-EOS5 compatibility regressions on a daily cadence. See issue #6495.
on:
workflow_dispatch:
schedule:
- cron: "30 0 * * *"
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:
name: Build hdfeos5
runs-on: ubuntu-latest
if: "github.repository_owner == 'HDFGroup'"
steps:
- name: Install System dependencies
run: |
sudo apt-get update
sudo apt-get install ninja-build
sudo apt install libssl3 libssl-dev libcurl4
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 HDF5
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false # Prevents tokens from being written to Git config files
- name: Configure
env:
RUNNER_WORKSPACE: ${{ runner.workspace }}
run: |
mkdir "$RUNNER_WORKSPACE/build"
cd "$RUNNER_WORKSPACE/build"
cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DHDF5_ENABLE_PARALLEL:BOOL=OFF \
-DHDF5_BUILD_CPP_LIB:BOOL=OFF \
-DHDF5_BUILD_FORTRAN=OFF \
-DHDF5_BUILD_JAVA=OFF \
-DHDF5_BUILD_DOC=OFF \
-DLIBAEC_USE_LOCALCONTENT=OFF \
-DZLIB_USE_LOCALCONTENT=OFF \
-DBUILD_TESTING:BOOL=OFF \
-DDEFAULT_API_VERSION:STRING=v16 \
-DCMAKE_INSTALL_PREFIX:PATH=/usr/local \
$GITHUB_WORKSPACE
shell: bash
- name: Build
run: cmake --build . --parallel 3 --config Release
working-directory: ${{ runner.workspace }}/build
- name: Install HDF5
run: |
sudo cmake --install . --config Release --prefix="/usr/local"
working-directory: ${{ runner.workspace }}/build
- name: Install HDF-EOS5
run: |
wget -O HDF-EOS5.2.0.tar.gz "https://git.earthdata.nasa.gov/projects/DAS/repos/hdfeos5/raw/hdf-eos5-2.0-src.tar.gz?at=refs%2Fheads%2FHDFEOS5_2.0"
tar zxvf HDF-EOS5.2.0.tar.gz
cd hdf-eos5-2.0
./configure CC=/usr/local/bin/h5cc --prefix=/usr/local/ --enable-install-include
make
LD_LIBRARY_PATH="/usr/local/lib:${LD_LIBRARY_PATH}"
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check
sudo make install