Skip to content

Commit

Permalink
Merge branch 'topic/default/use-transonic-0.6.0' into 'branch/default'
Browse files Browse the repository at this point in the history
Use Transonic 0.6.0 + better Github Actions

See merge request fluiddyn/fluidsim!363
  • Loading branch information
paugier committed Jan 17, 2024
2 parents 3ad0271 + c2b50f7 commit 52d26a7
Show file tree
Hide file tree
Showing 9 changed files with 4,675 additions and 96 deletions.
10 changes: 0 additions & 10 deletions .github/environment-windows.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ jobs:
run: |
cp .github/workflows/.fluidfft-site.cfg $HOME
nox -s test_without_fft_and_pythran
mv .coverage/coverage.xml coverage_without_fft_and_pythran.xml
nox -s test_with_fft_and_pythran
mv .coverage/coverage.xml coverage_with_fft_and_pythran.xml
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true # optional (default = false)
fail_ci_if_error: false # optional (default = false)
verbose: true # optional (default = false)
files: coverage_without_fft_and_pythran.xml,coverage_with_fft_and_pythran.xml
18 changes: 6 additions & 12 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,12 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
- uses: prefix-dev/setup-[email protected]
with:
environment-file: .github/environment-windows.yml
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: test
use-mamba: true
- name: Install
run: |
pip install . -v
pixi-version: v0.11.1
cache: false
- name: Tests
run: |
python -m pip install pytest-allclose pytest-mock
python -m pip install "pymech @ git+https://github.com/eX-Mech/pymech.git"
pytest -v
pixi run install-editable
pixi run pytest ./fluidsim -v
# pixi run mpirun -np 2 pytest ./fluidsim -v --exitfirst
1 change: 0 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ report_coverage:
script:
- mv $COVERAGE_DIR .coverage
- pip install coverage
- coverage combine
- coverage report


Expand Down
26 changes: 19 additions & 7 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import os
from pathlib import Path
from shutil import rmtree

import nox

Expand All @@ -14,19 +16,29 @@ def validate_code(session):
session.run("pdm", "validate_code", external=True)


def _test(session, env=None):
path_coverage = Path(".coverage")
rmtree(path_coverage, ignore_errors=True)
path_coverage.mkdir(exist_ok=True)

if env is not None:
print(env)

session.run("make", "_tests_coverage", external=True, env=env)
session.run("coverage", "combine")
session.run("coverage", "report")
session.run("coverage", "xml")


@nox.session
def test_without_fft_and_pythran(session):
command = "pdm sync --clean -G dev -G test -G mpi --no-self"
session.run_always(*command.split(), external=True)
session.install(
".", "--config-settings=setup-args=-Dtransonic-backend=python", "--no-deps"
)
session.run(
"make",
"_tests_coverage",
external=True,
env={"TRANSONIC_BACKEND": "python", "TRANSONIC_NO_REPLACE": "1"},
)

_test(session, env={"TRANSONIC_BACKEND": "python", "TRANSONIC_NO_REPLACE": "1"})


@nox.session
Expand All @@ -38,4 +50,4 @@ def test_with_fft_and_pythran(session):
session.run_always(*command.split(), external=True)
session.install(".", "--no-deps", "-C", "setup-args=-Dnative=true")

session.run("make", "_tests_coverage", external=True)
_test(session)
8 changes: 4 additions & 4 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 52d26a7

Please sign in to comment.