Skip to content

Commit

Permalink
Split merge request triggers into autotools vs cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF committed Apr 2, 2024
1 parent 0c9461d commit f1e7cf0
Show file tree
Hide file tree
Showing 8 changed files with 196 additions and 186 deletions.
31 changes: 29 additions & 2 deletions .github/workflows/autotools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,23 @@ name: hdf5 dev autotools CI

# Controls when the action will run. Triggers the workflow on push or pull request
on:
workflow_call:
workflow_dispatch:
push:
pull_request:
branches: [ develop ]
paths-ignore:
- '.github/CODEOWNERS'
- '.github/FUNDING.yml'
- 'doc/**'
- 'release_docs/**'
- 'ACKNOWLEDGEMENTS'
- 'COPYING**'
- '**.md'

# 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

permissions:
contents: read
Expand Down Expand Up @@ -83,10 +99,21 @@ jobs:
with:
build_mode: "production"

call-release-cmake-julia:
call-release-auto-julia:
name: "Autotools Julia Workflows"
uses: ./.github/workflows/julia-auto.yml
with:
build_mode: "production"

call-release-auto-xpr:
name: "Autotools TestExpress Workflows"
uses: ./.github/workflows/testxpr-auto.yml

# workflow-msys2-autotools:
# name: "CMake msys2 Workflows"
# uses: ./.github/workflows/msys2-auto.yml
# with:
# build_mode: "production"
# build_option: "--enable-production"


25 changes: 23 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,23 @@ name: hdf5 dev cmake CI

# Controls when the action will run. Triggers the workflow on push or pull request
on:
workflow_call:
workflow_dispatch:
push:
pull_request:
branches: [ develop ]
paths-ignore:
- '.github/CODEOWNERS'
- '.github/FUNDING.yml'
- 'doc/**'
- 'release_docs/**'
- 'ACKNOWLEDGEMENTS'
- 'COPYING**'
- '**.md'

# 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

permissions:
contents: read
Expand Down Expand Up @@ -91,4 +107,9 @@ jobs:
uses: ./.github/workflows/julia-cmake.yml
with:
build_mode: "Release"


call-release-cmake-xpr:
name: "CMake TestExpress Workflows"
uses: ./.github/workflows/testxpr-cmake.yml


50 changes: 0 additions & 50 deletions .github/workflows/main.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/release-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ jobs:
echo "${{ steps.get-file-base.outputs.FILE_BASE }}" > ./last-file.txt
- name: Get NEWSLETTER
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
name: NEWSLETTER
path: ${{ github.workspace }}
Expand All @@ -179,7 +179,7 @@ jobs:
- name: PreRelease tag
id: create_prerelease
if: ${{ (inputs.use_environ == 'snapshots') }}
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564 # v2.0.4
with:
tag_name: "${{ inputs.use_tag }}"
prerelease: true
Expand All @@ -204,7 +204,7 @@ jobs:
- name: Release tag
id: create_release
if: ${{ (inputs.use_environ == 'release') }}
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564 # v2.0.4
with:
tag_name: "${{ inputs.use_tag }}"
prerelease: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
with:
sarif_file: results.sarif
71 changes: 71 additions & 0 deletions .github/workflows/testxpr-auto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: hdf5 TestExpress Autotools CI

# Run TestExpress CI daily at 04:00 CDT (9:00 UTC)
on:
workflow_call:

permissions:
contents: read

jobs:
build_and_test:
strategy:
matrix:
build_mode: ["production", "debug"]
include:
- build_mode: "production"
- build_mode: "debug"

# Sets the job's name from the properties
name: "Autotools ${{ matrix.build_mode }} Express Test Workflows"

# Don't run the action if the commit message says to skip CI
if: "!contains(github.event.head_commit.message, 'skip-ci')"

runs-on: ubuntu-latest
steps:
- name: Install Linux Dependencies
run: |
sudo apt-get update
sudo apt-get install ninja-build doxygen graphviz
sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
sudo apt install gcc-12 g++-12 gfortran-12
sudo apt install automake autoconf libtool libtool-bin
sudo apt install libaec0 libaec-dev
echo "CC=gcc-12" >> $GITHUB_ENV
echo "CXX=g++-12" >> $GITHUB_ENV
echo "FC=gfortran-12" >> $GITHUB_ENV
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get Sources
uses: actions/[email protected]

- name: Autotools Configure
shell: bash
run: |
sh ./autogen.sh
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
$GITHUB_WORKSPACE/configure \
--enable-build-mode=${{ matrix.build_mode }} \
--enable-shared \
--disable-parallel \
--disable-cxx \
--disable-fortran \
--disable-java \
--with-szlib=yes
- name: Autotools Build
shell: bash
run: |
make -j3
working-directory: ${{ runner.workspace }}/build

- name: Autotools Test
shell: bash
env:
HDF5TestExpress: 0
run: |
cd test
make -j3 check
working-directory: ${{ runner.workspace }}/build
69 changes: 69 additions & 0 deletions .github/workflows/testxpr-cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: hdf5 TestExpress CMake CI

# Run TestExpress CI daily at 04:00 CDT (9:00 UTC)
on:
workflow_call:

permissions:
contents: read

jobs:
build_and_test:
strategy:
matrix:
build_mode: ["Release", "Debug"]
include:
- build_mode: "Release"
- build_mode: "Debug"

# Sets the job's name from the properties
name: "CMake ${{ matrix.build_mode }} Express Test Workflows"

# Don't run the action if the commit message says to skip CI
if: "!contains(github.event.head_commit.message, 'skip-ci')"

runs-on: ubuntu-latest
steps:
- name: Install Linux Dependencies
run: |
sudo apt-get update
sudo apt-get install ninja-build doxygen graphviz
sudo apt install libssl3 libssl-dev libcurl4 libcurl4-openssl-dev
sudo apt install libaec0 libaec-dev
sudo apt install gcc-12 g++-12 gfortran-12
echo "CC=gcc-12" >> $GITHUB_ENV
echo "CXX=g++-12" >> $GITHUB_ENV
echo "FC=gfortran-12" >> $GITHUB_ENV
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Get Sources
uses: actions/[email protected]

- name: CMake Configure
shell: bash
run: |
mkdir "${{ runner.workspace }}/build"
cd "${{ runner.workspace }}/build"
cmake -C $GITHUB_WORKSPACE/config/cmake/cacheinit.cmake \
-G Ninja \
-DCMAKE_BUILD_TYPE=${{ matrix.build_mode }} \
-DBUILD_SHARED_LIBS=ON \
-DHDF5_ENABLE_ALL_WARNINGS=ON \
-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 \
-DHDF_TEST_EXPRESS=0 \
$GITHUB_WORKSPACE
- name: CMake Build
run: cmake --build . --parallel 3 --config ${{ matrix.build_mode }}
working-directory: ${{ runner.workspace }}/build

- name: CMake Run Tests
run: ctest . --parallel 2 -C ${{ matrix.build_mode }} -V -R H5TESTXPR
working-directory: ${{ runner.workspace }}/build

Loading

0 comments on commit f1e7cf0

Please sign in to comment.