Compare commits
31 commits
926587450e
...
2d4a6aedfe
Author | SHA1 | Date | |
---|---|---|---|
2d4a6aedfe | |||
aeff99b71d | |||
e86311ee0d | |||
0fe8bd7de0 | |||
ff6cc64785 | |||
38c22f302f | |||
03c9ec4ada | |||
3dc2942066 | |||
67c42468cb | |||
53361619b9 | |||
a1579e9036 | |||
28dbb46ad1 | |||
70484eac68 | |||
35d0c0b4a2 | |||
dca4806af8 | |||
5ab5aa0301 | |||
f9705ada57 | |||
f8a923293b | |||
7a1b92280d | |||
0ef7331276 | |||
9db6a303a7 | |||
f687105dc9 | |||
032aa3540b | |||
1e212fc077 | |||
fe0fa80cf6 | |||
b1eb4be4d0 | |||
33b8efa5b5 | |||
cb634c5f96 | |||
0ec31b8972 | |||
32afdabf0a | |||
4fb890aa37 |
1 changed files with 71 additions and 0 deletions
71
.forgejo/workflows/build.yaml
Normal file
71
.forgejo/workflows/build.yaml
Normal file
|
@ -0,0 +1,71 @@
|
|||
---
|
||||
on: [push]
|
||||
|
||||
name: CI
|
||||
|
||||
jobs:
|
||||
formatting:
|
||||
name: Formatting
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Rust
|
||||
uses: https://github.com/dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: rustfmt
|
||||
- name: Check Rust formatting
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
clippy:
|
||||
name: Clippy
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up Rust
|
||||
uses: https://github.com/dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: clippy
|
||||
- name: Run Clippy
|
||||
run: cargo clippy -- -D warnings
|
||||
|
||||
build:
|
||||
name: Build
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Checkout
|
||||
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: Build Rust code
|
||||
run: |
|
||||
source venv/bin/activate
|
||||
maturin develop
|
||||
|
||||
# TODO: Moving tests to another job feels like better form
|
||||
|
||||
# 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
|
Loading…
Add table
Add a link
Reference in a new issue