add compile -v flag to pyccel command in make file; set lower bound p… #23
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: PR - test Struphy in container | |
| on: | |
| pull_request: | |
| branches: [devel-tiny] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| permissions: | |
| contents: read | |
| jobs: | |
| test_struphy: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/struphy-hub/struphy/ubuntu-with-struphy:latest | |
| credentials: | |
| username: spossann | |
| password: ${{ secrets.GHCR_PROJECT_TOKEN }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # TODO: Make sure that struphy works with python > 3.11, keep the lower bound to 3.10 | |
| python-version: [ '3.12' ] | |
| compile_language: ['c', 'fortran'] | |
| name: Test Struphy for Python ${{ matrix.python-version }} / ${{ matrix.compile_language }} | |
| steps: | |
| - name: Check for dockerenv file | |
| run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv) | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Check .testmondata 1 | |
| run: | | |
| ls .testmon* || echo "No .testmondata" | |
| - name: Setup cache for testmon | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| .testmondata-struphy-${{ matrix.compile_language }} | |
| .testmondata-struphy-${{ matrix.compile_language }}-mpi | |
| key: testmon-struphy-${{ matrix.compile_language }}-${{ github.ref_name }}-${{ github.event.number }}-${{ github.run_number }} | |
| restore-keys: | | |
| testmon-struphy-${{ matrix.compile_language }}-${{ github.ref_name }}-${{ github.event.number }}- | |
| testmon-struphy-${{ matrix.compile_language }}-${{ github.ref_name }} | |
| testmon-struphy-${{ matrix.compile_language }}-devel | |
| testmon-struphy-${{ matrix.compile_language }}- | |
| testmon-struphy- | |
| - name: Check .testmondata 2 | |
| run: | | |
| ls .testmon* || echo "No .testmondata" | |
| # # temporary - remove after feectools merge | |
| # - name: Install Struphy in container | |
| # uses: ./.github/actions/install/struphy-in-container | |
| # with: | |
| # compile_language: ${{ matrix.compile_language }} | |
| # struphy_branch: 146-install-feectools | |
| - name: Install Psydac in container | |
| uses: ./.github/actions/install/psydac-in-container | |
| with: | |
| compile_language: ${{ matrix.compile_language }} | |
| - name: Compile all kernels | |
| run: | | |
| source /struphy_${{ matrix.compile_language }}_/env_${{ matrix.compile_language }}_/bin/activate | |
| psydac-accelerate --language ${{ matrix.compile_language }} | |
| # struphy compile --language ${{ matrix.compile_language }} | |
| - name: Run struphy unit tests | |
| env: | |
| TESTMON_DATAFILE: ${{ github.workspace }}/.testmondata-struphy-${{ matrix.compile_language }} | |
| run: | | |
| source /struphy_${{ matrix.compile_language }}_/env_${{ matrix.compile_language }}_/bin/activate | |
| struphy test Maxwell | |
| struphy test unit | |
| - name: Run struphy model tests | |
| env: | |
| TESTMON_DATAFILE: ${{ github.workspace }}/.testmondata-struphy-${{ matrix.compile_language }} | |
| run: | | |
| source /struphy_${{ matrix.compile_language }}_/env_${{ matrix.compile_language }}_/bin/activate | |
| struphy test models | |
| - name: Install mpi4py | |
| run: | | |
| source /struphy_${{ matrix.compile_language }}_/env_${{ matrix.compile_language }}_/bin/activate | |
| pip install -U mpi4py | |
| - name: Run struphy model tests with mpi | |
| env: | |
| TESTMON_DATAFILE: ${{ github.workspace }}/.testmondata-struphy-${{ matrix.compile_language }}-mpi | |
| run: | | |
| source /struphy_${{ matrix.compile_language }}_/env_${{ matrix.compile_language }}_/bin/activate | |
| struphy test Maxwell | |
| struphy test models --mpi 2 |