diff --git a/.github/workflows/build_openmpi_source.yml b/.github/workflows/build_openmpi_source.yml index ce5f6d1b4c3..92ad5b055cb 100644 --- a/.github/workflows/build_openmpi_source.yml +++ b/.github/workflows/build_openmpi_source.yml @@ -1,14 +1,11 @@ # Build OpenMPI from source using the latest commit on the -# 'main' branch and cache the results +# 'main' branch and cache the results. Result is installed +# to (or restored to) '${{ github.workspace }}/openmpi'. # Triggers the workflow on a call from another workflow on: workflow_call: inputs: - install_path: - description: "location to install OpenMPI to or restore to from cache" - required: true - type: string build_mode: description: "production vs. debug build" required: true @@ -24,12 +21,12 @@ jobs: runs-on: ubuntu-latest steps: - - name: Install Linux Dependencies + - name: Install Linux dependencies run: | sudo apt-get update sudo apt-get install build-essential libtool libtool-bin - - name: Get OpenMPI Source + - name: Get OpenMPI source uses: actions/checkout@v4.1.7 with: repository: 'open-mpi/ompi' @@ -51,8 +48,8 @@ jobs: id: cache-openmpi-ubuntu-gcc uses: actions/cache@v4 with: - path: ${{ inputs.install_path }} - key: ${{ runner.os }}-${{ runner.arch }}-gcc-openmpi-${{ steps.get-sha.outputs.sha }} + path: ${{ github.workspace }}/openmpi + key: ${{ runner.os }}-${{ runner.arch }}-gcc-openmpi-${{ steps.get-sha.outputs.sha }}-${{ inputs.build_mode }} - name: Install OpenMPI (GCC) (Production) if: ${{ steps.cache-openmpi-ubuntu-gcc.cache-hit != 'true' && (inputs.build_mode != 'debug') }} @@ -61,7 +58,7 @@ jobs: ./autogen.pl ./configure \ CC=gcc \ - --prefix=${{ inputs.install_path }} + --prefix=${{ github.workspace }}/openmpi make -j2 make install @@ -72,7 +69,7 @@ jobs: ./autogen.pl ./configure \ CC=gcc \ - --prefix=${{ inputs.install_path }} \ + --prefix=${{ github.workspace }}/openmpi \ --enable-debug make -j2 make install diff --git a/.github/workflows/test_build_openmpi_source.yml b/.github/workflows/test_build_openmpi_source.yml index 0aa828df99c..60b65f56853 100644 --- a/.github/workflows/test_build_openmpi_source.yml +++ b/.github/workflows/test_build_openmpi_source.yml @@ -11,5 +11,4 @@ jobs: name: "OpenMPI debug" uses: ./.github/workflows/build_openmpi_source.yml with: - install_path: ${{ github.workspace }}/openmpi_install build_mode: "debug" \ No newline at end of file