-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
150 additions
and
42 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: CI Linux | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- name: apt install | ||
run: | | ||
sudo apt install -y libopenmpi-dev | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pdm nox | ||
- name: Test with nox | ||
run: | | ||
nox -s test_without_pythran test_with_pythran | ||
- uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
fail_ci_if_error: false # optional (default = false) | ||
verbose: true # optional (default = false) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: CI-windows | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
tests: | ||
runs-on: windows-2022 | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
strategy: | ||
matrix: | ||
python-version: ["3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
environment-file: .github/environment-windows.yml | ||
miniforge-variant: Mambaforge | ||
miniforge-version: latest | ||
activate-environment: test | ||
use-mamba: true | ||
- name: Install | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pdm nox | ||
- name: Tests | ||
run: | | ||
nox -s test_without_pythran test_with_pythran |
This file contains 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 file contains 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 file contains 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 file contains 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 file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM python:3.10-bullseye | ||
FROM python:3.10 | ||
LABEL Pierre Augier <[email protected]> | ||
|
||
COPY docker/hgrc $HOME/.hgrc | ||
|
@@ -12,10 +12,23 @@ RUN apt-get install -y --no-install-recommends rsync libgl1 xvfb xauth libgl1-me | |
|
||
RUN rm -rf /var/lib/apt/lists/* | ||
|
||
RUN groupadd -g 1000 appuser && useradd -m -r -u 1000 -g appuser -s /bin/bash appuser -s /bin/bash && usermod -a -G sudo appuser | ||
RUN echo appuser:appuser | chpasswd | ||
USER appuser | ||
ARG HOME=/home/appuser | ||
RUN mkdir -p $HOME/opt | ||
WORKDIR $HOME/opt | ||
RUN echo $USER $HOME $PWD && whoami | ||
|
||
ENV PIP_BREAK_SYSTEM_PACKAGES=1 | ||
|
||
RUN $(hg debuginstall -T '{pythonexe}') -m pip install hg-evolve hg-git --no-cache-dir --user | ||
|
||
COPY --chown=appuser:appuser docker/hgrc $HOME/.hgrc | ||
|
||
RUN mkdir -p $HOME/.config/matplotlib | ||
RUN echo 'backend : agg' > $HOME/.config/matplotlib/matplotlibrc | ||
|
||
RUN /usr/bin/python3 -m pip install hg-git hg-evolve | ||
RUN git config --global pull.rebase false | ||
|
||
RUN /usr/bin/python3 -m pip install pdm | ||
RUN python -m pip install pdm nox |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import os | ||
|
||
import nox | ||
|
||
os.environ.update({"PDM_IGNORE_SAVED_PYTHON": "1"}) | ||
|
||
|
||
def _test(session): | ||
session.run("make", "tests_ipynb", external=True) | ||
session.run("make", "tests_coverage", external=True) | ||
|
||
|
||
def _install_base(session): | ||
command = "pdm install -G base_test" | ||
session.run_always(*command.split(), external=True) | ||
|
||
|
||
@nox.session | ||
def test_without_pythran(session): | ||
_install_base(session) | ||
_test(session) | ||
|
||
|
||
@nox.session | ||
def test_with_pythran(session): | ||
_install_base(session) | ||
session.install("pythran") | ||
_test(session) | ||
|
||
|
||
@nox.session | ||
def test_with_cython(session): | ||
_install_base(session) | ||
session.install("cython") | ||
_test(session) | ||
|
||
|
||
@nox.session | ||
def test_with_pythran_cython(session): | ||
_install_base(session) | ||
session.install("pythran", "cython") | ||
_test(session) |
This file contains 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