compiler: fix msd thickness lowering #274
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: CI-core | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| # Trigger the workflow on push or pull request, but only for the main branch | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| test-nompi-basic: | |
| name: ${{ matrix.name }}-${{ matrix.set }} | |
| runs-on: "${{ matrix.os }}" | |
| env: | |
| DEVITO_ARCH: "${{ matrix.arch }}" | |
| DEVITO_LANGUAGE: ${{ matrix.language }} | |
| OMP_NUM_THREADS: 2 | |
| strategy: | |
| # Prevent cancellation if a single workflow fails | |
| fail-fast: false | |
| matrix: | |
| name: [ | |
| pytest-osx-py312-clang-omp, | |
| pytest-ubuntu-py310-gcc14-omp, | |
| pytest-ubuntu-py310-gcc9-omp, | |
| pytest-ubuntu-py311-gcc10-noomp, | |
| pytest-ubuntu-py311-gcc11-cxxnoomp, | |
| pytest-ubuntu-py312-gcc12-cxxomp, | |
| pytest-ubuntu-py312-gcc13-omp, | |
| pytest-ubuntu-py313-gcc14-omp | |
| ] | |
| set: [base, adjoint] | |
| include: | |
| - name: pytest-ubuntu-py311-gcc11-cxxnoomp | |
| python-version: '3.11' | |
| os: ubuntu-22.04 | |
| arch: "gcc-11" | |
| language: "CXX" | |
| sympy: "1.14" | |
| - name: pytest-ubuntu-py312-gcc12-cxxomp | |
| python-version: '3.12' | |
| os: ubuntu-24.04 | |
| arch: "gcc-12" | |
| language: "CXXopenmp" | |
| sympy: "1.13" | |
| - name: pytest-ubuntu-py310-gcc14-omp | |
| python-version: '3.10' | |
| os: ubuntu-24.04 | |
| arch: "gcc-14" | |
| language: "openmp" | |
| sympy: "1.12" | |
| - name: pytest-ubuntu-py311-gcc10-noomp | |
| python-version: '3.11' | |
| os: ubuntu-22.04 | |
| arch: "gcc-10" | |
| language: "C" | |
| sympy: "1.14" | |
| - name: pytest-ubuntu-py312-gcc13-omp | |
| python-version: '3.12' | |
| os: ubuntu-24.04 | |
| arch: "gcc-13" | |
| language: "openmp" | |
| sympy: "1.13" | |
| - name: pytest-ubuntu-py310-gcc9-omp | |
| python-version: '3.10' | |
| os: ubuntu-22.04 | |
| arch: "custom" | |
| language: "openmp" | |
| sympy: "1.12" | |
| - name: pytest-osx-py312-clang-omp | |
| python-version: '3.12' | |
| os: macos-latest | |
| arch: "clang" | |
| language: "openmp" | |
| sympy: "1.12" | |
| - name: pytest-ubuntu-py313-gcc14-omp | |
| python-version: '3.13' | |
| os: ubuntu-24.04 | |
| arch: "gcc-14" | |
| language: "openmp" | |
| sympy: "1.14" | |
| - set: base | |
| test-set: 'not adjoint' | |
| - set: adjoint | |
| test-set: 'adjoint' | |
| exclude: | |
| - name: pytest-osx-py312-clang-omp | |
| set: adjoint | |
| steps: | |
| - name: Checkout devito | |
| uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: Install ${{ matrix.arch }} compiler | |
| if: "runner.os == 'linux' && matrix.arch !='custom' " | |
| run : | | |
| sudo apt-get install -y ${{ matrix.arch }} | |
| - name: Set tests (reduced number for OSX) | |
| run : | | |
| if [ "${{ runner.os }}" == 'macOS' ]; then | |
| brew install llvm libomp | |
| echo "/opt/homebrew/opt/llvm/bin" >> "$GITHUB_PATH" | |
| fi | |
| id: set-tests | |
| - name: Set pip flags for latest python (3.12) | |
| run: | | |
| ver="${{ matrix.python-version }}" | |
| major=${ver%%.*} | |
| minor=${ver#*.}; minor=${minor%%.*} | |
| if [ "$major" -eq 3 ] && [ "$minor" -ge 12 ]; then | |
| echo "PIPFLAGS='--break-system-packages'" >> "$GITHUB_ENV" | |
| fi | |
| - name: Install dependencies | |
| run: | | |
| python3 -m pip install ${{ env.PIPFLAGS }} --upgrade pip | |
| python3 -m pip install ${{ env.PIPFLAGS }} -e ".[tests,extras]" | |
| python3 -m pip install ${{ env.PIPFLAGS }} sympy==${{matrix.sympy}} | |
| - name: Backward compat for numpy 1.26 | |
| if: matrix.name == 'pytest-ubuntu-py310-gcc14-omp' | |
| run: python3 -m pip install ${{ env.PIPFLAGS }} numpy==1.26 | |
| - name: Check configuration | |
| run: | | |
| python3 \ | |
| -c "from devito import configuration; \ | |
| print(''.join(['%s: %s \n' % (k, v) for (k, v) in configuration.items()]))" | |
| - name: Test with pytest | |
| run: | | |
| pytest \ | |
| -v \ | |
| -k "${{ matrix.test-set }}" \ | |
| -m "not parallel" \ | |
| --cov \ | |
| --cov-config=.coveragerc \ | |
| --cov-report=xml \ | |
| tests/ | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| name: ${{ matrix.name }} | |
| test-nompi-docker: | |
| name: ${{ matrix.name }}-${{ matrix.set }} | |
| runs-on: "${{ matrix.os }}" | |
| env: | |
| DEVITO_ARCH: "${{ matrix.arch }}" | |
| DEVITO_LANGUAGE: ${{ matrix.language }} | |
| OMP_NUM_THREADS: 2 | |
| strategy: | |
| # Prevent cancellation if a single workflow fails | |
| fail-fast: false | |
| matrix: | |
| name: [ | |
| pytest-docker-py310-gcc-omp, | |
| pytest-docker-py310-gcc-omp-arm64, | |
| pytest-docker-py310-icx-omp, | |
| ] | |
| set: [base, adjoint] | |
| include: | |
| - name: pytest-docker-py310-gcc-omp | |
| python-version: '3.10' | |
| os: ubuntu-latest | |
| arch: "gcc" | |
| language: "openmp" | |
| sympy: "1.13" | |
| - name: pytest-docker-py310-gcc-omp-arm64 | |
| python-version: '3.10' | |
| os: ubuntu-24.04-arm | |
| arch: "gcc" | |
| language: "openmp" | |
| sympy: "1.13" | |
| - name: pytest-docker-py310-icx-omp | |
| python-version: '3.10' | |
| os: ubuntu-latest | |
| arch: "icx" | |
| language: "openmp" | |
| sympy: "1.13" | |
| - set: base | |
| test-set: 'not adjoint' | |
| - set: adjoint | |
| test-set: 'adjoint' | |
| steps: | |
| - name: Checkout devito | |
| uses: actions/checkout@v6 | |
| - id: build | |
| name: Build docker image | |
| uses: ./.github/actions/docker-build | |
| with: | |
| file: docker/Dockerfile.devito | |
| tag: ${{ matrix.name }} | |
| base: devitocodes/bases:cpu-${{ matrix.arch }} | |
| - name: Test with pytest | |
| uses: ./.github/actions/docker-run | |
| with: | |
| uid: ${{ steps.build.outputs.unique }} | |
| tag: ${{ matrix.name }} | |
| env: | | |
| CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} | |
| command: | | |
| pytest \ | |
| -v \ | |
| -k "${{ matrix.test-set }}" \ | |
| -m "not parallel" \ | |
| --cov \ | |
| --cov-config=.coveragerc \ | |
| --cov-report=xml \ | |
| tests/ | |
| - name: Cleanup docker image | |
| if: always() | |
| uses: ./.github/actions/docker-clean | |
| with: | |
| uid: ${{ steps.build.outputs.unique }} | |
| tag: ${{ matrix.name }} |