8000 Enable Test_ED_MAT for mingw64 · modelica-3rdparty/ExternData@8c6637b · GitHub
[go: up one dir, main page]

Skip to content

Commit 8c6637b

Browse files
committed
Enable Test_ED_MAT for mingw64
1 parent 82bfb1a commit 8c6637b

File tree

2 files changed

+44
-8
lines changed

2 files changed

+44
-8
lines changed

.github/workflows/checkCI.yml

+44-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ defaults:
1010
shell: bash
1111

1212
jobs:
13-
build:
13+
build_linux:
1414
name: build_${{ matrix.platform }}
1515
runs-on: ubuntu-latest
1616
strategy:
@@ -49,10 +49,35 @@ jobs:
4949
name: ExternData_${{ matrix.platform }}
5050
path: ExternData/Resources/Library/${{ matrix.platform }}/*.a
5151

52+
build_mingw64:
53+
name: build_mingw64
54+
runs-on: windows-latest
55+
steps:
56+
- name: Checkout code
57+
uses: actions/checkout@v4
58+
with:
59+
fetch-depth: 5
60+
- name: Install HDF5
61+
shell: pwsh
62+
run: |
63+
$env:PATH="$env:PATH;C:\msys64\mingw64\bin;C:\msys64\usr\bin;"
64+
10000 C:\msys64\usr\bin\pacman.exe -Syu --noconfirm
65+
C:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-x86_64-hdf5 mingw-w64-x86_64-pkgconf
66+
- name: Build with gcc
67+
shell: pwsh
68+
run: |
69+
$env:PATH="$env:PATH;C:\msys64\mingw64\bin;C:\msys64\usr\bin;"
70+
pushd ExternData/Resources/C-Sources
71+
mingw32-make CC="gcc" CFLAGS="-O3 -DNDEBUG" INC="-Ibsxml-json -Iexpat/lib -IC:\msys64\mingw64\include -Iinih -Ilibxls/include -Iminizip -Imodelica -Izlib -Iparson -Ilibxml2/include" TARGETDIR="mingw64"
72+
- name: Upload artifacts
73+
uses: actions/upload-artifact@v4
74+
with:
75+
name: ExternData_mingw64
76+
path: ExternData/Resources/Library/mingw64/*.a
77+
5278
test:
5379
name: test_cmake_${{ matrix.toolchain }}
5480
runs-on: ${{ matrix.os }}
55-
timeout-minutes: 10
5681
strategy:
5782
fail-fast: false
5883
matrix:
@@ -77,12 +102,19 @@ jobs:
77102
uses: actions/checkout@v4
78103
with:
79104
fetch-depth: 5
105+
- name: Install HDF5
106+
if: matrix.compiler == 'mingw'
107+
shell: pwsh
108+
run: |
109+
$env:PATH="$env:PATH;C:\msys64\mingw64\bin;C:\msys64\usr\bin;"
110+
C:\msys64\usr\bin\pacman.exe -Syu --noconfirm
111+
C:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-x86_64-hdf5 mingw-w64-x86_64-pkgconf
80112
- name: Configure
81113
run: |
82114
if [ "${{ matrix.compiler }}" == "msvc" ]; then
83115
cmake -S "$SRCDIR" -B build
84116
elif [ "${{ matrix.compiler }}" == "mingw" ]; then
85-
cmake -S "$SRCDIR" -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -G "MinGW Makefiles"
117+
8000 cmake -S "$SRCDIR" -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCMAKE_EXE_LINKER_FLAGS="-L/C:\msys64\mingw64\lib" -G "MinGW Makefiles"
86118
else
87119
cmake -S "$SRCDIR" -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCMAKE_C_FLAGS="-Wall -Wextra"
88120
fi
@@ -96,6 +128,13 @@ jobs:
96128
cmake --build build -- -j8
97129
fi
98130
- name: Run tests
131+
if: matrix.compiler == 'mingw'
132+
shell: pwsh
133+
run: |
134+
$env:PATH="$env:PATH;C:\msys64\mingw64\bin;C:\msys64\usr\bin;"
135+
ctest --no-tests=error --test-dir build --build-config ${{ matrix.configuration }} --parallel 8
136+
- name: Run tests
137+
if: matrix.compiler != 'mingw'
99138
run: ctest --no-tests=error --test-dir build --build-config ${{ matrix.configuration }} --parallel 8
100139

101140
html_documentation_checks:
@@ -132,6 +171,7 @@ jobs:
132171
echo "::add-matcher::./.github/checkTags.json"
133172
python ./.CI/check_html.py checkTags ./
134173
echo "::remove-matcher owner=checkTags::"
174+
135175
syntax_checks:
136176
timeout-minutes: 5
137177
runs-on: ubuntu-latest
@@ -150,6 +190,7 @@ jobs:
150190
echo "::add-matcher::./.github/moparser.json"
151191
ModelicaSyntaxChecker/Linux64/moparser -v 3.4 -r ExternData
152192
echo "::remove-matcher owner=moparser::"
193+
153194
deprecation_checks:
154195
timeout-minutes: 5
155196
runs-on: ubuntu-latest

ExternData/Resources/BuildProjects/CMake/test.cmake

-5
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ if(EXISTS "${ED_TEST_DIR}")
4343
Test_ED_XML
4444
Test_ED_XML2
4545
)
46-
if(MINGW)
47-
list(REMOVE_ITEM ED_TESTS Test_ED_MAT)
48-
endif()
4946
foreach(TEST ${ED_TESTS})
5047
add_executable(${TEST}
5148
"${ED_TEST_DIR}/${TEST}.cc"
@@ -76,8 +73,6 @@ if(EXISTS "${ED_TEST_DIR}")
7673
)
7774
if(UNIX)
7875
list(APPEND ED_ALL_LIBS m)
79-
elseif(MINGW)
80-
list(REMOVE_ITEM ED_ALL_LIBS hdf5)
8176
endif()
8277
target_link_libraries(${TEST} PRIVATE ${ED_ALL_LIBS})
8378

0 commit comments

Comments
 (0)
0