Skip to content

Commit f7b6900

Browse files
committed
fix suitesparse.patch and revert changes to dev.ci
Signed-off-by: Nicolas Rol <[email protected]>
1 parent d42fb0f commit f7b6900

File tree

4 files changed

+91
-392
lines changed

4 files changed

+91
-392
lines changed

Diff for: .github/workflows/dev-ci.yml

+13-72
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ jobs:
111111
- name: Install Boost
112112
run: |
113113
yum update -y
114-
yum install -y cmake make gcc gcc-c++ which git mpfr-devel
115-
dnf --enablerepo=ol8_codeready_builder install boost-static openblas-devel
114+
yum install -y cmake make gcc gcc-c++ which git
115+
dnf --enablerepo=ol8_codeready_builder install boost-static
116116
117117
- name: Checkout sources
118118
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -150,10 +150,10 @@ jobs:
150150
name: Build C++ Ubuntu
151151
runs-on: ubuntu-latest
152152
steps:
153-
- name: Install Boost OpenBLAS and MPFR dependencies
153+
- name: Install Boost
154154
run: |
155155
sudo apt-get update -y
156-
sudo apt-get install -y libboost-all-dev libopenblas-dev libmpfr-dev
156+
sudo apt-get install -y libboost-all-dev
157157
158158
- name: Checkout sources
159159
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -207,82 +207,23 @@ jobs:
207207
- name: Checkout sources
208208
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
209209

210-
- name: Install MSYS2 and dependencies
211-
run: |
212-
choco install msys2 --no-progress
213-
refreshenv
214-
ridk install 3
215-
pacman --noconfirm -Syu
216-
pacman --noconfirm -S mingw-w64-x86_64-gmp mingw-w64-x86_64-mpfr
217-
218-
- name: Download OpenBLAS binaries
219-
run: |
220-
curl -L -o OpenBLAS.zip https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.29/OpenBLAS-0.3.29-x64.zip
221-
mkdir C:\thirdparties\OpenBLAS
222-
powershell -Command "Expand-Archive -Path OpenBLAS.zip -DestinationPath C:\thirdparties\OpenBLAS"
223-
224-
- name: Configure environment variables for dependencies
225-
run: |
226-
echo "OPENBLAS_INCLUDE_DIR=C:\thirdparties\OpenBLAS\include" >> $GITHUB_ENV
227-
echo "OPENBLAS_LIBRARY_DIR=C:\thirdparties\OpenBLAS\lib" >> $GITHUB_ENV
228-
echo "GMP_INCLUDE_DIR=C:\msys64\mingw64\include" >> $GITHUB_ENV
229-
echo "GMP_LIBRARY_DIR=C:\msys64\mingw64\lib" >> $GITHUB_ENV
230-
echo "MPFR_INCLUDE_DIR=C:\msys64\mingw64\include" >> $GITHUB_ENV
231-
echo "MPFR_LIBRARY_DIR=C:\msys64\mingw64\lib" >> $GITHUB_ENV
232-
233-
- name: Show directory content
234-
run: |
235-
echo Showing contents of OpenBLAS include directory:
236-
dir /s /b /o:gn "%OPENBLAS_INCLUDE_DIR%"
237-
echo Showing contents of OpenBLAS library directory:
238-
dir /s /b /o:gn "%OPENBLAS_LIBRARY_DIR%"
239-
echo Showing contents of GMP include directory:
240-
dir /s /b /o:gn "%GMP_INCLUDE_DIR%"
241-
echo Showing contents of GMP library directory:
242-
dir /s /b /o:gn "%GMP_LIBRARY_DIR%"
243-
echo Showing contents of MPFR include directory:
244-
dir /s /b /o:gn "%MPFR_INCLUDE_DIR%"
245-
echo Showing contents of MPFR library directory:
246-
dir /s /b /o:gn "%MPFR_LIBRARY_DIR%"
247-
248210
- name: Configure 3rd parties
249211
run: >
250-
cmake -S ${{ github.workspace }}/metrix-simulator/external
251-
-B ${{ github.workspace }}/metrix-simulator/build/external
252-
-DOPENBLAS_INCLUDE_DIR=$OPENBLAS_INCLUDE_DIR
253-
-DOPENBLAS_LIBRARY_DIR=$OPENBLAS_LIBRARY_DIR
254-
-DGMP_INCLUDE_DIR=$GMP_INCLUDE_DIR
255-
-DGMP_LIBRARY_DIR=$GMP_LIBRARY_DIR
256-
-DMPFR_INCLUDE_DIR=$MPFR_INCLUDE_DIR
257-
-DMPFR_LIBRARY_DIR=$MPFR_LIBRARY_DIR
258-
-DBLA_VENDOR=OpenBLAS
259-
-DSUITESPARSE_USE_64BIT_BLAS=ON
212+
cmake -S %GITHUB_WORKSPACE%\metrix-simulator\external -B %GITHUB_WORKSPACE%\metrix-simulator\build\external
260213
261214
- name: Build 3rd parties
262215
run: >
263-
cmake --build ${{ github.workspace }}/metrix-simulator/build/external --config Release
216+
cmake --build %GITHUB_WORKSPACE%\metrix-simulator\build\external --parallel 2 --config Release
264217
265218
- name: Configure CMake
266219
run: >
267-
cmake -Wno-dev
268-
-S ${{ github.workspace }}/metrix-simulator
269-
-B ${{ github.workspace }}/metrix-simulator/build
270-
-DCMAKE_BUILD_TYPE=Release
271-
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/metrix-simulator/build/install
272-
-DOPENBLAS_INCLUDE_DIR=$OPENBLAS_INCLUDE_DIR
273-
-DOPENBLAS_LIBRARY_DIR=$OPENBLAS_LIBRARY_DIR
274-
-DGMP_INCLUDE_DIR=$GMP_INCLUDE_DIR
275-
-DGMP_LIBRARY_DIR=$GMP_LIBRARY_DIR
276-
-DMPFR_INCLUDE_DIR=$MPFR_INCLUDE_DIR
277-
-DMPFR_LIBRARY_DIR=$MPFR_LIBRARY_DIR
278-
-DBLA_VENDOR=OpenBLAS
279-
-DSUITESPARSE_USE_64BIT_BLAS=ON
220+
cmake -Wno-dev -S %GITHUB_WORKSPACE%\metrix-simulator -B %GITHUB_WORKSPACE%\metrix-simulator\build
280221
281222
- name: Build
282-
run: cmake --build ${{ github.workspace }}/metrix-simulator/build --target install --parallel 2 --config Release
223+
run: cmake --build %GITHUB_WORKSPACE%\metrix-simulator\build --target install --parallel 2 --config Release
283224

