temporarily skip jax for fft due to a bug in deepxde #160
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
| # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
| name: CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| DDE_BACKEND: tensorflow | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.9', '3.10', '3.11', '3.12'] | |
| backend: ['tensorflow', 'jax', 'pytorch', 'paddle'] | |
| exclude: | |
| # exclude a wired bug can not import paddle | |
| - python-version: '3.12' | |
| backend: 'paddle' | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install tensorflow | |
| if: ${{matrix.backend == 'tensorflow'}} | |
| run: | | |
| python -m pip install tensorflow>=2.11.0 tensorflow-probability[tf]>=0.19.0 | |
| - name: Install jax | |
| if: ${{matrix.backend == 'jax'}} | |
| run: | | |
| python -m pip install jax flax optax | |
| - name: Install pytorch | |
| if: ${{matrix.backend == 'pytorch'}} | |
| run: | | |
| python -m pip install torch | |
| - name: Install paddle | |
| if: ${{matrix.backend == 'paddle'}} | |
| run: | | |
| python -m pip install paddlepaddle | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install flake8 pytest pytest-cov | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| python -m pip install git+https://github.com/lululxvi/deepxde.git | |
| - name: Lint with flake8 | |
| run: | | |
| # stop the build if there are Python syntax errors or undefined names | |
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
| # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
| - name: Test for ${{matrix.backend}} on ${{matrix.python-version}} | |
| env: | |
| DDE_BACKEND: ${{matrix.backend}} | |
| run: | | |
| pip list | |
| pytest --cov --junitxml=junit.xml -o junit_family=legacy | |
| - name: Upload coverage test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/test-results-action@v1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v3 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |