Skip to content

Commit d6b5608

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

File tree

1 file changed

+32
-108
lines changed

1 file changed

+32
-108
lines changed

.github/workflows/cd.yml

Lines changed: 32 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,9 @@ 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+
conan profile detect --force
7968
8069
- name: Install ARM MacOS dependencies
8170
if: matrix.platform == 'macos-14'
@@ -86,71 +75,59 @@ jobs:
8675
mkdir -p ~/.conan2/profiles/
8776
touch ~/.conan2/profiles/default # if we don't make a file first, cp thinks its a folder that doesn't exist
8877
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
10478
105-
- name: Build on ARM Macos
106-
if: matrix.platform == 'macos-14'
79+
- name: Install Linux Dependencies
80+
if: matrix.platform == 'ubuntu-latest'
81+
run: |
82+
sudo python3 -m pip install conan
83+
conan --version
84+
conan profile detect --force
85+
86+
- name: Install Dependencies through Conan on Unix
87+
shell: bash
88+
run: |
89+
conan install . --output-folder build --build SundialsSolverStandalone_x64
90+
91+
- name: Build on Macos
92+
if: matrix.platform == 'macos-13' || matrix.platform == 'macos-14'
10793
run: |
10894
platform=macos
10995
echo "working dir is $PWD"
11096
11197
cd build
112-
11398
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
114-
11599
cmake -B . -S .. -G "Ninja" -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_BUILD_TYPE=Debug
116100
cmake --build .
117101
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
127-
128-
- name: Build on Intel Macos
129-
if: matrix.platform == 'macos-13'
102+
- name: Build Linux
103+
if: matrix.platform == 'ubuntu-latest'
130104
run: |
131-
platform=macos
105+
platform=linux
132106
echo "working dir is $PWD"
133107
134108
mkdir build
135109
cd build
136110
137-
export PATH="/usr/local/opt/llvm/bin:$PATH"
138-
139111
cmake \
140112
-G Ninja \
141-
-DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang \
142-
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++ \
143113
-DOPTION_TARGET_MESSAGING=OFF \
114+
-DOPTION_TARGET_PARALLEL=OFF \
115+
-DOPTION_TARGET_CHOMBO2D_SOLVER=OFF \
116+
-DOPTION_TARGET_CHOMBO3D_SOLVER=OFF \
117+
-DOPTION_TARGET_SMOLDYN_SOLVER=ON \
118+
-DOPTION_TARGET_FV_SOLVER=ON \
119+
-DOPTION_TARGET_STOCHASTIC_SOLVER=ON \
120+
-DOPTION_TARGET_NFSIM_SOLVER=ON \
121+
-DOPTION_TARGET_MOVINGBOUNDARY_SOLVER=ON \
122+
-DOPTION_TARGET_SUNDIALS_SOLVER=ON \
123+
-DOPTION_TARGET_HY3S_SOLVERS=OFF \
144124
-B . -S ..
145125
146126
ninja
147127
148-
- name: Test Macos
149-
if: matrix.platform == 'macos-13' || matrix.platform == 'macos-14'
128+
- name: Test Unix
129+
if: matrix.platform == 'macos-13' || matrix.platform == 'macos-14' || matrix.platform == 'ubuntu-latest'
150130
run: |
151-
platform=macos
152-
echo "working dir is $PWD"
153-
154131
cd build
155132
156133
ctest -VV
@@ -228,59 +205,6 @@ jobs:
228205
# echo "------ running SundialsSolverStandalone_x64 ------"
229206
# ./bin/SundialsSolverStandalone_x64 || true
230207

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-
284208

285209
- name: fix Macos shared object paths
286210
if: matrix.platform == 'macos-13' || matrix.platform == 'macos-14'

0 commit comments

Comments
 (0)