Skip to content

Commit 5a8d2fd

Browse files
Expanding conan to other Unix
1 parent 0b0fc62 commit 5a8d2fd

File tree

4 files changed

+55
-122
lines changed

4 files changed

+55
-122
lines changed

.github/workflows/cd.yml

Lines changed: 37 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,11 @@ jobs:
6262
if: matrix.platform == 'macos-13'
6363
shell: bash
6464
run: |
65-
brew install boost
66-
brew install ninja
67-
68-
brew install llvm
69-
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> /Users/runner/.bash_profile
70-
source /Users/runner/.bash_profile
71-
ln -s $(which gfortran-14) /usr/local/bin/gfortran
72-
73-
gcc --version
74-
gfortran --version
75-
cmake --version
76-
python --version
77-
brew info boost
78-
brew info hdf5
65+
brew install conan
66+
conan --version
67+
mkdir -p ~/.conan2/profiles/
68+
touch ~/.conan2/profiles/default # if we don't make a file first, cp thinks its a folder that doesn't exist
69+
cp conan-profiles/CI-CD/MacOS-AMD64_profile.txt ~/.conan2/profiles/default
7970
8071
- name: Install ARM MacOS dependencies
8172
if: matrix.platform == 'macos-14'
@@ -86,71 +77,49 @@ jobs:
8677
mkdir -p ~/.conan2/profiles/
8778
touch ~/.conan2/profiles/default # if we don't make a file first, cp thinks its a folder that doesn't exist
8879
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
10480
105-
- name: Build on ARM Macos
106-
if: matrix.platform == 'macos-14'
81+
- name: Install Linux Dependencies
82+
if: matrix.platform == 'ubuntu-latest'
10783
run: |
108-
platform=macos
109-
echo "working dir is $PWD"
110-
111-
cd build
84+
sudo apt update
85+
sudo apt upgrade -y
86+
sudo apt install -y wget
87+
wget --version
88+
wget https://github.com/conan-io/conan/releases/download/2.17.0/conan-2.17.0-amd64.deb
89+
sudo apt install -y ./conan-*.deb
90+
conan --version
91+
mkdir -p ~/.conan2/profiles/
92+
touch ~/.conan2/profiles/default # if we don't make a file first, cp thinks its a folder that doesn't exist
93+
cp conan-profiles/CI-CD/Linux-AMD64_profile.txt ~/.conan2/profiles/default
11294
113-
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 .
95+
- name: Install Dependencies through Conan on Unix
96+
shell: bash
97+
run: |
98+
conan install . --output-folder build --build SundialsSolverStandalone_x64
11799
118-
# mkdir build
100+
# - name: Build on Macos
101+
# if: matrix.platform == 'macos-13' || matrix.platform == 'macos-14'
102+
# run: |
103+
# platform=macos
104+
# echo "working dir is $PWD"
105+
#
119106
# 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
107+
# export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
108+
# cmake -B . -S .. -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_BUILD_TYPE=Debug
109+
# cmake --build .
127110

128-
- name: Build on Intel Macos
129-
if: matrix.platform == 'macos-13'
111+
- name: Build Unix
112+
if: matrix.platform == 'ubuntu-latest' || matrix.platform == 'macos-13' || matrix.platform == 'macos-14'
130113
run: |
131-
platform=macos
132114
echo "working dir is $PWD"
133-
134-
mkdir build
115+
135116
cd build
117+
cmake -B . -S .. -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_BUILD_TYPE=Debug
118+
cmake --build .
136119
137-
export PATH="/usr/local/opt/llvm/bin:$PATH"
138-
139-
cmake \
140-
-G Ninja \
141-
-DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang \
142-
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++ \
143-
-DOPTION_TARGET_MESSAGING=OFF \
144-
-B . -S ..
145-
146-
ninja
147-
148-
- name: Test Macos
149-
if: matrix.platform == 'macos-13' || matrix.platform == 'macos-14'
120+
- name: Test Unix
121+
if: matrix.platform == 'macos-13' || matrix.platform == 'macos-14' || matrix.platform == 'ubuntu-latest'
150122
run: |
151-
platform=macos
152-
echo "working dir is $PWD"
153-
154123
cd build
155124
156125
ctest -VV
@@ -228,59 +197,6 @@ jobs:
228197
# echo "------ running SundialsSolverStandalone_x64 ------"
229198
# ./bin/SundialsSolverStandalone_x64 || true
230199

231-
- name: Install Linux Dependencies
232-
if: matrix.platform == 'ubuntu-latest'
233-
run: |
234-
sudo apt-get update
235-
sudo apt-get install -y libboost-all-dev
236-
sudo apt-get install -y libhdf5-dev
237-
sudo apt-get install -y ninja-build
238-
239-
gcc --version
240-
gfortran --version
241-
cmake --version
242-
dpkg -s libboost-all-dev
243-
dpkg -s libhdf5-dev
244-
245-
- name: Build Linux
246-
if: matrix.platform == 'ubuntu-latest'
247-
run: |
248-
platform=linux
249-
echo "working dir is $PWD"
250-
251-
mkdir build
252-
cd build
253-
254-
cmake \
255-
-G Ninja \
256-
-DOPTION_TARGET_MESSAGING=OFF \
257-
-DOPTION_TARGET_PARALLEL=OFF \
258-
-DOPTION_TARGET_CHOMBO2D_SOLVER=OFF \
259-
-DOPTION_TARGET_CHOMBO3D_SOLVER=OFF \
260-
-DOPTION_TARGET_SMOLDYN_SOLVER=ON \
261-
-DOPTION_TARGET_FV_SOLVER=ON \
262-
-DOPTION_TARGET_STOCHASTIC_SOLVER=ON \
263-
-DOPTION_TARGET_NFSIM_SOLVER=ON \
264-
-DOPTION_TARGET_MOVINGBOUNDARY_SOLVER=ON \
265-
-DOPTION_TARGET_SUNDIALS_SOLVER=ON \
266-
-DOPTION_TARGET_HY3S_SOLVERS=OFF \
267-
-B . -S ..
268-
269-
ninja
270-
271-
- name: Test Linux
272-
if: matrix.platform == 'ubuntu-latest'
273-
run: |
274-
platform=linux
275-
echo "working dir is $PWD"
276-
277-
cd build
278-
279-
ctest -VV
280-
281-
echo "------ running SundialsSolverStandalone_x64 ------"
282-
./bin/SundialsSolverStandalone_x64 || true
283-
284200

285201
- name: fix Macos shared object paths
286202
if: matrix.platform == 'macos-13' || matrix.platform == 'macos-14'
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[settings]
2+
arch=x86_64
3+
build_type=Release
4+
compiler=gcc
5+
compiler.version=11
6+
os=Linux
7+
[options]
8+
fPIC=True
9+
shared=False
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[settings]
2+
arch=x86_64
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[requires]
2-
libcurl/8.12.1
2+
libcurl/[<9.0]
33
zlib/1.3.1
44

55
[tool_requires]

0 commit comments

Comments
 (0)