Skip to content

Commit 2d79503

Browse files
authored
Run CI on MSYS2 (#1725)
See: sourcemeta/blaze#448 Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
1 parent 96c5d5a commit 2d79503

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,59 +21,74 @@ jobs:
2121
type: static
2222
shell: sh
2323
benchmark: macos/llvm
24+
format: true
2425
- os: macos-latest
2526
cc: clang
2627
cxx: clang++
2728
type: shared
2829
shell: sh
30+
format: true
2931
- os: macos-latest
3032
cc: gcc-13
3133
cxx: g++-13
3234
type: static
3335
shell: sh
36+
format: true
3437
benchmark: macos/gcc
3538
- os: ubuntu-latest
3639
cc: clang
3740
cxx: clang++
3841
type: static
3942
shell: sh
43+
format: true
4044
benchmark: linux/llvm
4145
- os: ubuntu-latest
4246
cc: gcc
4347
cxx: g++
4448
type: static
4549
shell: sh
50+
format: true
4651
benchmark: linux/gcc
4752
- os: ubuntu-latest
4853
cc: clang
4954
cxx: clang++
5055
type: shared
5156
shell: sh
57+
format: true
5258
- os: ubuntu-latest
5359
cc: gcc
5460
cxx: g++
5561
type: shared
5662
shell: sh
63+
format: true
5764
- os: windows-latest
5865
type: static
5966
shell: pwsh
67+
format: true
6068
benchmark: windows/msvc
6169
- os: windows-latest
6270
type: shared
6371
shell: pwsh
72+
format: true
73+
- os: windows-latest
74+
type: static
75+
shell: msys2 {0}
76+
format: false
6477

6578
# Sanitizers
6679
- os: ubuntu-latest
6780
cc: clang
6881
cxx: clang++
6982
type: static
7083
shell: sh
84+
format: false
7185
options: -DSOURCEMETA_CORE_ADDRESS_SANITIZER:BOOL=ON
7286
- os: ubuntu-latest
7387
cc: clang
7488
cxx: clang++
7589
type: static
7690
shell: sh
91+
format: false
7792
options: -DSOURCEMETA_CORE_UNDEFINED_SANITIZER:BOOL=ON
7893

7994
defaults:
@@ -85,8 +100,11 @@ jobs:
85100
CC: ${{ matrix.platform.cc }}
86101
CXX: ${{ matrix.platform.cxx }}
87102
steps:
88-
- name: Install ClangFormat
89-
run: pipx install clang-format==19.1.0
103+
- name: Install dependencies (MSYS2)
104+
uses: msys2/setup-msys2@v2
105+
if: matrix.platform.shell == 'msys2 {0}'
106+
with:
107+
install: cmake make gcc
90108

91109
- uses: actions/checkout@v4
92110
- name: Install dependencies (macOS)
@@ -95,6 +113,11 @@ jobs:
95113
env:
96114
HOMEBREW_NO_ANALYTICS: 1
97115
HOMEBREW_NO_AUTO_UPDATE: 1
116+
117+
- name: Install ClangFormat
118+
run: pipx install clang-format==19.1.0 --verbose
119+
if: matrix.platform.format
120+
98121
- run: cmake --version
99122
- name: Configure (static)
100123
if: matrix.platform.type == 'static'
@@ -119,6 +142,7 @@ jobs:
119142
-DCMAKE_COMPILE_WARNING_AS_ERROR:BOOL=ON
120143
${{ matrix.platform.options }}
121144
- run: cmake --build ./build --config Release --target clang_format_test
145+
if: matrix.platform.format
122146
- run: cmake --build ./build --config Release --parallel 4
123147
- run: >
124148
cmake --install ./build --prefix ./build/dist --config Release --verbose

test/json/jsontestsuite.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class JSONTest : public testing::Test {
2525
// certain test cases.
2626
while (stream.peek() != std::char_traits<char>::eof()) {
2727
switch (stream.get()) {
28+
case '\r':
29+
case '\t':
2830
case '\n':
2931
case ' ':
3032
break;

0 commit comments

Comments
 (0)