Skip to content

Commit 033078e

Browse files
committed
pixi workflow : actually run 'main', add import test
1 parent 6e7ce84 commit 033078e

File tree

5 files changed

+17
-14
lines changed

5 files changed

+17
-14
lines changed

.gersemirc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
definitions: [./CMakeLists.txt, ./cmake]
1+
definitions: [./CMakeLists.txt, ./cpp-extension, ./cmake]
22
line_length: 80
33
indent: 2
44
warn_about_unknown_commands: false

.github/workflows/macos-linux-pixi.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ jobs:
6868
ALCEP_BUILD_TYPE: ${{ matrix.build_type }}
6969
run: |
7070
pixi run -e ${{ matrix.environment }} build
71+
pixi shell -e ${{ matrix.environment }}
72+
cd build && ./bin/main
73+
# Tests
74+
pixi run -e ${{ matrix.environment }} test
7175
7276
check:
7377
name: check-macos-linux-pixi

.pre-commit-config.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,11 @@ repos:
1717
- id: check-added-large-files
1818
- id: check-case-conflict
1919
- id: check-yaml
20-
exclude: ^packaging/conda/
2120
- id: detect-private-key
2221
- id: end-of-file-fixer
2322
- id: mixed-line-ending
2423
- id: check-merge-conflict
2524
- id: trailing-whitespace
26-
exclude: |
27-
(?x)^(
28-
doc/doxygen-awesome.*
29-
)$
30-
- repo: https://github.com/astral-sh/ruff-pre-commit
31-
# Ruff version.
32-
rev: 'v0.11.7'
33-
hooks:
34-
- id: ruff
35-
args: [--fix, --exit-non-zero-on-fix]
36-
- id: ruff-format
3725
- repo: https://github.com/BlankSpruce/gersemi
3826
rev: 0.19.2
3927
hooks:

cpp-extension/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1+
function(add_import_test name)
2+
set(test_target ${name})
3+
4+
add_test(
5+
NAME ${name}
6+
COMMAND ${PYTHON_EXECUTABLE} -c "import ${name}"
7+
WORKING_DIRECTORY $<TARGET_FILE_DIR:${name}>
8+
)
9+
endfunction()
10+
111
aligator_create_python_extension(example_extension WITH_SOABI module.cpp)
12+
add_import_test(example_extension)

pixi.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ platforms = ["osx-64", "osx-arm64", "linux-64"]
66
version = "0.1.0"
77

88
[activation]
9-
scripts = ["development/pixi/activation.sh"]
9+
scripts = ["scripts/pixi/activation.sh"]
1010

1111
[tasks]
1212
configure = { cmd = [

0 commit comments

Comments
 (0)