minpack compiled with LLVM flang on macOS #7
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: LLVM flang on macOS | |
| run-name: minpack compiled with LLVM flang on macOS | |
| on: | |
| push: | |
| paths-ignore: | |
| - "**/*.md" | |
| - "doc/**" | |
| pull_request: | |
| paths-ignore: | |
| - "**/*.md" | |
| - "doc/**" | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| USE_DOWNLOAD: ['OFF'] | |
| CMAKE_BUILD_TYPE: ['Release', 'Debug'] | |
| BUILD_SHARED_LIBS: ['ON', 'OFF'] | |
| BUILD_STATIC_LIBS: ['ON', 'OFF'] | |
| exclude: | |
| - BUILD_SHARED_LIBS: 'OFF' | |
| BUILD_STATIC_LIBS: 'OFF' | |
| steps: | |
| - name: Restore assets | |
| id: restore-assets | |
| uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| with: | |
| path: assets-cache | |
| key: minpack-assets | |
| enableCrossOsArchive: true | |
| - name: Checkout assets | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| if: ${{ matrix.USE_DOWNLOAD=='OFF' && steps.restore-assets.outputs.cache-hit != 'true' }} | |
| with: | |
| ref: assets-ci-v1 | |
| path: assets | |
| - name: Place minpack sources in the cache directory | |
| if: ${{ matrix.USE_DOWNLOAD=='OFF' && steps.restore-assets.outputs.cache-hit != 'true' }} | |
| shell: pwsh | |
| run: | | |
| New-Item "assets-cache" -ItemType Directory | Out-Null; | |
| foreach ($current_file in "disclaimer", "chkder.f", "dogleg.f", "dpmpar.f", "enorm.f", "fdjac1.f", "fdjac2.f", "hybrd1.f", "hybrd.f", "hybrj1.f", "hybrj.f", "lmder1.f", "lmder.f", "lmdif1.f", "lmdif.f", "lmpar.f", "lmstr1.f", "lmstr.f", "qform.f", "qrfac.f", "qrsolv.f", "r1mpyq.f", "r1updt.f", "rwupdt.f") | |
| { | |
| $filePath = Join-Path -Path "assets" -ChildPath $current_file; | |
| Copy-Item -Path $filePath -Destination "assets-cache"; | |
| } | |
| - name: Save assets | |
| if: ${{ matrix.USE_DOWNLOAD=='OFF' && steps.restore-assets.outputs.cache-hit != 'true' }} | |
| uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| with: | |
| path: assets-cache | |
| key: minpack-assets | |
| enableCrossOsArchive: true | |
| - name: Checkout repository to minpack-builder directory | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| path: minpack-builder | |
| - name: Place minpack sources in the correct directory for minpack-builder | |
| if: ${{ matrix.USE_DOWNLOAD=='OFF' }} | |
| shell: pwsh | |
| run: | | |
| foreach ($current_file in "disclaimer", "chkder.f", "dogleg.f", "dpmpar.f", "enorm.f", "fdjac1.f", "fdjac2.f", "hybrd1.f", "hybrd.f", "hybrj1.f", "hybrj.f", "lmder1.f", "lmder.f", "lmdif1.f", "lmdif.f", "lmpar.f", "lmstr1.f", "lmstr.f", "qform.f", "qrfac.f", "qrsolv.f", "r1mpyq.f", "r1updt.f", "rwupdt.f") | |
| { | |
| $filePath = Join-Path -Path "assets-cache" -ChildPath $current_file; | |
| Copy-Item -Path $filePath -Destination "minpack-builder"; | |
| } | |
| - name: Install Ninja build tool | |
| run: brew install ninja | |
| - name: Install LLVM flang | |
| run: brew install flang | |
| - name: Set shell variables to build and install directories | |
| run: | | |
| echo "BUILDDIR=$RUNNER_TEMP/build" >> $GITHUB_ENV | |
| echo "INSTALLDIR=$RUNNER_TEMP/install-llvm-flang" >> $GITHUB_ENV | |
| echo "FC=$(brew --prefix flang)/bin/flang" >> $GITHUB_ENV | |
| - name: Configure the build of minpack | |
| run: cmake -G Ninja -DBUILD_SHARED_LIBS=${{ matrix.BUILD_SHARED_LIBS }} -DBUILD_STATIC_LIBS=${{ matrix.BUILD_STATIC_LIBS }} -DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} -DUSE_DOWNLOAD=${{ matrix.USE_DOWNLOAD }} --install-prefix $INSTALLDIR -S minpack-builder -B $BUILDDIR | |
| - name: Build minpack | |
| run: cmake --build $BUILDDIR --config ${{ matrix.CMAKE_BUILD_TYPE }} | |
| - name: Install minpack | |
| run: cmake --install $BUILDDIR --config ${{ matrix.CMAKE_BUILD_TYPE }} |