Skip to content

Commit 99ad371

Browse files
authored
Merge pull request #6 from lucascolley/pixi
DEV: setup pixi
2 parents a0fd8aa + 318de7f commit 99ad371

File tree

7 files changed

+5276
-59
lines changed

7 files changed

+5276
-59
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SCM syntax highlighting
2+
pixi.lock linguist-language=YAML linguist-generated=true

.github/workflows/linux.yml

Lines changed: 8 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ name: Linux Tests
33
on: [ push, pull_request ]
44

55
permissions:
6-
contents: read # to fetch code (actions/checkout)
6+
contents: read # to fetch code (actions/checkout)
77

88
env:
99
CCACHE_DIR: "${{ github.workspace }}/.ccache"
10-
INSTALLDIR: "build-install"
1110

1211
concurrency:
1312
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -22,44 +21,12 @@ jobs:
2221

2322
steps:
2423
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25-
- name: Checkout xsref
26-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
24+
- uses: prefix-dev/setup-pixi@92815284c57faa15cd896c4d5cfb2d59f32dc43d # v0.8.3
2725
with:
28-
repository: 'scipy/xsref'
29-
path: 'xsref'
30-
ref: 'main'
31-
32-
- name: Checkout Catch2
33-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
34-
with:
35-
repository: 'catchorg/Catch2'
36-
path: 'Catch2'
37-
ref: 'v3.8.0'
38-
39-
- name: Install Ubuntu dependencies
40-
run: |
41-
sudo apt-get update
42-
wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
43-
sudo apt-get install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
44-
sudo apt-get update
45-
sudo apt-get install -y -V libarrow-dev # For C++
46-
sudo apt-get install -y -V libarrow-glib-dev # For GLib (C)
47-
sudo apt-get install -y -V libarrow-dataset-dev # For Apache Arrow Dataset C++
48-
sudo apt-get install -y -V libparquet-dev # For Apache Parquet C++
49-
sudo apt-get install -y -V libparquet-glib-dev # For Apache Parquet GLib (C)
50-
sudo apt-get install -y libzstd-dev ccache
51-
52-
- name: Install Catch2
53-
run: |
54-
cmake -Bbuild -H. -DBUILD_TESTING=OFF
55-
sudo cmake --build build/ --target install -j2
56-
working-directory: ./Catch2
57-
58-
- name: Configure and build
59-
run: |
60-
cmake -Bbuild
61-
cmake --build build -j2
62-
63-
- name: run tests
26+
pixi-version: v0.44.0
27+
cache: true
28+
- name: Run tests
6429
run: |
65-
ctest --output-on-failure --test-dir build/tests -j2
30+
pixi run configure-tests
31+
pixi run build-only -j2
32+
pixi run tests -j2

.gitignore

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,15 @@
3131
*.out
3232
*.app
3333

34-
# CMake stuff
35-
CMakeLists.txt.user
36-
CMakeCache.txt
37-
CMakeFiles
38-
CMakeScripts
39-
Testing
40-
Makefile
41-
cmake_install.cmake
42-
install_manifest.txt
43-
compile_commands.json
44-
CTestTestfile.cmake
45-
_deps
46-
CMakeUserPresets.json
47-
*.cmake
48-
DartConfiguration.tcl
34+
# cmake build
35+
build/
4936

5037
# test executable extension
51-
build/
38+
*.test
39+
40+
# pixi environments
41+
.pixi
42+
*.egg-info
43+
44+
# xsref
45+
xsref/

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@ set(CMAKE_CXX_STANDARD 17)
77
set(CMAKE_CXX_STANDARD_REQUIRED ON)
88

99
# Tests
10-
enable_testing()
11-
add_subdirectory(tests)
10+
option(BUILD_TESTS "Build the tests" OFF)
11+
12+
if(BUILD_TESTS)
13+
enable_testing()
14+
add_subdirectory(tests)
15+
endif()

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,25 @@
11
# xsf
22
Special function implementations
3+
4+
## Tests
5+
6+
To run the tests:
7+
- [clone this repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)
8+
- `cd xsf`
9+
- [install Pixi](https://pixi.sh/latest/#installation)
10+
- `pixi run tests`
11+
12+
For subsequent test runs, you can skip re-cloning [`xsref`](https://github.com/scipy/xsref) with:
13+
14+
```shell
15+
pixi run --skip-deps tests
16+
```
17+
18+
You can trigger a rebuild inbetween test runs with:
19+
20+
```shell
21+
pixi run build-tests
22+
```
23+
24+
> [!NOTE]
25+
> This has currently only been tested on Linux.

0 commit comments

Comments
 (0)