Adding an example that shows the usage of jax in a MSP hfun #730
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
| # ----- IBCDFO FULL TESTING OF INSTALLED PACKAGE WITHOUT COVERAGE | |
| name: Test IBCDFO Python Package | |
| env: | |
| GH_ACTIONS_PATH: ${{ github.workspace }}/.github/workflows | |
| MINQ_COMMIT_FILE: ${{ github.workspace }}/REQUIRED_MINQ_COMMIT | |
| IBCDFO_PKG: ${{ github.workspace }}/ibcdfo_pypkg | |
| BENDFO_PY_PATH: ${{ github.workspace }}/BenDFO/py | |
| MINQ5_PY_PATH: ${{ github.workspace }}/MINQ/py/minq5 | |
| on: | |
| # This action is used only to run a significant but smallish set of test | |
| # setups on feature branches. | |
| # | |
| # More thorough testing is done on main with the release action as part of | |
| # creating and verifying potential release candidate distributions. | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| # ----- LOAD OFFICIAL MINQ COMMIT INFO FOR PROPER SETUP FOR IBCDFO | |
| # Load this eagerly so that it is available for immediate use in all | |
| # subsequent jobs. | |
| load_minq_sha: | |
| outputs: | |
| minq_sha: ${{ steps.load_sha.outputs.minq_sha }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout IBCDFO repository | |
| uses: actions/checkout@v6 | |
| - name: Load Official MINQ SHA | |
| id: load_sha | |
| run: | | |
| MINQ_SHA=$(cat $MINQ_COMMIT_FILE) | |
| echo "The valid MINQ commit hash is $MINQ_SHA" | |
| echo "minq_sha=$MINQ_SHA" >> "$GITHUB_OUTPUT" | |
| test_ibcdfo: | |
| strategy: | |
| # python-versions must be maintained consistent with associated | |
| # pyproject.toml and tox.ini configuration. | |
| # | |
| # TODO: Strange failures on macos-15-intel and macos-26-intel prevent its | |
| # use (Issue 235). This means that this action is **not** running any mac | |
| # tests using Intel chips. | |
| matrix: | |
| os: [ubuntu-22.04, ubuntu-24.04, macos-14, macos-15, macos-26] | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| runs-on: ${{ matrix.os }} | |
| needs: load_minq_sha | |
| env: | |
| MINQ_SHA: ${{ needs.load_minq_sha.outputs.minq_sha }} | |
| steps: | |
| # -- General Setup Steps | |
| - name: Checkout IBCDFO repository | |
| uses: actions/checkout@v6 | |
| - name: Checkout MINQ repository | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: POptUS/MINQ | |
| path: MINQ | |
| ref: ${{ env.MINQ_SHA }} | |
| - name: Checkout BenDFO repository | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: POptUS/BenDFO | |
| path: BenDFO | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Setup Python with tox | |
| run: $GH_ACTIONS_PATH/setup_tox_github_action.sh ${{ runner.os }} | |
| # -- Run test suite through installation | |
| # The tox task downloads dfo.dat automatically | |
| - name: Test IBCDFO Python package | |
| run: | | |
| export PYTHONPATH=$BENDFO_PY_PATH:$MINQ5_PY_PATH | |
| echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV | |
| pushd $IBCDFO_PKG | |
| tox -r -e nocoverage | |
| popd |