Skip to content

Commit 3f472ec

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

File tree

5 files changed

+17
-22
lines changed

5 files changed

+17
-22
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 & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,13 @@ on:
99
- main
1010
paths-ignore:
1111
- 'doc/**'
12-
- 'scripts/**'
13-
- '.gitlab-ci.yml'
1412
- '.gitignore'
1513
- '**.md'
16-
- 'CITATION.cff'
17-
- 'CITATIONS.bib'
1814
pull_request:
1915
paths-ignore:
2016
- 'doc/'
21-
- 'scripts/'
22-
- '.gitlab-ci.yml'
2317
- '.gitignore'
2418
- '**.md'
25-
- 'CITATION.cff'
26-
- 'CITATIONS.bib'
2719
concurrency:
2820
group: ${{ github.workflow }}-${{ github.ref }}
2921
cancel-in-progress: true
@@ -68,6 +60,10 @@ jobs:
6860
ALCEP_BUILD_TYPE: ${{ matrix.build_type }}
6961
run: |
7062
pixi run -e ${{ matrix.environment }} build
63+
pixi shell -e ${{ matrix.environment }}
64+
cd build && ./bin/main
65+
# Tests
66+
pixi run -e ${{ matrix.environment }} test
7167
7268
check:
7369
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)