Skip to content

Commit 0a29045

Browse files
authored
Merge pull request #193 from vais-ral/gha-ci
2 parents 35cccdc + bb476ff commit 0a29045

File tree

3 files changed

+63
-1
lines changed

3 files changed

+63
-1
lines changed

.github/workflows/build.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: build
2+
on:
3+
release:
4+
types: [published]
5+
push:
6+
branches: [master]
7+
tags: ['**']
8+
pull_request:
9+
branches: [master]
10+
jobs:
11+
test:
12+
defaults: {run: {shell: 'bash -el {0}'}}
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
include:
17+
- python-version: 3.8
18+
numpy-version: 1.21
19+
- python-version: '3.10'
20+
numpy-version: 1.24
21+
steps:
22+
- uses: actions/checkout@v4
23+
with: {fetch-depth: 0, submodules: recursive}
24+
- uses: conda-incubator/setup-miniconda@v3
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: build
28+
run: |
29+
cmake -S . -B ./build_proj -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_MATLAB_WRAPPER=OFF -DBUILD_PYTHON_WRAPPER=ON -DBUILD_CUDA=OFF -DCMAKE_INSTALL_PREFIX=./install
30+
cmake --build ./build_proj --target install
31+
pip install ./src/Python
32+
- name: test
33+
run: PYTHONPATH=./src/Python python -m unittest discover ./test
34+
conda:
35+
defaults: {run: {shell: 'bash -el {0}'}}
36+
runs-on: ubuntu-latest
37+
strategy:
38+
matrix:
39+
python-version: [3.9]
40+
numpy-version: [1.22]
41+
steps:
42+
- uses: actions/checkout@v4
43+
with: {fetch-depth: 0, submodules: recursive}
44+
- uses: conda-incubator/setup-miniconda@v3
45+
with:
46+
python-version: ${{ matrix.python-version }}
47+
mamba-version: "*"
48+
channels: conda-forge
49+
- name: conda build & test
50+
working-directory: recipe
51+
run: |
52+
conda install boa
53+
conda mambabuild . -c conda-forge -c ccpi --python=${{ matrix.python-version }} --numpy=${{ matrix.numpy-version }} --output-folder .
54+
- name: Upload artifact of the conda package
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: ccpi-regulariser-package
58+
path: recipe/linux-64/ccpi-regulariser*
59+
pass:
60+
needs: [test, conda]
61+
runs-on: ubuntu-latest
62+
steps: [{run: echo success}]

recipe/meta.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ requirements:
2626
- pip
2727
- vc 14 # [win]
2828
- cmake
29-
- ripgrep
3029

3130
run:
3231
- {{ pin_compatible('numpy', min_pin='x.x', max_pin='x.x') }}

src/Python/pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ include = ["ccpi", "ccpi.*"]
99
[project]
1010
version = "24.0.0"
1111
name = "ccpi-regulariser"
12+
dependencies = ["numpy"]

0 commit comments

Comments
 (0)