Compare commits

...

12 commits

Author SHA1 Message Date
b1d49624d4
Merge branch 'actions'
Some checks failed
CI / Formatting (push) Successful in 39s
CI / Clippy (push) Failing after 55s
CI / Build (push) Successful in 1m26s
CI / Python tests (push) Successful in 41s
CI / Rust tests (push) Successful in 1m17s
2025-02-23 09:29:39 -05:00
e99d8b3513
Re-enable other CI jobs
Some checks failed
CI / Formatting (push) Successful in 40s
CI / Clippy (push) Failing after 54s
CI / Build (push) Successful in 1m34s
CI / Python tests (push) Successful in 36s
CI / Rust tests (push) Successful in 1m26s
2025-02-23 09:16:50 -05:00
88c4fa428a
Remove action debug commands 2025-02-23 09:15:59 -05:00
4b3a45463e
Try to fix wheel artifact transfer
All checks were successful
CI / Build (push) Successful in 1m33s
CI / Python tests (push) Successful in 39s
2025-02-23 09:11:28 -05:00
ead4d5549c
Temporarily disable Rust tests for brevity 2025-02-23 09:10:08 -05:00
b390cd81c7
Move Python tests into their own job
Some checks failed
CI / Build (and tests, for now) (push) Successful in 1m37s
CI / Python tests (push) Failing after 44s
CI / Rust tests (push) Successful in 1m23s
2025-02-23 09:03:44 -05:00
b70b9a716a
Temporarily disable lints for brevity 2025-02-23 08:51:35 -05:00
e0131a1bfa
Add the Python toolchain to Rust tests 2025-02-23 08:48:23 -05:00
6b929834b7
Split Rust test into separate job
Some checks failed
CI / Formatting (push) Successful in 35s
CI / Clippy (push) Successful in 38s
CI / Build (and tests, for now) (push) Successful in 1m30s
CI / Rust test (push) Failing after 58s
2025-02-23 08:42:46 -05:00
d0e0f6af4f
Call maturin from venv
All checks were successful
CI / Formatting (push) Successful in 39s
CI / Clippy (push) Successful in 38s
CI / Build (and tests, for now) (push) Successful in 1m52s
2025-02-23 07:45:50 -05:00
4354000e33
Set up venv
Some checks failed
CI / Formatting (push) Successful in 39s
CI / Clippy (push) Successful in 37s
CI / Build (and tests, for now) (push) Failing after 1m1s
2025-02-23 07:35:40 -05:00
459dc4b588
Try using new runner image
Some checks failed
CI / Formatting (push) Successful in 39s
CI / Clippy (push) Successful in 37s
CI / Build (and tests, for now) (push) Failing after 59s
2025-02-23 07:30:13 -05:00

View file

@ -6,7 +6,7 @@ name: CI
jobs:
formatting:
name: Formatting
runs-on: docker
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
@ -19,7 +19,7 @@ jobs:
clippy:
name: Clippy
runs-on: docker
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
@ -32,40 +32,63 @@ jobs:
build:
name: Build
runs-on: docker
runs-on: ubuntu-22.04
steps:
- name: Checkout
- name: Checkout the code
uses: actions/checkout@v4
# TODO: Find some other method of managing this that doesn't require me to set stuff up myself
- name: Set up Python toolchain
uses: actions/setup-python@v5
with:
cache: pip
- name: Set up Python environment
run: |
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
python3 -m pip install virtualenv
python3 -m virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
- name: Set up Rust
uses: https://github.com/dtolnay/rust-toolchain@stable
- name: Set up the Python toolchain
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Set up the Python environment
# For most Python CI stuff this isn't needed, but maturin specifically doesn't like to function without a venv
run: |
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- name: Build Rust code
run: |
source venv/bin/activate
maturin develop
maturin build
- name: Save built wheel
uses: forgejo/upload-artifact@v4
with:
name: wheels
path: target/wheels/*.whl # Should only match the one target built
compression-level: 0
# TODO: Moving tests to another job feels like better form
python-test:
name: Python tests
runs-on: ubuntu-22.04
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up the Python toolchain
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Set up the Python environment
run: pip install -r requirements.txt
- name: Retrieve built wheel
uses: forgejo/download-artifact@v4
- name: Install built wheel
run: pip install wheels/*.whl # Should only match the one target built
- name: Run Python tests
run: pytest tests/*.py
# FIXME: The runner's Python version is 3.9, which breaks one some of the type syntax found in the tests
# - name: Run Python tests
# run: |
# source venv/bin/activate
# pytest tests/*.py
# FIXME: Linking with `cc` fails on the runner because it can't find the python3.9 library
# - name: Run Rust tests
# run: |
# source venv/bin/activate
# cargo test
rust-test:
name: Rust tests
runs-on: ubuntu-22.04
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Set up Rust
uses: https://github.com/dtolnay/rust-toolchain@stable
- name: Set up the Python toolchain
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Run Rust tests
run: cargo test