more polish for #297 #53
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: macOS Intel | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| # macOS 13 is the latest GitHub action runner with Intel | |
| # https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories | |
| runs-on: macos-13 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Checkout tools repo | |
| uses: actions/checkout@v3 | |
| with: | |
| repository: HydrologicEngineeringCenter/dss-test-data | |
| path: dss-test-data | |
| # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable | |
| - name: Setup environment variables | |
| run: | | |
| echo "JAVA_HOME=$JAVA_HOME_21_X64" >> "$GITHUB_ENV" | |
| GFORTRAN_DYLIB=$(otool -D "$(gfortran-14 -print-file-name=libgfortran.dylib)" | tail -n +2) | |
| echo "GFORTRAN_DYLIB=$GFORTRAN_DYLIB" >> "$GITHUB_ENV" | |
| GFORTRAN_PATH=$(dirname "$GFORTRAN_DYLIB") | |
| echo "GFORTRAN_PATH=$GFORTRAN_PATH" >> "$GITHUB_ENV" | |
| - name: Build main library | |
| run: | | |
| ln -sfn "$(which gfortran-14)" /usr/local/bin/gfortran | |
| echo JAVA_HOME: $JAVA_HOME | |
| echo GFORTRAN_PATH: $GFORTRAN_PATH | |
| gfortran --version | |
| cd heclib | |
| make | |
| - name: Patch javaHeclib | |
| run: | | |
| cd heclib | |
| sh macOS-patch-javaHeclib.sh | |
| - name: Build and run basic C test programs | |
| run: | | |
| cd test/C | |
| ./unix_test | |
| - name: Build and run Dss-C test program | |
| run: | | |
| cd test/Dss-C | |
| make test | |
| # Save some artifacts | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dss | |
| path: | | |
| ${{ github.workspace }}/heclib/Output/Patched/javaHeclib.zip |