From 8d2512f71b3382e910d170bad7ad0403e5326339 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 12 Sep 2023 13:20:07 -0500 Subject: [PATCH] Split autotools into two jobs --- .github/workflows/autotools.yml | 8 +- .github/workflows/main-auto.yml | 200 ++++++++++++++------------------ 2 files changed, 93 insertions(+), 115 deletions(-) diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml index eba87a1944b..89afa405c43 100644 --- a/.github/workflows/autotools.yml +++ b/.github/workflows/autotools.yml @@ -23,28 +23,28 @@ jobs: name: "Autotools Debug Thread-Safety Workflows" uses: ./.github/workflows/main-auto.yml with: - thread_safety: true + thread_safety: enable build_mode: "debug" call-release-thread-autotools: name: "Autotools Release Thread-Safety Workflows" uses: ./.github/workflows/main-auto.yml with: - thread_safety: true + thread_safety: enable build_mode: "production" call-debug-autotools: name: "Autotools Debug Workflows" uses: ./.github/workflows/main-auto.yml with: - thread_safety: false + thread_safety: disable build_mode: "debug" call-release-autotools: name: "Autotools Release Workflows" uses: ./.github/workflows/main-auto.yml with: - thread_safety: false + thread_safety: disable build_mode: "production" call-release-auto-intel: diff --git a/.github/workflows/main-auto.yml b/.github/workflows/main-auto.yml index ea76a89e2b6..4333bda8d77 100644 --- a/.github/workflows/main-auto.yml +++ b/.github/workflows/main-auto.yml @@ -5,7 +5,7 @@ on: workflow_call: inputs: thread_safety: - description: "thread-safety on/off" + description: "thread-safety enable/disable" required: true type: boolean build_mode: @@ -22,70 +22,10 @@ permissions: jobs: # A workflow that builds the library and runs all the tests + # Linux (Ubuntu) w/ gcc + Autotools + # Autotools_build_and_test: - strategy: - # The current matrix has one dimensions: - # - # * config name - # - # Most configuration information is added via the 'include' mechanism, - # which will append the key-value pairs in the configuration where the - # names match. - matrix: - name: - - "gcc" - - "gcc parallel (build only)" - - # This is where we list the bulk of the options for each configuration. - # The key-value pair values are usually appropriate for being CMake or - # Autotools configure values, so be aware of that. - - include: - - # Linux (Ubuntu) w/ gcc + Autotools - # - # Keep this identical to the CMake configs. Note the difference in - # the values. - - name: "gcc" - os: ubuntu-latest - cpp: enable - fortran: enable - java: enable - docs: disable - parallel: disable - mirror_vfd: enable - direct_vfd: enable - ros3_vfd: enable - deprec_sym: enable - default_api: v114 - szip: yes - flags: "" - run_tests: true - - # Parallel Linux (Ubuntu) w/ gcc + Autotools - # - # The GitHub runners are inadequate for running parallel HDF5 tests, - # so we catch most issues in daily testing. What we have here is just - # a compile check to make sure nothing obvious is broken. - - name: "gcc parallel (build only)" - os: ubuntu-latest - cpp: disable - fortran: enable - java: disable - docs: disable - parallel: enable - mirror_vfd: disable - direct_vfd: disable - ros3_vfd: disable - deprec_sym: enable - default_api: v114 - szip: yes - flags: "CC=mpicc" - run_tests: false - - # Sets the job's name from the properties - name: "${{ matrix.name }}-${{ inputs.build_mode }}-TS=${{ inputs.thread_safety }}" - + name: "GCC-${{ inputs.build_mode }}-TS=${{ inputs.thread_safety }}d" # Don't run the action if the commit message says to skip CI if: "!contains(github.event.head_commit.message, 'skip-ci')" @@ -94,43 +34,18 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - - # # SETUP - # - - #Useful for debugging - - name: Dump matrix context - run: echo '${{ toJSON(matrix) }}' - - # Only CMake need ninja-build, but we just install it unilaterally - # libssl, etc. are needed for the ros3 VFD - name: Install Linux Dependencies run: | sudo apt 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 - if: matrix.os == 'ubuntu-latest' - - - name: Install Autotools Dependencies (Linux) - run: | - sudo apt install automake autoconf libtool libtool-bin - sudo apt install libaec0 libaec-dev - - - name: Install Autotools Dependencies (Linux, parallel) - run: | - sudo apt install openmpi-bin openmpi-common mpi-default-dev - echo "CC=mpicc" >> $GITHUB_ENV - echo "FC=mpif90" >> $GITHUB_ENV - if: (matrix.parallel == 'enable') - - - name: Install Dependencies (macOS) - run: brew install ninja doxygen - if: matrix.os == 'macos-13' # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Get Sources @@ -142,20 +57,22 @@ jobs: sh ./autogen.sh mkdir "${{ runner.workspace }}/build" cd "${{ runner.workspace }}/build" - ${{ matrix.flags }} $GITHUB_WORKSPACE/configure \ + $GITHUB_WORKSPACE/configure \ --enable-build-mode=${{ inputs.build_mode }} \ - --${{ matrix.deprec_sym }}-deprecated-symbols \ - --with-default-api-version=${{ matrix.default_api }} \ + --enable-deprecated-symbols \ + --with-default-api-version=v114 \ --enable-shared \ - --${{ matrix.parallel }}-parallel \ - --${{ matrix.cpp }}-cxx \ - --${{ matrix.fortran }}-fortran \ - --${{ matrix.java }}-java \ - --${{ matrix.mirror_vfd }}-mirror-vfd \ - --${{ matrix.direct_vfd }}-direct-vfd \ - --${{ matrix.ros3_vfd }}-ros3-vfd \ - --with-szlib=${{ matrix.szip }} + --disable-parallel \ + --{{ inputs.thread_safety }}-threadsafe \ + --enable-cxx \ + --enable-fortran \ + --enable-java \ + --enable-mirror-vfd \ + --enable-direct-vfd \ + --enable-ros3-vfd \ + --with-szlib=yes shell: bash + working-directory: ${{ runner.workspace }}/build if: "! (inputs.thread_safety)" - name: Autotools Configure (Thread-Safe) @@ -163,17 +80,18 @@ jobs: sh ./autogen.sh mkdir "${{ runner.workspace }}/build" cd "${{ runner.workspace }}/build" - ${{ matrix.flags }} $GITHUB_WORKSPACE/configure \ + $GITHUB_WORKSPACE/configure \ --enable-build-mode=${{ inputs.build_mode }} \ --enable-shared \ - --enable-threadsafe \ + --{{ inputs.thread_safety }}-threadsafe \ --disable-hl \ - --${{ matrix.parallel }}-parallel \ - --${{ matrix.mirror_vfd }}-mirror-vfd \ - --${{ matrix.direct_vfd }}-direct-vfd \ - --${{ matrix.ros3_vfd }}-ros3-vfd \ - --with-szlib=${{ matrix.szip }} + --disable-parallel \ + --enable-mirror-vfd \ + --enable-direct-vfd \ + --enable-ros3-vfd \ + --with-szlib=yes shell: bash + working-directory: ${{ runner.workspace }}/build if: (inputs.thread_safety) # BUILD @@ -186,7 +104,7 @@ jobs: - name: Autotools Run Tests run: make check -j2 working-directory: ${{ runner.workspace }}/build - if: (matrix.run_tests) && ! (inputs.thread_safety) + if: "! (inputs.thread_safety)" # THREAD-SAFE - name: Autotools Run Thread-Safe Tests @@ -194,7 +112,7 @@ jobs: cd test ./ttsafe working-directory: ${{ runner.workspace }}/build - if: (matrix.run_tests) && (inputs.thread_safety) + if: (inputs.thread_safety) # INSTALL (note that this runs even when we don't run the tests) - name: Autotools Install @@ -203,4 +121,64 @@ jobs: - name: Autotools Verify Install run: make check-install + + # + # The GitHub runners are inadequate for running parallel HDF5 tests, + # so we catch most issues in daily testing. What we have here is just + # a compile check to make sure nothing obvious is broken. + # A workflow that builds the library + # Parallel Linux (Ubuntu) w/ gcc + Autotools + # + Autotools_build_parallel: + name: "Parallel GCC-${{ inputs.build_mode }}-TS=${{ inputs.thread_safety }}d" + # Don't run the action if the commit message says to skip CI + if: "!contains(github.event.head_commit.message, 'skip-ci')" + + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # SETUP + - name: Install Linux Dependencies + run: | + sudo apt 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 + sudo apt install openmpi-bin openmpi-common mpi-default-dev + echo "CC=mpicc" >> $GITHUB_ENV + echo "FC=mpif90" >> $GITHUB_ENV + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Get Sources + uses: actions/checkout@v4 + + # AUTOTOOLS CONFIGURE + - name: Autotools Configure + run: | + sh ./autogen.sh + mkdir "${{ runner.workspace }}/build" + cd "${{ runner.workspace }}/build" + CC=mpicc $GITHUB_WORKSPACE/configure \ + --enable-build-mode=${{ inputs.build_mode }} \ + --enable-deprecated-symbols \ + --with-default-api-version=v114 \ + --enable-shared \ + --enable-parallel \ + --disable-cxx \ + --enable-fortran \ + --disable-java \ + --disable-mirror-vfd \ + --disable-direct-vfd \ + --disable-ros3-vfd \ + --with-szlib=yes + shell: bash + working-directory: ${{ runner.workspace }}/build + + # BUILD + - name: Autotools Build + run: make -j3 working-directory: ${{ runner.workspace }}/build