Skip to content

Commit 8a6bf2c

Browse files
authored
Merge pull request #137 from TomographicImaging/fix-build
overhaul build & CI
2 parents fe5280f + ccf87aa commit 8a6bf2c

21 files changed

Lines changed: 205 additions & 433 deletions

.github/workflows/conda_build.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: conda
2+
on:
3+
push:
4+
branches: [master]
5+
tags: [v*]
6+
pull_request:
7+
branches: [master]
8+
jobs:
9+
build:
10+
runs-on: ${{ matrix.os == 'macos-intel' && 'macos' || matrix.os }}-${{ matrix.os == 'macos-intel' && '15-intel' || 'latest' }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu, windows, macos, macos-intel]
14+
steps:
15+
- uses: actions/checkout@v6
16+
with: {fetch-depth: 0}
17+
- if: matrix.os == 'windows'
18+
uses: ilammy/msvc-dev-cmd@v1
19+
- uses: prefix-dev/rattler-build-action@v0.2.37
20+
with:
21+
recipe-path: recipe.yaml
22+
build-args: --experimental
23+
artifact-name: package-${{ matrix.os }}
24+
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
25+
name: conda upload -c httomo
26+
run: |
27+
rattler-build upload anaconda -o httomo -f ./output/*/lib*.conda # library
28+
if test ${{ matrix.os }} = ubuntu ; then
29+
rattler-build upload anaconda -o httomo -f ./output/noarch/*.conda # noarch: python
30+
fi
31+
env:
32+
ANACONDA_API_KEY: ${{ secrets.HTTOMO_TOKEN_27 }}
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,31 @@
1-
name: tomophantoms_docs
2-
1+
name: docs
32
on:
43
workflow_dispatch:
54
pull_request:
6-
branches:
7-
- master
5+
branches: [master]
86
push:
9-
branches:
10-
- master
11-
7+
branches: [master]
128
jobs:
13-
build-documentation:
9+
build:
1410
runs-on: ubuntu-latest
1511
defaults:
1612
run:
1713
shell: bash -el {0}
1814
steps:
19-
- name: Checkout repository code
20-
uses: actions/checkout@v4
21-
22-
- name: Setup Python 3.10
23-
uses: actions/setup-python@v4
24-
with:
25-
python-version: '3.10'
26-
27-
- name: tomophantom-docs
28-
uses: conda-incubator/setup-miniconda@v2
15+
- uses: actions/checkout@v6
16+
- uses: actions/setup-python@v6
17+
with: {python-version: '3.10'}
18+
- uses: conda-incubator/setup-miniconda@v3
2919
with:
3020
auto-update-conda: false
3121
activate-environment: tomophantom-docs
3222
environment-file: ./docs/source/doc-conda-requirements.yml
33-
3423
- name: Build api docs
3524
run: sphinx-apidoc -feT -t=./docs/source/_templates -o ./docs/source/api ./tomophantom
36-
3725
- name: Build html
3826
run: sphinx-build -a -E -b html ./docs/source/ ./docs/build/
39-
40-
- name: Run ghp-import
27+
- if: github.event_name != 'pull_request'
28+
name: Run ghp-import
4129
run: ghp-import -n -p -f ./docs/build
4230
env:
4331
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/libtomophantom_conda_upload.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

.github/workflows/tomophantom_conda_upload.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

.scripts/conda_upload.sh

Lines changed: 0 additions & 35 deletions
This file was deleted.

.scripts/conda_upload_lib.sh

Lines changed: 0 additions & 33 deletions
This file was deleted.

.scripts/decrypt_secret.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

.scripts/my_secret.json.gpg

-124 Bytes
Binary file not shown.

CMakeLists.txt

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,5 @@
1-
# Copyright 2017 Edoardo Pasca
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
14-
151
cmake_minimum_required(VERSION 3.10)
162

173
project(tomophantom)
18-
19-
# The version number.
20-
set (CIL_VERSION_MAJOR 0)
21-
set (CIL_VERSION_MINOR 11)
22-
set (CIL_VERSION_PATCH 0)
23-
24-
set (CIL_VERSION '${CIL_VERSION_MAJOR}.${CIL_VERSION_MINOR}.${CIL_VERSION_PATCH}' CACHE INTERNAL "Core Imaging Library version" FORCE)
25-
26-
set(CMAKE_BUILD_TYPE "Release")
27-
28-
option (BUILD_MATLAB_WRAPPER "Build Matlab Wrappers" OFF)
29-
option (BUILD_PYTHON_WRAPPER "Build Python Wrappers" OFF)
30-
option (CONDA_BUILD "Conda Build" OFF)
31-
4+
set(TOMOPHANTOM_VERSION "$ENV{TOMOPHANTOM_VERSION}" CACHE INTERNAL "TomoPhantom Library version" FORCE)
325
add_subdirectory(Core)
33-

0 commit comments

Comments
 (0)