Make ele%space_charge_method differentially settable by different mul… #140
This file contains 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: PyTao tests | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: ${{ matrix.os }} Python ${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.12"] | |
shared: ["Y"] | |
openmp_mpi: ["N"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup-dependencies | |
with: | |
external-packages-version: ${{ env.EXTERNAL_PACKAGES_VERSION }} | |
- name: Build Bmad | |
env: | |
USE_MPI: ${{ matrix.openmp_mpi }} | |
SHARED: ${{ matrix.shared }} | |
run: .github/scripts/install_bmad.sh | |
- uses: actions/checkout@v4 | |
with: | |
repository: "bmad-sim/pytao" | |
ref: "master" | |
path: "pytao" | |
- uses: ./.github/actions/conda-setup | |
with: | |
python-version: ${{ matrix.python-version }} | |
environment-file: pytao/dev-environment.yml | |
- name: Setup ACC_ROOT_DIR | |
shell: bash -l {0} | |
run: | | |
echo "ACC_ROOT_DIR=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
- name: Regenerate Tao interface commands | |
shell: bash -l {0} | |
working-directory: ./pytao | |
run: | | |
bash scripts/bump_minimum_version.sh | |
- name: Reformat the generated source code | |
shell: bash -l {0} | |
working-directory: ./pytao | |
run: | | |
python -m pip install pre-commit | |
pre-commit run --all-files || echo "Pre-commit failed with error code $?" | |
- name: Check Python source diff | |
shell: bash -l {0} | |
working-directory: ./pytao | |
run: | | |
echo -e '## Updated Python code\n\n```' >> "$GITHUB_STEP_SUMMARY" | |
git diff | tee -a "$GITHUB_STEP_SUMMARY" | |
echo '```' >> "$GITHUB_STEP_SUMMARY" | |
- name: Run Tests | |
shell: bash -l {0} | |
working-directory: ./pytao | |
env: | |
TAO_REUSE_SUBPROCESS: 1 | |
run: | | |
echo -e '## Test results\n\n```' >> "$GITHUB_STEP_SUMMARY" | |
pytest -v --cov=pytao/ -k 'interface_commands or parse' pytao/tests 2>&1 | tee -a "$GITHUB_STEP_SUMMARY" | |
echo '```' >> "$GITHUB_STEP_SUMMARY" |