From 8597de3f5710f9a406e876fe918ae93817323782 Mon Sep 17 00:00:00 2001 From: Victor Leite Date: Tue, 13 Apr 2021 12:01:27 -0300 Subject: [PATCH] (Testing) CI-core only --- .github/workflows/asv.yml | 95 ---------------- .github/workflows/cancel.yml | 16 --- .github/workflows/docker-publish.yml | 131 ---------------------- .github/workflows/documentation.yml | 34 ------ .github/workflows/examples-mpi.yml | 66 ----------- .github/workflows/examples.yml | 88 --------------- .github/workflows/flake8.yml | 30 ----- .github/workflows/pytest-core-mpi.yml | 43 -------- .github/workflows/pytest-core-nompi.yml | 114 +++++++++---------- .github/workflows/pytest-gpu.yml | 119 -------------------- .github/workflows/pythonpublish.yml | 26 ----- .github/workflows/release-notes.yml | 16 --- .github/workflows/tutorials.yml | 139 ------------------------ 13 files changed, 57 insertions(+), 860 deletions(-) delete mode 100644 .github/workflows/asv.yml delete mode 100644 .github/workflows/cancel.yml delete mode 100644 .github/workflows/docker-publish.yml delete mode 100644 .github/workflows/documentation.yml delete mode 100644 .github/workflows/examples-mpi.yml delete mode 100644 .github/workflows/examples.yml delete mode 100644 .github/workflows/flake8.yml delete mode 100644 .github/workflows/pytest-core-mpi.yml delete mode 100644 .github/workflows/pytest-gpu.yml delete mode 100644 .github/workflows/pythonpublish.yml delete mode 100644 .github/workflows/release-notes.yml delete mode 100644 .github/workflows/tutorials.yml diff --git a/.github/workflows/asv.yml b/.github/workflows/asv.yml deleted file mode 100644 index 4856306bfdb..00000000000 --- a/.github/workflows/asv.yml +++ /dev/null @@ -1,95 +0,0 @@ -# Runner information: -# CPU: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz -# GPU: NVIDIA GeForce RTX 2060 - -name: asv-benchmarks - -env: - OUTPUT_PATH: ${{ github.workspace }} - ENVHOME: "/home/devito/environments" - -on: - workflow_dispatch: - inputs: - tags: - description: 'Run ASV' - # Trigger the workflow on push to the master branch - push: - branches: - - master - -jobs: - - # Run the asv benchmarks on the self-hosted runner - benchmarks: - name: benchmarks - runs-on: [self-hosted, asv] - - env: - DEVITO_ARCH: "gcc-9" - DEVITO_LANGUAGE: "openmp" - DEVITO_BENCHMARKS: "1" - DEVITO_LOGGING: "PERF" - OMP_NUM_THREADS: "8" - CC: "gcc-9" - CXX: "g++-9" - - steps: - - name: Checkout devito - uses: actions/checkout@v2.3.2 - - - name: Set VIRTUAL_ENV - run: | - echo "VIRTUAL_ENV=$ENVHOME/asv" >> $GITHUB_ENV - echo "PATH=$VIRTUAL_ENV/bin:$PATH" >> $GITHUB_ENV - - - name: Set PATH - run: | - echo "PATH=$VIRTUAL_ENV/bin:$PATH" >> $GITHUB_ENV - - - name: Install dependencies - run: | - pip install --upgrade pip - pip install -e . - pip install --upgrade asv - - - name: Setup asv - run: | - asv machine --config benchmarks/regression/asv.conf.json --machine i7-6700K --os ubuntu-20.10 --arch x86-64 --cpu i7-6700K --num_cpu 8 --ram 16GB - - - name: Run benchmarks - run: | - asv run -v --strict --show-stderr --config benchmarks/regression/asv.conf.json --cpu-affinity 0-7 --machine i7-6700K - - - name: Checkout asv-results branch - uses: actions/checkout@v2.3.2 - with: - ref: asv-results - clean: false - - - name: Commit benchmarks results - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add -f benchmarks/regression/.asv/results/ - git status - git commit -m "Commit ASV results" - - - name: Push benchmarks results to the asv-results branch - uses: ad-m/github-push-action@master - with: - branch: asv-results - force: true - github_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Create results (html) - run: | - asv publish --config benchmarks/regression/asv.conf.json - - - name: Deploy results to devitocodes/devito-performance/gh-pages - uses: peaceiris/actions-gh-pages@v2.5.0 - env: - ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} - EXTERNAL_REPOSITORY: devitocodes/devito-performance - PUBLISH_BRANCH: gh-pages - PUBLISH_DIR: ./benchmarks/regression/.asv/html diff --git a/.github/workflows/cancel.yml b/.github/workflows/cancel.yml deleted file mode 100644 index 252d4da389e..00000000000 --- a/.github/workflows/cancel.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Cancel - -on: [push] - -jobs: - cancel: - name: 'Cancel Previous Runs' - runs-on: ubuntu-latest - timeout-minutes: 3 - steps: - - uses: styfle/cancel-workflow-action@0.4.0 - with: - # Ids to cancel core/mpi/gpu/examples/tutorials - # https://api.github.com/repos/devitocodes/devito/actions/workflows - workflow_id: 167582, 203470, 203471, 434862, 501517 - access_token: ${{ github.token }} \ No newline at end of file diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml deleted file mode 100644 index 8ffc809ac35..00000000000 --- a/.github/workflows/docker-publish.yml +++ /dev/null @@ -1,131 +0,0 @@ -name: Publish docker image - -on: - release: - types: [published] - push: - branches: - - master # Push events on master branch - -jobs: - deploy-docker-cpu: - runs-on: ubuntu-latest - - steps: - - name: Checkout devito - uses: actions/checkout@v2 - - - name: Check event name - run: echo ${{ github.event_name }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: CPU image - if: github.event_name == 'push' - uses: docker/build-push-action@v2.2.1 - with: - context: . - file: ./docker/Dockerfile - push: true - tags: devitocodes/devito:cpu-dev - - - name: CPU image release - if: github.event_name == 'release' - uses: docker/build-push-action@v2.2.1 - with: - context: . - file: ./docker/Dockerfile - push: true - tags: | - devitocodes/devito:cpu-latest - devitocodes/devito:cpu-${{ github.event.release.tag_name }} - - deploy-docker-gpu: - runs-on: [self-hosted, gpu, docker] - - steps: - - name: Checkout devito - uses: actions/checkout@v2 - - - name: Check event name - run: echo ${{ github.event_name }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: GPU image - if: github.event_name == 'push' - uses: docker/build-push-action@v2.2.1 - with: - context: . - file: ./docker/Dockerfile.nvidia - push: true - tags: devitocodes/devito:gpu-dev - - - name: GPU image release - if: github.event_name == 'release' - uses: docker/build-push-action@v2.2.1 - with: - context: . - file: ./docker/Dockerfile.nvidia - push: true - tags: | - devitocodes/devito:gpu-latest - devitocodes/devito:gpu-${{ github.event.release.tag_name }} - - # Comment out 'cpu-latest' until next release - test-cpu-image: - needs: deploy-docker-cpu - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - #im-name: [cpu-dev, cpu-latest] - im-name: [cpu-dev] - - steps: - - name: Run simple test - run: | - docker pull 'devitocodes/devito:${{ matrix.im-name }}' - docker run --rm --name testrun 'devitocodes/devito:${{ matrix.im-name }}' pytest tests/test_operator.py - - test-gpu-image: - needs: deploy-docker-gpu - runs-on: [self-hosted, gpu, docker] - - strategy: - fail-fast: false - matrix: - #im-name: [gpu-dev, gpu-latest] - im-name: [gpu-dev] - - steps: - - name: Run simple test - run: | - docker pull 'devitocodes/devito:${{ matrix.im-name }}' - docker run --gpus all --rm --name testrun 'devitocodes/devito:${{ matrix.im-name }}' pytest tests/test_gpu_openacc.py - - # NOTE: Suitable for the time being but will need to modify when we switch runners - - name: Clean - run: | - docker system prune -a -f diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml deleted file mode 100644 index cd4055e5bc1..00000000000 --- a/.github/workflows/documentation.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Documentation - -on: - push: - branches: - - master # Push events on master branch - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: '3.x' - - name: Install Sphinx - run: | - python -m pip install --upgrade pip - pip install sphinx sphinx_rtd_theme - pip install -e . - - - name: Generate documentation - working-directory: docs - run: make html - - - name: Deploy - uses: peaceiris/actions-gh-pages@v2 - env: - PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }} - PUBLISH_BRANCH: gh-pages - PUBLISH_DIR: ./docs/_build/html diff --git a/.github/workflows/examples-mpi.yml b/.github/workflows/examples-mpi.yml deleted file mode 100644 index cd6e9eb2e71..00000000000 --- a/.github/workflows/examples-mpi.yml +++ /dev/null @@ -1,66 +0,0 @@ -# Runner information: -# CPU: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz - -name: Examples-mpi - -env: - OUTPUT_PATH: ${{ github.workspace }} - ENVHOME: "/home/devito/environments" - -on: - # Trigger the workflow on push or pull request, - # but only for the master branch - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - build: - name: Examples with mpi - runs-on: ["self-hosted", "mpi", "examples"] - - env: - DEVITO_MPI: "1" - DEVITO_LANGUAGE: "openmp" - OMP_NUM_THREADS: "2" - DEVITO_ARCH: "gcc" - CC: "gcc" - CXX: "g++" - - steps: - - name: Checkout devito - uses: actions/checkout@v2.3.2 - - # We can use the same env as for asv here - - name: Set VIRTUAL_ENV - run: | - echo "VIRTUAL_ENV=$ENVHOME/asv" >> $GITHUB_ENV - echo "PATH=$VIRTUAL_ENV/bin:$PATH" >> $GITHUB_ENV - - name: Set PATH - run: | - echo "PATH=$VIRTUAL_ENV/bin:$PATH" >> $GITHUB_ENV - - name: Install dependencies - run: | - pip install --upgrade pip - pip install -e . - - - name: Test mpi notebooks - run : | - # Currently not tested due to issue #859 - # ipcluster start --profile=mpi -n 4 --daemon - # py.test --nbval examples/mpi - # ipcluster stop --profile=mpi - - - name: Test seismic examples - run: | - mpirun -n 4 pytest examples/seismic/tti/tti_example.py - mpirun -n 4 pytest examples/seismic/elastic/elastic_example.py - mpirun -n 4 pytest examples/seismic/viscoacoustic/viscoacoustic_example.py - mpirun -n 4 pytest examples/seismic/viscoelastic/viscoelastic_example.py - - - name: Test fwi examples with mpi - run: | - mpirun -n 4 python examples/seismic/inversion/fwi.py diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml deleted file mode 100644 index 4d447b0ad16..00000000000 --- a/.github/workflows/examples.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: Examples - -on: - # Trigger the workflow on push or pull request, - # but only for the master branch - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - tutorials: - name: Examples with conda install - runs-on: ubuntu-latest - - defaults: - # Default for conda env - run: - shell: bash -l {0} - - env: - DEVITO_ARCH: gcc - DEVITO_LANGUAGE: "openmp" - PYTHON_VERSION: "3.7" - - strategy: - # Prevent all build to stop if a single one fails - fail-fast: false - - steps: - - name: Checkout devito - uses: actions/checkout@v2 - - - name: Setup conda - uses: conda-incubator/setup-miniconda@v2 - with: - activate-environment: devito - environment-file: environment-dev.yml - auto-activate-base: false - - - name: Install dependencies - run: | - pip install -e . - pip install matplotlib - - - name: Tests in examples - run: py.test --cov --cov-config=.coveragerc --cov-report=xml examples/ - - - name: Seismic acoustic examples - run: | - python examples/seismic/acoustic/acoustic_example.py --full - python examples/seismic/acoustic/acoustic_example.py --full --checkpointing - python examples/seismic/acoustic/acoustic_example.py --constant --full - python examples/seismic/acoustic/acoustic_example.py --fs - python examples/seismic/inversion/fwi.py - python examples/seismic/self_adjoint/example_iso.py - python examples/seismic/viscoacoustic/viscoacoustic_example.py - python examples/seismic/viscoacoustic/viscoacoustic_example.py -k ren - python examples/seismic/viscoacoustic/viscoacoustic_example.py -k deng_mcmechan - - - name: Seismic tti examples - run: | - python examples/seismic/tti/tti_example.py -a basic - python examples/seismic/tti/tti_example.py -a basic --noazimuth - python examples/seismic/tti/tti_example.py -k staggered - python examples/seismic/tti/tti_example.py --full -so 12 - - - name: Seismic elastic examples - run: | - python examples/seismic/elastic/elastic_example.py - python examples/seismic/viscoelastic/viscoelastic_example.py - - - name: Linear algebra example - run: | - python examples/misc/linalg.py mat-vec mat-mat-sum transpose-mat-vec - - - name: CFD examples - run: | - python examples/cfd/example_diffusion.py - - - name: Upload coverage to Codecov - if: matrix.name != 'pytest-docker-py36-gcc-omp' - uses: codecov/codecov-action@v1.0.6 - with: - token: ${{ secrets.CODECOV_TOKEN }} - name: ${{ matrix.name }} diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml deleted file mode 100644 index 72e7805a93d..00000000000 --- a/.github/workflows/flake8.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Flake8 - -on: - # Trigger the workflow on push or pull request, - # but only for the master branch - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - flake8: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 - - name: Lint with flake8 - run: | - flake8 --builtins=ArgumentError . diff --git a/.github/workflows/pytest-core-mpi.yml b/.github/workflows/pytest-core-mpi.yml deleted file mode 100644 index 202b9f9d197..00000000000 --- a/.github/workflows/pytest-core-mpi.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: CI-mpi - -on: - # Trigger the workflow on push or pull request, - # but only for the master branch - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - build: - name: pytest-mpi - runs-on: ubuntu-20.04 - - env: - DEVITO_LANGUAGE: "openmp" - DEVITO_ARCH: "gcc-9" - CC: "gcc-9" - CXX: "g++-9" - - steps: - - name: Checkout devito - uses: actions/checkout@v2 - - - name: Install dependencies - run: | - sudo apt-get update && sudo apt install mpich -y - pip3 install --upgrade pip - pip3 install -r requirements-mpi.txt - pip3 install -e .[extras] - - - name: Test with pytest - run: | - python3 -m pytest --cov --cov-config=.coveragerc --cov-report=xml -m parallel tests/ - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1.0.15 - with: - token: ${{ secrets.CODECOV_TOKEN }} - name: pytest-mpi diff --git a/.github/workflows/pytest-core-nompi.yml b/.github/workflows/pytest-core-nompi.yml index c0993063a2b..b546e1f4d6a 100644 --- a/.github/workflows/pytest-core-nompi.yml +++ b/.github/workflows/pytest-core-nompi.yml @@ -27,47 +27,47 @@ jobs: matrix: name: [ - pytest-ubuntu-py36-gcc49-omp, - pytest-ubuntu-py37-gcc5-omp, - pytest-ubuntu-py38-gcc6-omp, - pytest-ubuntu-py36-gcc7-omp, - pytest-ubuntu-py37-gcc7-noomp, - pytest-ubuntu-py37-gcc8-omp, - pytest-ubuntu-py38-gcc9-omp, - pytest-osx-py37-clang-omp, - pytest-docker-py36-gcc-omp + # pytest-ubuntu-py36-gcc49-omp, + # pytest-ubuntu-py37-gcc5-omp, + # pytest-ubuntu-py38-gcc6-omp, + # pytest-ubuntu-py36-gcc7-omp, + # pytest-ubuntu-py37-gcc7-noomp, + pytest-ubuntu-py37-gcc8-omp + # pytest-ubuntu-py38-gcc9-omp, + # pytest-osx-py37-clang-omp, + # pytest-docker-py36-gcc-omp ] set: [base, adjoint] include: - - name: pytest-ubuntu-py36-gcc49-omp - python-version: 3.6 - os: ubuntu-16.04 - arch: "gcc-4.9" - language: "openmp" - - - name: pytest-ubuntu-py37-gcc5-omp - python-version: 3.7 - os: ubuntu-18.04 - arch: "gcc-5" - language: "openmp" - - - name: pytest-ubuntu-py38-gcc6-omp - python-version: 3.8 - os: ubuntu-18.04 - arch: "gcc-6" - language: "openmp" - - - name: pytest-ubuntu-py36-gcc7-omp - python-version: 3.6 - os: ubuntu-18.04 - arch: "gcc-7" - language: "openmp" - - - name: pytest-ubuntu-py37-gcc7-noomp - python-version: 3.7 - os: ubuntu-18.04 - arch: "gcc-7" - language: "C" + # - name: pytest-ubuntu-py36-gcc49-omp + # python-version: 3.6 + # os: ubuntu-16.04 + # arch: "gcc-4.9" + # language: "openmp" + + # - name: pytest-ubuntu-py37-gcc5-omp + # python-version: 3.7 + # os: ubuntu-18.04 + # arch: "gcc-5" + # language: "openmp" + + # - name: pytest-ubuntu-py38-gcc6-omp + # python-version: 3.8 + # os: ubuntu-18.04 + # arch: "gcc-6" + # language: "openmp" + + # - name: pytest-ubuntu-py36-gcc7-omp + # python-version: 3.6 + # os: ubuntu-18.04 + # arch: "gcc-7" + # language: "openmp" + + # - name: pytest-ubuntu-py37-gcc7-noomp + # python-version: 3.7 + # os: ubuntu-18.04 + # arch: "gcc-7" + # language: "C" - name: pytest-ubuntu-py37-gcc8-omp python-version: 3.7 @@ -75,23 +75,23 @@ jobs: arch: "gcc-8" language: "openmp" - - name: pytest-ubuntu-py38-gcc9-omp - python-version: 3.8 - os: ubuntu-18.04 - arch: "gcc-9" - language: "openmp" + # - name: pytest-ubuntu-py38-gcc9-omp + # python-version: 3.8 + # os: ubuntu-18.04 + # arch: "gcc-9" + # language: "openmp" - - name: pytest-osx-py37-clang-omp - python-version: 3.7 - os: macos-latest - arch: "osx" - language: "C" + # - name: pytest-osx-py37-clang-omp + # python-version: 3.7 + # os: macos-latest + # arch: "osx" + # language: "C" - - name: pytest-docker-py36-gcc-omp - python-version: 3.6 - os: ubuntu-18.04 - arch: "gcc" - language: "openmp" + # - name: pytest-docker-py36-gcc-omp + # python-version: 3.6 + # os: ubuntu-18.04 + # arch: "gcc" + # language: "openmp" - set: base test-set: 'not adjoint' @@ -99,9 +99,9 @@ jobs: - set: adjoint test-set: 'adjoint' - exclude: - - name: pytest-osx-py37-clang-omp - set: adjoint + # exclude: + # - name: pytest-osx-py37-clang-omp + # set: adjoint steps: - name: Checkout devito @@ -149,7 +149,7 @@ jobs: - name: Test with pytest run: | - ${{ steps.set-run.outputs.RUN_CMD }} pytest -k "${{ matrix.test-set }}" -m "not parallel" --cov --cov-config=.coveragerc --cov-report=xml ${{ steps.set-tests.outputs.TESTS }} + ${{ steps.set-run.outputs.RUN_CMD }} pytest --maxfail=100 -k "${{ matrix.test-set }}" -m "not parallel" --cov --cov-config=.coveragerc --cov-report=xml ${{ steps.set-tests.outputs.TESTS }} - name: Upload coverage to Codecov if: matrix.name != 'pytest-docker-py36-gcc-omp' diff --git a/.github/workflows/pytest-gpu.yml b/.github/workflows/pytest-gpu.yml deleted file mode 100644 index 0c41ee49d53..00000000000 --- a/.github/workflows/pytest-gpu.yml +++ /dev/null @@ -1,119 +0,0 @@ -# Runner information: -# OpenACC on NVidia runs on `sarlaac` -# OpenMP on NVidia runs on `kimogila` - -name: CI-gpu - -env: - OUTPUT_PATH: ${{ github.workspace }} - RESOURCE_GROUP: CI-gpu - -on: - # Trigger the workflow on push or pull request, - # but only for the master branch - push: - branches: - - master - pull_request: - branches: - - master - # Push-button activation - workflow_dispatch: - inputs: - tags: - description: 'Run GPU tests' - -jobs: - - build: - name: ${{ matrix.name }} - runs-on: ${{ matrix.tags }} - - env: - DEVITO_ARCH: ${{ matrix.arch }} - DEVITO_PLATFORM: ${{ matrix.platform }} - DEVITO_LANGUAGE: ${{ matrix.language }} - OMPI_CC: ${{ matrix.arch }} - - strategy: - # Prevent all builds from terminating if one fails - fail-fast: false - - matrix: - name: [ - # NOTE: We can re-instate this as a 'failing' build - # as soon as the hardware is ready - pytest-gpu-omp, - pytest-gpu-acc - # pytest-gpu-aomp - ] - include: - - name: pytest-gpu-omp - test_file: "tests/test_gpu_openmp.py" - env_file: "devito-ci-nvidia-openmp.env" - test_drive_cmd: "nvidia-smi" - arch: "clang" - platform: "nvidiaX" - language: "openmp" - tags: ["self-hosted", "gpu", "openmp"] - - - name: pytest-gpu-acc - test_file: "tests/test_gpu_openacc.py" - env_file: "devito-ci-nvidia-openacc.env" - test_drive_cmd: "nvidia-smi" - arch: "nvcc" - platform: "nvidiaX" - language: "openacc" - tags: ["self-hosted", "gpu", "openacc"] - - # - name: pytest-gpu-aomp - # test_file: "tests_gpu_aomp.py" - # env_file: "devito-ci-amd-openmp.py" - # test_drive_cmd: "TODO" - # arch: "aomp" - # platform: "amdgpuX" - # language: "openmp" - # tags: ["self-hosted", "gpu", "aomp"] - - steps: - - name: Checkout devito - uses: actions/checkout@v1 - - - name: Set environment - run: | - source $HOME/${{ matrix.env_file }} - echo "PATH=$PATH" >> $GITHUB_ENV - echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV - - - name: Install dependencies - run: | - pip3 install --upgrade pip - pip3 install -e .[extras] - - - name: Test with pytest - run: | - ${{ matrix.test_drive_cmd }} - pytest --cov --cov-config=.coveragerc --cov-report=xml tests/test_adjoint.py tests/test_gpu_common.py - pytest --cov --cov-config=.coveragerc --cov-report=xml ${{ matrix.test_file }} - - - name: Test examples - run: | - pytest examples/seismic/acoustic/acoustic_example.py - pytest examples/seismic/elastic/elastic_example.py - pytest examples/seismic/tti/tti_example.py - pytest examples/seismic/viscoacoustic/viscoacoustic_example.py - pytest examples/seismic/viscoelastic/viscoelastic_example.py - - - name: Test examples with MPI - run: | - DEVITO_MPI=1 mpirun -n 2 pytest examples/seismic/acoustic/acoustic_example.py - DEVITO_MPI=1 mpirun -n 2 pytest examples/seismic/elastic/elastic_example.py - DEVITO_MPI=1 mpirun -n 2 pytest examples/seismic/tti/tti_example.py - DEVITO_MPI=1 mpirun -n 2 pytest examples/seismic/viscoacoustic/viscoacoustic_example.py - DEVITO_MPI=1 mpirun -n 2 pytest examples/seismic/viscoelastic/viscoelastic_example.py - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1.0.6 - with: - token: ${{ secrets.CODECOV_TOKEN }} - name: ${{ matrix.name }} diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml deleted file mode 100644 index 6ae0f327959..00000000000 --- a/.github/workflows/pythonpublish.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Upload to PyPI - -on: - release: - types: [published] - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* diff --git a/.github/workflows/release-notes.yml b/.github/workflows/release-notes.yml deleted file mode 100644 index 2c30bcdb18e..00000000000 --- a/.github/workflows/release-notes.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Release Drafter - -on: - push: - # branches to consider in the event; optional, defaults to all - branches: - - master - -jobs: - update_release_draft: - runs-on: ubuntu-latest - steps: - # Drafts your next Release notes as Pull Requests are merged into "master" - - uses: release-drafter/release-drafter@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tutorials.yml b/.github/workflows/tutorials.yml deleted file mode 100644 index 721be93ab7e..00000000000 --- a/.github/workflows/tutorials.yml +++ /dev/null @@ -1,139 +0,0 @@ -name: Jupyter Notebooks - -on: - # Trigger the workflow on push or pull request, - # but only for the master branch - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - tutorials: - name: ${{ matrix.name }} - runs-on: ${{ matrix.os }} - - env: - DEVITO_ARCH: "${{ matrix.compiler }}" - DEVITO_LANGUAGE: ${{ matrix.language }} - PYTHON_VERSION: "3.7" - - strategy: - # Prevent all build to stop if a single one fails - fail-fast: false - matrix: - name: [ - tutos-ubuntu-gcc-py37, - tutos-osx-gcc-py37, - tutos-osx-clang-py37, - tutos-docker-gcc-py36 - ] - - include: - - name: tutos-ubuntu-gcc-py37 - os: ubuntu-16.04 - compiler: gcc - language: "openmp" - - - name: tutos-osx-gcc-py37 - os: macos-latest - compiler: gcc-9 - language: "openmp" - - - name: tutos-osx-clang-py37 - os: macos-latest - compiler: clang - language: "C" - - - name: tutos-docker-gcc-py36 - os: ubuntu-latest - compiler: gcc - language: "openmp" - - steps: - - name: Checkout devito - uses: actions/checkout@v1 - - - name: Set up Python 3.7 - if: matrix.name != 'tutos-docker-gcc-py36' - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - - name: Install compilers for OSX - if: runner.os == 'macOS' - run: | - if [ "${{ matrix.compiler }}" = "gcc-9" ]; then - brew install gcc@9 - else - sudo xcode-select -s /Applications/Xcode_12.2.app/Contents/Developer - fi - - - name: Build docker image - if: matrix.name == 'tutos-docker-gcc-py36' - run: | - docker build . --file docker/Dockerfile --tag devito_img - - - name: Set run prefix - run: | - if [ "${{ matrix.name }}" == 'tutos-docker-gcc-py36' ]; then - echo "::set-output name=RUN_CMD::docker run --rm --name testrun devito_img" - else - echo "::set-output name=RUN_CMD::" - fi - id: set-run - - - name: Install dependencies - if: matrix.name != 'tutos-docker-gcc-py36' - run: | - python -m pip install --upgrade pip - pip install -e . - pip install matplotlib blosc - - - name: Seismic notebooks - run: | - ${{ steps.set-run.outputs.RUN_CMD }} py.test --nbval --cov . --cov-config=.coveragerc --cov-report=xml:seis_coverage.xml -k 'not dask' examples/seismic/tutorials/ # Horrible, but we're still at a loss - ${{ steps.set-run.outputs.RUN_CMD }} py.test --nbval --cov . --cov-config=.coveragerc --cov-report=xml:acc_coverage.xml examples/seismic/acoustic/accuracy.ipynb - - - name: Dask notebooks - if: runner.os != 'macOS' - run: | - ${{ steps.set-run.outputs.RUN_CMD }} py.test --nbval --cov . --cov-config=.coveragerc --cov-report=xml:seis_coverage.xml examples/seismic/tutorials/*dask*.ipynb - - - name: Self-adjoint notebooks - run: | - ${{ steps.set-run.outputs.RUN_CMD }} py.test --nbval --cov . --cov-config=.coveragerc --cov-report=xml:sa_coverage.xml examples/seismic/self_adjoint/ - - - name: CFD notebooks - run: | - ${{ steps.set-run.outputs.RUN_CMD }} py.test --nbval --cov . --cov-config=.coveragerc --cov-report=xml:cfd_coverage.xml examples/cfd - - - name: User api notebooks - run: | - ${{ steps.set-run.outputs.RUN_CMD }} py.test --nbval --cov . --cov-config=.coveragerc --cov-report=xml:api_coverage.xml examples/userapi - - - name: Compiler notebooks - run: | - ${{ steps.set-run.outputs.RUN_CMD }} py.test --nbval --cov . --cov-config=.coveragerc --cov-report=xml:comp_coverage.xml examples/compiler - - - name: Finance notebooks - run: | - ${{ steps.set-run.outputs.RUN_CMD }} py.test --nbval --cov . --cov-config=.coveragerc --cov-report=xml:comp_coverage.xml examples/finance - - - name: Performance notebooks - run: | - ${{ steps.set-run.outputs.RUN_CMD }} py.test --nbval --cov . --cov-config=.coveragerc --cov-report=xml:comp_coverage.xml examples/performance - - - name: ABC Notebooks - run: | - ${{ steps.set-run.outputs.RUN_CMD }} py.test --nbval --cov . --cov-config=.coveragerc --cov-report=xml:comp_coverage.xml examples/seismic/abc_methods - - - name: Upload coverage to Codecov - if: matrix.name != 'tutos-docker-gcc-py36' - uses: codecov/codecov-action@v1.0.6 - with: - token: ${{ secrets.CODECOV_TOKEN }} - name: ${{ matrix.name }} - file: ./*_coverage.xml