-
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
200 additions
and
6 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,11 @@ | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
groups: | ||
actions: | ||
patterns: | ||
- "*" |
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,48 @@ | ||
name: Conda | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ["3.8", "3.10"] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
# The setup-miniconda action needs this to activate miniconda | ||
defaults: | ||
run: | ||
shell: "bash -l {0}" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get conda | ||
uses: conda-incubator/setup-miniconda@v3.0.3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
channels: conda-forge | ||
|
||
- name: Prepare | ||
run: conda install conda-build conda-verify | ||
|
||
- name: Build | ||
run: conda build conda.recipe | ||
|
||
- name: Install | ||
run: conda install -c ${CONDA_PREFIX}/conda-bld/ whr | ||
|
||
- name: Test | ||
run: python tests/test_whr.py |
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,70 @@ | ||
name: Pip | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [windows-latest, macos-latest, ubuntu-latest] | ||
python-version: ["3.7", "3.11"] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Add requirements | ||
run: python -m pip install --upgrade wheel setuptools | ||
|
||
- name: Build and install | ||
run: pip install --verbose . | ||
|
||
- name: Test | ||
run: python tests/test_whr.py | ||
|
||
build-mingw64: | ||
runs-on: windows-latest | ||
defaults: | ||
run: | ||
shell: msys2 {0} | ||
steps: | ||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
update: true | ||
install: >- | ||
mingw-w64-x86_64-gcc | ||
mingw-w64-x86_64-python-pip | ||
mingw-w64-x86_64-python-wheel | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install pybind11 | ||
# This is required because --no-build-isolation disable dependences | ||
# installation | ||
run: pip install pybind11 | ||
|
||
- name: Build and install | ||
# --no-build-isolation is required because the vanilla setuptool does not | ||
# support Mingw64.See patches here: | ||
# https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-python-setuptools | ||
# Without those patches build_ext fails with: | ||
# error: --plat-name must be one of ('win32', 'win-amd64', 'win-arm32', 'win-arm64') | ||
run: pip install --no-build-isolation . | ||
|
||
- name: Test | ||
run: python tests/test_whr.py |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package: | ||
name: whr | ||
version: 2.0.3 | ||
|
||
source: | ||
path: .. | ||
|
||
build: | ||
number: 0 | ||
script: {{ PYTHON }} -m pip install . -vvv | ||
|
||
requirements: | ||
build: | ||
- {{ compiler('cxx') }} | ||
|
||
host: | ||
- python | ||
- pip | ||
- pybind11 >=2.10.0 | ||
|
||
run: | ||
- python | ||
|
||
|
||
test: | ||
imports: | ||
- whr | ||
source_files: | ||
- tests | ||
commands: | ||
- python tests/test_whr.py | ||
|
||
about: | ||
summary: A Python interface incorporating a C++ implementation of the Whole History Rating algorithm | ||
license_file: LICENSE |
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