Skip to content

Commit a54743b

Browse files
committed
v0.1.0 Updated CI workflow (more platforms, launching tests)
1 parent 877baaa commit a54743b

File tree

9 files changed

+104
-8
lines changed

9 files changed

+104
-8
lines changed

.github/workflows/CI.yml

Lines changed: 88 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file is autogenerated by maturin v1.8.2
22
# To update, run
33
#
4-
# maturin generate-ci -m ./greyjack/Cargo.toml github --platform manylinux
4+
# maturin generate-ci --platform all --manifest-path ./greyjack/Cargo.toml --pytest github
55
#
66
name: CI
77

@@ -43,6 +43,85 @@ jobs:
4343
with:
4444
name: wheels-linux-${{ matrix.platform.target }}
4545
path: dist
46+
- name: pytest
47+
if: ${{ startsWith(matrix.platform.target, 'x86_64') }}
48+
shell: bash
49+
run: |
50+
set -e
51+
python3 -m venv .venv
52+
source .venv/bin/activate
53+
pip install greyjack --find-links dist --force-reinstall
54+
pip install pytest
55+
cd ./greyjack && pytest
56+
57+
windows:
58+
runs-on: ${{ matrix.platform.runner }}
59+
strategy:
60+
matrix:
61+
platform:
62+
- runner: windows-latest
63+
target: x64
64+
steps:
65+
- uses: actions/checkout@v4
66+
- uses: actions/setup-python@v5
67+
with:
68+
python-version: 3.x
69+
architecture: ${{ matrix.platform.target }}
70+
- name: Build wheels
71+
uses: PyO3/maturin-action@v1
72+
with:
73+
target: ${{ matrix.platform.target }}
74+
args: --release --out dist --find-interpreter --manifest-path ./greyjack/Cargo.toml
75+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
76+
- name: Upload wheels
77+
uses: actions/upload-artifact@v4
78+
with:
79+
name: wheels-windows-${{ matrix.platform.target }}
80+
path: dist
81+
- name: pytest
82+
if: ${{ !startsWith(matrix.platform.target, 'aarch64') }}
83+
shell: bash
84+
run: |
85+
set -e
86+
python3 -m venv .venv
87+
source .venv/Scripts/activate
88+
pip install greyjack --find-links dist --force-reinstall
89+
pip install pytest
90+
cd ./greyjack && pytest
91+
92+
macos:
93+
runs-on: ${{ matrix.platform.runner }}
94+
strategy:
95+
matrix:
96+
platform:
97+
- runner: macos-13
98+
target: x86_64
99+
- runner: macos-14
100+
target: aarch64
101+
steps:
102+
- uses: actions/checkout@v4
103+
- uses: actions/setup-python@v5
104+
with:
105+
python-version: 3.x
106+
- name: Build wheels
107+
uses: PyO3/maturin-action@v1
108+
with:
109+
target: ${{ matrix.platform.target }}
110+
args: --release --out dist --find-interpreter --manifest-path ./greyjack/Cargo.toml
111+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
112+
- name: Upload wheels
113+
uses: actions/upload-artifact@v4
114+
with:
115+
name: wheels-macos-${{ matrix.platform.target }}
116+
path: dist
117+
- name: pytest
118+
run: |
119+
set -e
120+
python3 -m venv .venv
121+
source .venv/bin/activate
122+
pip install greyjack --find-links dist --force-reinstall
123+
pip install pytest
124+
cd ./greyjack && pytest
46125
47126
sdist:
48127
runs-on: ubuntu-latest
@@ -63,7 +142,7 @@ jobs:
63142
name: Release
64143
runs-on: ubuntu-latest
65144
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
66-
needs: [linux, sdist]
145+
needs: [linux, musllinux, windows, macos, emscripten, sdist]
67146
permissions:
68147
# Use to sign the release artifacts
69148
id-token: write
@@ -84,4 +163,10 @@ jobs:
84163
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
85164
with:
86165
command: upload
87-
args: --non-interactive --skip-existing wheels-*/*
166+
args: --non-interactive --skip-existing wheels-*/*
167+
- name: Upload to GitHub Release
168+
uses: softprops/action-gh-release@v1
169+
with:
170+
files: |
171+
wasm-wheels/*.whl
172+
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ There are 2 editions of GreyJack Solver:
1616

1717
# Key Features of GreyJack Solver (Rust version)
1818

19-
- **Unmatched Comfort, Expressiveness, Flexibility and speed of developing** Designed to express alomost any optimization problem with maximum comfortability and clarity.
19+
- **Unmatched Comfort, Expressiveness, Flexibility and speed of developing** Designed to express almost any optimization problem with maximum comfortability and clarity.
2020
- **Universality** Supports a wide range of constraint problems, including continuous, integer, and mixed-integer challenges. Additionally, thanks to Polars, you can optimize virtually any process that can be represented as table data.
2121
- **Python's Comfort Meets Rust's Speed** All computationally intensive parts of the solver are implemented in Rust and seamlessly integrated into Python, offering fast development cycles with production-ready performance for ~95% real-world tasks.
2222
- **Clarity and Simplicity** GreyJack provides a clear and straightforward approach to designing, implementing, and improving effective solutions for nearly any constraint problem and scenario.

greyjack/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

greyjack/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "greyjack"
3-
version = "0.0.24"
3+
version = "0.1.0"
44
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

greyjack/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ There are 2 editions of GreyJack Solver:
1616

1717
# Key Features of GreyJack Solver (Rust version)
1818

19-
- **Unmatched Comfort, Expressiveness, Flexibility and speed of developing** Designed to express alomost any optimization problem with maximum comfortability and clarity.
19+
- **Unmatched Comfort, Expressiveness, Flexibility and speed of developing** Designed to express almost any optimization problem with maximum comfortability and clarity.
2020
- **Universality** Supports a wide range of constraint problems, including continuous, integer, and mixed-integer challenges. Additionally, thanks to Polars, you can optimize virtually any process that can be represented as table data.
2121
- **Python's Comfort Meets Rust's Speed** All computationally intensive parts of the solver are implemented in Rust and seamlessly integrated into Python, offering fast development cycles with production-ready performance for ~95% real-world tasks.
2222
- **Clarity and Simplicity** GreyJack provides a clear and straightforward approach to designing, implementing, and improving effective solutions for nearly any constraint problem and scenario.

greyjack/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ features = ["pyo3/extension-module"]
77

88
[project]
99
name = "greyjack"
10-
version = "0.0.24"
10+
version = "0.1.0"
1111
requires-python = ">=3.9"
1212
dependencies = [
1313
"dill",

greyjack/tests/__init__.py

Whitespace-only changes.

greyjack/tests/unit/__init__.py

Whitespace-only changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
3+
from greyjack.score_calculation.scores.SimpleScore import SimpleScore
4+
5+
6+
def test_sum_simple_scores():
7+
8+
score_1 = SimpleScore(0)
9+
score_2 = SimpleScore(1)
10+
score_3 = score_1 + score_2
11+
assert score_3 == SimpleScore(1)

0 commit comments

Comments
 (0)