Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
be122e0
Add gh actions config
jl-wynen Jul 10, 2026
218334c
Use automatic env selection
jl-wynen Jul 10, 2026
f541586
Update lock file
jl-wynen Jul 10, 2026
1839f12
Run clippy when linting
jl-wynen Jul 10, 2026
c31e91b
Install Rust in CI
jl-wynen Jul 10, 2026
e2fe0f5
Run clippy only via prek
jl-wynen Jul 10, 2026
13978bf
Add dev feature to lint
jl-wynen Jul 10, 2026
bf60f51
Do not cache rust artifacts
jl-wynen Jul 10, 2026
81ec9e6
Disable color output in CI
jl-wynen Jul 10, 2026
deaddba
Add package_test
jl-wynen Jul 10, 2026
b1e2dab
Add maturin to dev dependencies
jl-wynen Jul 10, 2026
807620a
Pixi lock
jl-wynen Jul 10, 2026
9a35206
Disable linting stage
jl-wynen Jul 10, 2026
f2737f4
Do not install maturin hook in CI
jl-wynen Jul 10, 2026
35b32c1
Only install required components in CI
jl-wynen Jul 10, 2026
4802001
Use python explicitly to run pytest
jl-wynen Jul 10, 2026
92761bd
Merge test and dev groups
jl-wynen Jul 10, 2026
f135e64
Only run one test action
jl-wynen Jul 10, 2026
e863bd3
Install env after pinning python
jl-wynen Jul 10, 2026
eeb61ae
Do not install in setup-pixi
jl-wynen Jul 10, 2026
7fad65f
List packages after install
jl-wynen Jul 10, 2026
2d7717d
Explicitly select default env
jl-wynen Jul 10, 2026
579fc09
Test: completely skip activation script
jl-wynen Jul 10, 2026
941a1fa
Pixi run verbose
jl-wynen Jul 10, 2026
bfbbd38
Do not exist from activation script
jl-wynen Jul 10, 2026
b4fac5d
Reenable all checks
jl-wynen Jul 10, 2026
b1edf2a
Remove docs action
jl-wynen Jul 10, 2026
5714804
Try with cache again
jl-wynen Jul 10, 2026
681ccc8
Remove docs from release
jl-wynen Jul 10, 2026
daf7d3c
Limit macos version for both osx targets
jl-wynen Jul 10, 2026
11cfafa
Update release workflow from maturin
jl-wynen Jul 10, 2026
bbde69b
Do not build releases in PRs
jl-wynen Jul 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: CI

on:
push:
branches:
- main
pull_request:

env:
CARGO_TERM_COLOR: "never"
PIXI_COLOR: "never"
# pixi environment variables, i.e. `pixi run --as-is`
PIXI_FROZEN: true
PIXI_NO_INSTALL: true

jobs:
formatting:
name: Formatting and static analysis
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1.17.0
with:
components: clippy,rustfmt
- uses: prefix-dev/setup-pixi@v0.10.0
with:
pixi-version: v0.72.2
frozen: true
environments: lint
- run: pixi run -e lint lint

type-checking:
name: Type checking
needs: formatting
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: prefix-dev/setup-pixi@v0.10.0
with:
pixi-version: v0.72.2
frozen: true
environments: default
- run: pixi run typecheck

tests:
name: Tests
needs: formatting
strategy:
matrix:
include:
- {python: '3.14', os: ubuntu-24.04}
- {python: '3.13', os: ubuntu-24.04}
- {python: '3.12', os: ubuntu-24.04}
- {python: '3.11', os: ubuntu-24.04}
- {python: '3.11', os: macos-14}
- {python: '3.11', os: windows-2025}
uses: ./.github/workflows/test.yml
with:
os-variant: ${{ matrix.os }}
python-version: ${{ matrix.python }}
20 changes: 20 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
on: [ pull_request ]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-slim
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v7
- name: 'Dependency Review'
uses: actions/dependency-review-action@v5
140 changes: 140 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
name: Release

on:
release:
types: [ published ]
workflow_dispatch:
inputs:
publish:
default: true
type: boolean
description: "Publish to PyPI"

env:
CARGO_TERM_COLOR: "never"
PIXI_COLOR: "never"

jobs:
build_linux:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-22.04
target: x86_64
- runner: ubuntu-22.04
target: aarch64
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version-file: '.python-version'
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: false
manylinux: auto
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.14t
sccache: false
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v7
with:
name: wheels-linux-${{ matrix.platform.target }}
path: dist

build_macos:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: macos-15-intel
target: x86_64
- runner: macos-latest
target: aarch64
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: false
- uses: actions/setup-python@v6
with:
python-version-file: '.python-version'
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.14t
sccache: false
- name: Upload wheels
uses: actions/upload-artifact@v7
with:
name: wheels-macos-${{ matrix.platform.target }}
path: dist

build_windows:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: windows-2025
target: x64
python_arch: x64
- runner: windows-11-arm
target: aarch64
python_arch: arm64
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version-file: '.python-version'
architecture: ${{ matrix.platform.python_arch }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: false
- uses: actions/setup-python@v6
with:
python-version: "3.14t"
architecture: ${{ matrix.platform.python_arch }}
- name: Build free-threaded wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i python3.14t
sccache: false
- name: Upload wheels
uses: actions/upload-artifact@v7
with:
name: wheels-windows-${{ matrix.platform.target }}
path: dist

upload_packages:
name: Deploy packages
needs: [ build_linux, build_macos, build_windows ]
runs-on: ubuntu-24.04
environment:
name: release
url: https://pypi.org/p/scippneutron-algorithms/
permissions:
id-token: write
if: ${{ (github.event_name == 'release' && github.event.action == 'published') || (github.event_name == 'workflow_dispatch' && inputs.publish) }}
steps:
- uses: actions/download-artifact@v7
- uses: pypa/gh-action-pypi-publish@v1.14.0
with:
attestations: true
56 changes: 56 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Test

on:
workflow_dispatch:
inputs:
os-variant:
default: 'ubuntu-24.04'
type: string
description: 'Operating system'
python-version:
type: string
description: 'Python interpreter version'
checkout-ref:
default: ''
type: string
description: 'Git ref to checkout'
workflow_call:
inputs:
os-variant:
default: 'ubuntu-24.04'
type: string
python-version:
type: string
checkout-ref:
default: ''
type: string

env:
CARGO_TERM_COLOR: "never"
PIXI_COLOR: "never"

jobs:
tests:
name: Tests ${{ inputs.os-variant }}
runs-on: ${{ inputs.os-variant }}
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
ref: ${{ inputs.checkout-ref }}
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1.17.0
with:
cache: true
components: cargo,rustc,rust-std
- uses: prefix-dev/setup-pixi@v0.10.0
with:
pixi-version: v0.72.2
# Install runs below to use the chosen Python version.
run-install: false
- name: Set Python version
run: pixi add "python=${{ inputs.python-version }}"
- name: Install environment
run: pixi install -e default --frozen && pixi list -e default
- name: Run tests
run: pixi run --as-is python -m pytest
Loading
Loading