Development #11
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: run-python-build | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - development | |
| types: | |
| - opened | |
| - synchronize | |
| paths: | |
| - ".github/workflows/python.yml" | |
| - "CMakeLists.txt" | |
| - "pyproject.toml" | |
| - "src/*.py" | |
| - "**.f90" | |
| - "**.F90" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: python | |
| cancel-in-progress: false | |
| jobs: | |
| build-and-test-python-debug: | |
| environment: | |
| name: github-pages | |
| name: Build and test in debug mode | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| python-version: [ "3.11", "3.12", "3.13" ] | |
| toolchain: | |
| - {fortran-compiler: gcc, fc-version: 13} | |
| # - {compiler: intel, version: '2024.1'} | |
| # - {compiler: intel-classic, version: '2021.10'} | |
| # exclude: | |
| # - os: macos-latest | |
| # toolchain: {compiler: intel, version: '2024.1'} | |
| # - os: macos-latest | |
| # toolchain: {compiler: intel-classic, version: '2021.10'} | |
| steps: | |
| - name: checkout repo | |
| uses: actions/checkout@v4 | |
| - name: actions-setup-python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: actions-setup-cmake | |
| uses: jwlawson/actions-setup-cmake@v2.0.1 | |
| with: | |
| cmake-version: '3.24.x' | |
| - uses: fortran-lang/setup-fortran@v1 | |
| id: setup-fortran | |
| with: | |
| compiler: ${{ matrix.toolchain.fortran-compiler }} | |
| version: ${{ matrix.toolchain.fc-version }} | |
| - name: Install python dependencies | |
| run: | | |
| python --version | |
| python -m pip install pip-tools | |
| python -m pip install pytest | |
| python -m piptools compile -o requirements.txt pyproject.toml --all-build-deps | |
| python -m pip install -r requirements.txt | |
| - name: Compile | |
| run: | | |
| cmake --version | |
| python --version | |
| ${{ env.FC }} --version | |
| python -m pip install . | |
| - name: Test | |
| run: | | |
| ${{ env.FC }} --version | |
| python -m pytest |