Skip to content

Commit 0b0fc62

Browse files
First pass at conan build
1 parent 6a2b54b commit 0b0fc62

File tree

5 files changed

+65
-30
lines changed

5 files changed

+65
-30
lines changed

.github/workflows/cd.yml

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ env:
66
REGISTRY: ghcr.io
77
IMAGE_NAME: ${{ github.repository }}
88

9-
jobs:
9+
#jobs:
1010
# build-and-push-image:
1111
# runs-on: ubuntu-latest
1212
# permissions:
@@ -38,6 +38,7 @@ jobs:
3838
# tags: ${{ steps.meta.outputs.tags }}
3939
# labels: ${{ steps.meta.outputs.labels }}
4040

41+
jobs:
4142
native-build:
4243
name:
4344
native-build-${{ matrix.platform }}
@@ -62,7 +63,6 @@ jobs:
6263
shell: bash
6364
run: |
6465
brew install boost
65-
brew install hdf5
6666
brew install ninja
6767
6868
brew install llvm
@@ -81,39 +81,49 @@ jobs:
8181
if: matrix.platform == 'macos-14'
8282
shell: bash
8383
run: |
84-
brew install boost
85-
brew install hdf5
86-
brew install ninja
87-
88-
brew install llvm
89-
echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> /Users/runner/.bash_profile
90-
ln -s /opt/homebrew/bin/gfortran-14 /usr/local/bin/gfortran
91-
92-
gcc --version
93-
gfortran --version
94-
cmake --version
95-
brew info boost
96-
brew info hdf5
84+
brew install conan
85+
conan --version
86+
mkdir -p ~/.conan2/profiles/
87+
touch ~/.conan2/profiles/default # if we don't make a file first, cp thinks its a folder that doesn't exist
88+
cp conan-profiles/CI-CD/MacOS-ARM8_profile.txt ~/.conan2/profiles/default
89+
conan install . \
90+
--output-folder build \
91+
--build SundialsSolverStandalone_x64
92+
# brew install boost
93+
# brew install ninja
94+
#
95+
# brew install llvm
96+
# echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> /Users/runner/.bash_profile
97+
# ln -s /opt/homebrew/bin/gfortran-14 /usr/local/bin/gfortran
98+
#
99+
# gcc --version
100+
# gfortran --version
101+
# cmake --version
102+
# brew info boost
103+
# brew info hdf5
97104

98105
- name: Build on ARM Macos
99106
if: matrix.platform == 'macos-14'
100107
run: |
101108
platform=macos
102109
echo "working dir is $PWD"
103110
104-
mkdir build
105111
cd build
106112
107113
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
114+
115+
cmake -B . -S .. -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_BUILD_TYPE=Debug
116+
cmake --build .
108117
109-
cmake \
110-
-G Ninja \
111-
-DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang \
112-
-DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++ \
113-
-DOPTION_TARGET_MESSAGING=OFF \
114-
-B . -S ..
115-
116-
ninja
118+
# mkdir build
119+
# cd build
120+
# cmake \
121+
# -G Ninja \
122+
# -DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm/bin/clang \
123+
# -DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++ \
124+
# -DOPTION_TARGET_MESSAGING=OFF \
125+
# -B . -S ..
126+
# ninja
117127

118128
- name: Build on Intel Macos
119129
if: matrix.platform == 'macos-13'

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ NFsim_v1.11/tests/smoke/SimID_273069657_0_.gdat
2424
NFsim_v1.11/tests/smoke/SimID_273069657_0_.species
2525

2626
IDAWin/tests/smoke/SimID_1489333437_0_.ida
27+
28+
CMakeUserPresets.json
29+
conan-build
30+
conan-build/*

CMakeLists.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ project(vcell-ode-numerics)
88
set(CMAKE_CXX_STANDARD 17)
99
enable_language(CXX)
1010
enable_language(C)
11-
enable_language(Fortran)
11+
#enable_language(Fortran)
1212

1313
#############################################
1414
# If this isn't explicitly set in cmake 3.x.x, we get warnings
@@ -44,13 +44,13 @@ if (LINUX)
4444
set (ARCH_64bit FALSE)
4545
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
4646
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
47-
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m32")
47+
# set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m32")
4848
endif()
4949

5050
if (LINUX_64bit_BINARIES)
5151
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
5252
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
53-
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m64")
53+
# set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m64")
5454
endif()
5555
endif()
5656

@@ -144,7 +144,7 @@ if (WINDOWS)
144144
set(CMAKE_RC_FLAGS "-DGCC_WINDRES")
145145
endif(WINDOWS)
146146

147-
add_definitions(-DFORTRAN_UNDERSCORE)
147+
#add_definitions(-DFORTRAN_UNDERSCORE)
148148

149149
#############################################
150150
# installation directories
@@ -220,9 +220,11 @@ if (OPTION_EXTRA_CONFIG_INFO)
220220

221221
include(CMakePrintHelpers)
222222
cmake_print_variables(OPTION_TARGET_MESSAGING OPTION_TARGET_DOCS)
223-
cmake_print_variables(CMAKE_CXX_FLAGS CMAKE_C_FLAGS CMAKE_Fortran_FLAGS)
223+
# cmake_print_variables(CMAKE_CXX_FLAGS CMAKE_C_FLAGS CMAKE_Fortran_FLAGS)
224+
cmake_print_variables(CMAKE_CXX_FLAGS CMAKE_C_FLAGS)
224225
cmake_print_variables(CMAKE_SYSTEM_NAME WINDOWS WIN32 MINGW APPLE ARCH_64bit ARCH_32bit)
225-
cmake_print_variables(CMAKE_CPP_COMPILER CMAKE_C_COMPILER CMAKE_CXX_COMPILER CMAKE_Fortran_COMPILER)
226+
# cmake_print_variables(CMAKE_CPP_COMPILER CMAKE_C_COMPILER CMAKE_CXX_COMPILER CMAKE_Fortran_COMPILER)
227+
cmake_print_variables(CMAKE_CPP_COMPILER CMAKE_C_COMPILER CMAKE_CXX_COMPILER)
226228
cmake_print_variables(HAVE_ZLIB)
227229
endif ()
228230

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[settings]
2+
arch=armv8
3+
build_type=Release
4+
compiler=apple-clang
5+
compiler.cppstd=gnu17
6+
compiler.libcxx=libc++
7+
compiler.version=13
8+
os=Macos

conanfile.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[requires]
2+
libcurl/8.12.1
3+
zlib/1.3.1
4+
5+
[tool_requires]
6+
cmake/[>=3.13]
7+
ninja/1.12.1
8+
9+
[generators]
10+
CMakeDeps
11+
CMakeToolchain

0 commit comments

Comments
 (0)