284225
- name: Tests
285-
run: cd ${{ github.workspace }}/metrix-simulator/build && ctest -j2 --output-on-failure -C Release
226+
run: cd %GITHUB_WORKSPACE%\metrix-simulator\build && ctest -j2 --output-on-failure -C Release
286227

287228
- name: Upload Metrix Simulator archive
288229
if: ${{ github.event_name == 'workflow_dispatch' && inputs.generate_artifacts }}
@@ -324,10 +265,10 @@ jobs:
324265
env:
325266
SONAR_SCANNER_VERSION: 3.3.0.1492
326267

327-
- name: Install Boost OpenBLAS and MPFR dependencies
268+
- name: Install Boost
328269
run: |
329270
sudo apt-get update -y
330-
sudo apt-get install -y libboost-all-dev libopenblas-dev libmpfr-dev
271+
sudo apt-get install -y libboost-all-dev
331272
332273
- name: Checkout sources
333274
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -374,10 +315,10 @@ jobs:
374315
runs-on: ubuntu-latest
375316
if: github.event_name == 'pull_request' # github.base_ref exists only for PRs
376317
steps:
377-
- name: Install Boost OpenBLAS and MPFR dependencies
318+
- name: Install Boost
378319
run: |
379320
sudo apt-get update -y
380-
sudo apt-get install -y libboost-all-dev libopenblas-dev libmpfr-dev
321+
sudo apt-get install -y libboost-all-dev
381322
382323
- name: Install clang-tidy
383324
run: |

Diff for: .github/workflows/docker/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo \
1818
&& sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo \
1919
&& yum update -y \
2020
&& yum install -y epel-release \
21-
&& yum install -y git redhat-lsb-core make wget centos-release-scl scl-utils openblas-devel mpfr-devel
21+
&& yum install -y git redhat-lsb-core make wget centos-release-scl scl-utils
2222

2323
# Second set of dependencies
2424
RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo \

Diff for: metrix-simulator/external/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ if(DEFINED ENV{NNI} AND DEFINED ENV{NNI_PASSWORD})
4040
set(suitesparse_url ${SUITEPARSE_URL})
4141
endif()
4242

43+
GetPatchCommand(${CMAKE_CURRENT_SOURCE_DIR} suitesparse)
4344
if(SuiteSparse_FOUND)
4445
message(STATUS "SuiteSparse Already found")
4546
add_custom_target(suitesparse)
@@ -52,12 +53,14 @@ else()
5253
BINARY_DIR ${DOWNLOAD_DIR}/suitesparse-build
5354
GIT_REPOSITORY ${suitesparse_url}
5455
GIT_TAG refs/tags/${suitesparse_tag_version}
56+
PATCH_COMMAND ${suitesparse_patch}
5557

5658
CMAKE_CACHE_ARGS -DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
5759
LIST_SEPARATOR ^^
5860
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
5961
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
6062
-DSUITESPARSE_ENABLE_PROJECTS=suitesparse_config^^amd^^colamd^^btf^^klu
63+
-DKLU_USE_CHOLMOD:BOOL=OFF
6164
)
6265
ExternalProject_Get_Property(suitesparse install_dir)
6366
set(SUITESPARSE_HOME ${install_dir})

0 commit comments

Comments
 (0)