Skip to content

Commit 2e6b770

Browse files
committed
test with msys2
Signed-off-by: Nicolas Rol <[email protected]>
1 parent a830773 commit 2e6b770

File tree

1 file changed

+26
-22
lines changed

1 file changed

+26
-22
lines changed

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

+26-22
Original file line numberDiff line numberDiff line change
@@ -207,55 +207,59 @@ jobs:
207207
- name: Checkout sources
208208
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
209209

210-
- name: Install MPFR and GMP via Chocolatey
210+
- name: Install MSYS2 and dependencies
211211
run: |
212-
choco install mpfr --no-progress
213-
choco install gmp --no-progress
214-
215-
- name: Configure MPFR paths
216-
run: |
217-
set MPFR_INCLUDE_DIR=C:\ProgramData\chocolatey\lib\mpfr\tools\include
218-
set MPFR_LIBRARY_DIR=C:\ProgramData\chocolatey\lib\mpfr\tools\lib
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
219217
220218
- name: Download OpenBLAS binaries
221219
run: |
222220
curl -L -o OpenBLAS.zip https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.29/OpenBLAS-0.3.29-x64.zip
223221
mkdir C:\thirdparties\OpenBLAS
224222
tar -xf OpenBLAS.zip -C C:\thirdparties\OpenBLAS
225223
226-
- name: Configure OpenBLAS paths
224+
- name: Configure environment variables for dependencies
227225
run: |
228-
set OPENBLAS_INCLUDE_DIR=C:\thirdparties\OpenBLAS\include
229-
set OPENBLAS_LIBRARY_DIR=C:\thirdparties\OpenBLAS\lib
226+
echo "export OPENBLAS_INCLUDE_DIR=C:/thirdparties/OpenBLAS/include" >> $GITHUB_ENV
227+
echo "export OPENBLAS_LIBRARY_DIR=C:/thirdparties/OpenBLAS/lib" >> $GITHUB_ENV
228+
echo "export GMP_INCLUDE_DIR=/mingw64/include" >> $GITHUB_ENV
229+
echo "export GMP_LIBRARY_DIR=/mingw64/lib" >> $GITHUB_ENV
230+
echo "export MPFR_INCLUDE_DIR=/mingw64/include" >> $GITHUB_ENV
231+
echo "export MPFR_LIBRARY_DIR=/mingw64/lib" >> $GITHUB_ENV
230232
231233
- name: Configure 3rd parties
232234
run: >
233-
cmake -S %GITHUB_WORKSPACE%\metrix-simulator\external
234-
-B %GITHUB_WORKSPACE%\metrix-simulator\build\external
235-
-DOPENBLAS_INCLUDE_DIR=%OPENBLAS_INCLUDE_DIR%
236-
-DOPENBLAS_LIBRARY_DIR=%OPENBLAS_LIBRARY_DIR%
237-
-DMPFR_INCLUDE_DIR=%MPFR_INCLUDE_DIR%
238-
-DMPFR_LIBRARY_DIR=%MPFR_LIBRARY_DIR%
235+
cmake -S ${{ github.workspace }}/metrix-simulator/external
236+
-B ${{ github.workspace }}/metrix-simulator/build/external
237+
-DOPENBLAS_INCLUDE_DIR=$OPENBLAS_INCLUDE_DIR
238+
-DOPENBLAS_LIBRARY_DIR=$OPENBLAS_LIBRARY_DIR
239+
-DGMP_INCLUDE_DIR=$GMP_INCLUDE_DIR
240+
-DGMP_LIBRARY_DIR=$GMP_LIBRARY_DIR
241+
-DMPFR_INCLUDE_DIR=$MPFR_INCLUDE_DIR
242+
-DMPFR_LIBRARY_DIR=$MPFR_LIBRARY_DIR
239243
240244
- name: Build 3rd parties
241245
run: >
242-
cmake --build %GITHUB_WORKSPACE%\metrix-simulator\build\external --config Release
246+
cmake --build ${{ github.workspace }}/metrix-simulator/build/external --config Release
243247
244248
- name: Configure CMake
245249
run: >
246-
cmake -Wno-dev -S %GITHUB_WORKSPACE%\metrix-simulator -B %GITHUB_WORKSPACE%\metrix-simulator\build
250+
cmake -Wno-dev -S ${{ github.workspace }}/metrix-simulator -B ${{ github.workspace }}/metrix-simulator/build
247251
-DCMAKE_BUILD_TYPE=Release
248-
-DCMAKE_INSTALL_PREFIX=%GITHUB_WORKSPACE%\metrix-simulator\build\install
252+
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/metrix-simulator/build/install
249253
-DOPENBLAS_INCLUDE_DIR=%OPENBLAS_INCLUDE_DIR%
250254
-DOPENBLAS_LIBRARY_DIR=%OPENBLAS_LIBRARY_DIR%
251255
-DMPFR_INCLUDE_DIR=%MPFR_INCLUDE_DIR%
252256
-DMPFR_LIBRARY_DIR=%MPFR_LIBRARY_DIR%
253257
254258
- name: Build
255-
run: cmake --build %GITHUB_WORKSPACE%\metrix-simulator\build --target install --parallel 2 --config Release
259+
run: cmake --build ${{ github.workspace }}/metrix-simulator/build --target install --parallel 2 --config Release
256260

257261
- name: Tests
258-
run: cd %GITHUB_WORKSPACE%\metrix-simulator\build && ctest -j2 --output-on-failure -C Release
262+
run: cd ${{ github.workspace }}/metrix-simulator/build && ctest -j2 --output-on-failure -C Release
259263

260264
- name: Upload Metrix Simulator archive
261265
if: ${{ github.event_name == 'workflow_dispatch' && inputs.generate_artifacts }}

0 commit comments

Comments
 (0)