Skip to content

Commit 2dace5d

Browse files
committed
update CI-related stuff
1 parent 7568033 commit 2dace5d

File tree

3 files changed

+25
-19
lines changed

3 files changed

+25
-19
lines changed

appveyor.yml renamed to .appveyor.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ build_script:
4747
cmake -version
4848
grep --version
4949
cmake .. -DSC_ENABLE_TESTING=ON -G"$env:GENERATOR" -DSC_BUILD_SCHEMAS="ifc2x3;ap214e3;ap209"
50-
dir *.sln
51-
dir *.vcxproj
5250
echo "filtering build output with grep"
5351
cmake --build . --config Debug | grep -ve "CMake does not need to re-run because" -e "ZERO_CHECK.ZERO_CHECK" -e "^ Creating directory"
5452

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ sudo: false
22
language: cpp
33
compiler:
44
- clang
5-
script: mkdir build && cd build && cmake .. -DSC_ENABLE_TESTING=ON && make -j3 && ctest -j2; if [ $? -ne 0 ]; then echo; echo; echo "-----------------------------"; grep -niB20 "Test Failed" Testing/Temporary/LastTest.log && false; fi
5+
script: mkdir build && cd build && cmake .. -DSC_ENABLE_TESTING=ON && make -j3 && ctest -j2 --output-on-failure
66
branches:
77
only:
88
- master

misc/summarize-appveyor-log.go

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ func main() {
1818
printMessages("warning", warns)
1919
}
2020

21-
/* the regex will match lines like
22-
[ 00:03:42] c:\projects\stepcode\src\base\sc_benchmark.h(45): war*ning C4251: 'benchmark::descr' : class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'benchmark' [C:\projects\STEPcode\build\src\base\base.vcxproj]
21+
/* categorizes warnings and errors based upon the MSVC message number (i.e. C4244)
22+
* the regex will match lines like
23+
[ 00:03:42] c:\projects\stepcode\src\base\sc_benchmark.h(45): warning C4251: 'benchmark::descr' : class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'benchmark' [C:\projects\STEPcode\build\src\base\base.vcxproj]
2324
[00:03:48] C:\projects\STEPcode\src\base\sc_benchmark.cc(61): warning C4244: '=' : conversion from 'SIZE_T' to 'long', possible loss of data [C:\projects\STEPcode\build\src\base\base.vcxproj]*
2425
*/
25-
func countMessages(log string) (warns, errs map[string][]string) {
26+
func countMessages(log []string) (warns, errs map[string][]string) {
2627
warns = make(map[string][]string)
2728
errs = make(map[string][]string)
2829
tstamp := `\[\d\d:\d\d:\d\d\] `
@@ -33,9 +34,10 @@ func countMessages(log string) (warns, errs map[string][]string) {
3334
tail := `\[[^\[\]]*\]`
3435
warnRe := regexp.MustCompile(tstamp + fname + fline + `warning ` + msgNr + msgTxt + tail)
3536
errRe := regexp.MustCompile(tstamp + fname + fline + `(?:fatal )?error ` + msgNr + msgTxt + tail)
36-
reScanner := bufio.NewScanner(strings.NewReader(log))
37-
for reScanner.Scan() {
38-
line := reScanner.Text()
37+
//reScanner := bufio.NewScanner(strings.NewReader(...log))
38+
//for reScanner.Scan() {
39+
//line := reScanner.Text()
40+
for _,line := range log {
3941
if warnRe.MatchString(line) {
4042
key := warnRe.ReplaceAllString(line, "$3")
4143
path := strings.ToLower(warnRe.ReplaceAllString(line, "$1:$2"))
@@ -94,23 +96,29 @@ func printMessages(typ string, m map[string][]string) {
9496
}
9597
}
9698

97-
func unwrap() (log string) {
98-
//read stdin, write stdout
99-
newline := true
99+
//
100+
func unwrap() (log []string) {
101+
startNewLine := true
100102
unwrapScanner := bufio.NewScanner(os.Stdin)
103+
var lineOut string
101104
for unwrapScanner.Scan() {
102-
lastNewline := newline
103-
line := unwrapScanner.Text()
104-
newline = (len(line) < 240)
105+
lastNewline := startNewLine
106+
lineIn := unwrapScanner.Text()
107+
startNewLine = (len(lineIn) < 240) || strings.HasSuffix(lineIn,"vcxproj]")
105108
if !lastNewline {
106-
log += fmt.Sprintf("%s", line[11:])
109+
lineOut += lineIn[11:]
107110
} else {
108-
log += fmt.Sprintf("%s", line)
111+
lineOut = lineIn
109112
}
110-
if newline {
111-
log += fmt.Sprintf("\n")
113+
if startNewLine {
114+
log = append(log,lineOut)
115+
lineOut = ""
116+
//log += fmt.Sprintf("\n")
112117
}
113118
}
119+
if len(lineOut) > 0 {
120+
log = append(log,lineOut)
121+
}
114122
if err := unwrapScanner.Err(); err != nil {
115123
fmt.Fprintln(os.Stderr, "Error reading appveyor log:", err)
116124
}

0 commit comments

Comments
 (0)