Skip to content

Commit

Permalink
ci: support codecov (bytedance#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
liuq19 authored May 30, 2023
1 parent 1b7b5ae commit a4cd15e
Show file tree
Hide file tree
Showing 35 changed files with 38 additions and 35 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/push-check-linux-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
- name: Unit Test
run: |
go test -v ./...
go test -race -covermode=atomic -coverprofile=coverage.txt ./...
cd ./external_jsonlib_test
go test -v ./...
- name: Codecov
run: bash <(curl -s https://codecov.io/bash)
2 changes: 1 addition & 1 deletion api.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,4 @@ func Get(src []byte, path ...interface{}) (ast.Node, error) {
// which can reduce unnecessary memory copy.
func GetFromString(src string, path ...interface{}) (ast.Node, error) {
return ast.NewSearcher(src).GetByPath(path...)
}
}
2 changes: 1 addition & 1 deletion ast/api_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,4 @@ func (self *Searcher) GetByPath(path ...interface{}) (Node, error) {
return Node{}, self.parser.ExportError(err)
}
return newRawNode(self.parser.s[start:self.parser.p], t), nil
}
}
2 changes: 1 addition & 1 deletion ast/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,4 +256,4 @@ func (self *Node) encodeObject(buf *[]byte) error {

*buf = append(*buf, '}')
return nil
}
}
2 changes: 1 addition & 1 deletion ast/iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,4 @@ type PairSlice []Pair

func (self PairSlice) Sort() {
radixQsort(self, 0, maxDepth(len(self)))
}
}
2 changes: 1 addition & 1 deletion ast/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -1805,4 +1805,4 @@ func unwrapError(err error) *Node {
p: unsafe.Pointer(&msg),
}
}
}
}
2 changes: 1 addition & 1 deletion ast/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -615,4 +615,4 @@ func (self *Parser) ExportError(err types.ParsingError) error {
Src : self.s,
Code: err,
}.Description())
}
}
2 changes: 1 addition & 1 deletion ast/stubs_go120.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ var (
)

//go:linkname unquoteBytes encoding/json.unquoteBytes
func unquoteBytes(s []byte) (t []byte, ok bool)
func unquoteBytes(s []byte) (t []byte, ok bool)
2 changes: 1 addition & 1 deletion encoder/encoder_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ var (
//
// NewStreamEncoder returns a new encoder that write to w.
NewStreamEncoder = encoder.NewStreamEncoder
)
)
2 changes: 1 addition & 1 deletion internal/decoder/assembler_amd64_go117.go
Original file line number Diff line number Diff line change
Expand Up @@ -1989,4 +1989,4 @@ func (self *_Assembler) WriteRecNotAX(i int, ptr obj.Addr, rec obj.Addr, saveDI
self.Link("_no_writeBarrier" + strconv.Itoa(i) + "_{n}")
self.Emit("MOVQ", ptr, rec)
self.Link("_end_writeBarrier" + strconv.Itoa(i) + "_{n}")
}
}
2 changes: 1 addition & 1 deletion internal/decoder/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1152,4 +1152,4 @@ func (self *_Compiler) checkIfSkip(p *_Program, vt reflect.Type, c byte) int {
p.pin(j)
p.int(_OP_add, 1)
return s
}
}
2 changes: 1 addition & 1 deletion internal/decoder/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ func (self *_Assembler) debug_instr(i int, v *_Instr) {
}
self.force_gc()
}
}
}
2 changes: 1 addition & 1 deletion internal/decoder/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,4 +252,4 @@ func Skip(data []byte) (start int, end int) {
ret := native.SkipOne(&s, &p, m, uint64(0))
types.FreeStateMachine(m)
return ret, p
}
}
2 changes: 1 addition & 1 deletion internal/decoder/pools.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,4 @@ func findOrCompile(vt *rt.GoType) (_Decoder, error) {
} else {
return nil, err
}
}
}
2 changes: 1 addition & 1 deletion internal/decoder/stubs_go120.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ func memclrHasPointers(ptr unsafe.Pointer, n uintptr)
//go:noescape
//go:linkname memclrNoHeapPointers runtime.memclrNoHeapPointers
//goland:noinspection GoUnusedParameter
func memclrNoHeapPointers(ptr unsafe.Pointer, n uintptr)
func memclrNoHeapPointers(ptr unsafe.Pointer, n uintptr)
2 changes: 1 addition & 1 deletion internal/encoder/assembler_amd64_go117.go
Original file line number Diff line number Diff line change
Expand Up @@ -1199,4 +1199,4 @@ func (self *_Assembler) WriteRecNotAX(i int, ptr obj.Addr, rec obj.Addr) {
self.Link("_no_writeBarrier" + strconv.Itoa(i) + "_{n}")
self.Emit("MOVQ", ptr, rec)
self.Link("_end_writeBarrier" + strconv.Itoa(i) + "_{n}")
}
}
2 changes: 1 addition & 1 deletion internal/encoder/debug_go117.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,4 +202,4 @@ func (self *_Assembler) print_ptr(i int, ptr obj.Addr, lea bool) {
self.Emit("MOVQ", _R10, _BX)
self.dcall(_F_printptr)
self.dload(_REG_debug...)
}
}
2 changes: 1 addition & 1 deletion internal/encoder/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,4 +325,4 @@ func Valid(data []byte) (ok bool, start int) {
}

return true, ret
}
}
2 changes: 1 addition & 1 deletion internal/encoder/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ func goPanic(code int, val unsafe.Pointer) {
default:
panic("encoder error!")
}
}
}
2 changes: 1 addition & 1 deletion internal/encoder/pools.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,4 @@ func pretouchRec(vtm map[reflect.Type]uint8, opts option.CompileOptions) error {
}
opts.RecursiveDepth -= 1
return pretouchRec(next, opts)
}
}
2 changes: 1 addition & 1 deletion internal/encoder/primitives.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,4 @@ func asJson(v unsafe.Pointer) (string, error) {
text := assertI2I(_T_json_Marshaler, *(*rt.GoIface)(v))
r, e := (*(*json.Marshaler)(unsafe.Pointer(&text))).MarshalJSON()
return rt.Mem2Str(r), e
}
}
2 changes: 1 addition & 1 deletion internal/encoder/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ func (enc *StreamEncoder) Encode(val interface{}) (err error) {
free_bytes:
freeBytes(out)
return err
}
}
2 changes: 1 addition & 1 deletion internal/encoder/stubs_go120.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ func memclrNoHeapPointers(ptr unsafe.Pointer, n uintptr)
var _runtime_writeBarrier uintptr

//go:linkname gcWriteBarrierAX runtime.gcWriteBarrier
func gcWriteBarrierAX()
func gcWriteBarrierAX()
2 changes: 1 addition & 1 deletion internal/native/avx/native_amd64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/native/avx2/native_amd64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/native/native_amd64.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,4 @@ func __validate_utf8(s *string, p *int, m *types.StateMachine) (ret int)
//go:nosplit
//go:noescape
//goland:noinspection GoUnusedParameter
func __validate_utf8_fast(s *string) (ret int)
func __validate_utf8_fast(s *string) (ret int)
2 changes: 1 addition & 1 deletion internal/native/sse/native_amd64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion loader/funcdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,4 @@ func funcNameParts(name string) (string, string, string) {
return name, "", ""
}
return name[:i], "[...]", name[j+1:]
}
}
2 changes: 1 addition & 1 deletion loader/funcdata_go120.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,4 +542,4 @@ func makePctab(funcs []Func, cuOffset []uint32, nameOffset []int32) (pctab []byt
return
}

func registerFunction(name string, pc uintptr, textSize uintptr, fp int, args int, size uintptr, argptrs uintptr, localptrs uintptr) {}
func registerFunction(name string, pc uintptr, textSize uintptr, fp int, args int, size uintptr, argptrs uintptr, localptrs uintptr) {}
2 changes: 1 addition & 1 deletion loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ type Loader struct {
Name string // module name
File string // file name
Options
}
}
2 changes: 1 addition & 1 deletion loader/loader_go116.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@ func Load(text []byte, funcs []Func, modulename string, filenames []string) (out
out[i] = Function(&m)
}
return
}
}
2 changes: 1 addition & 1 deletion loader/loader_go116_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ func TestLoad(t *testing.T) {
require.Equal(t, 2, j)
require.Equal(t, "hook1", hstr)

}
}
2 changes: 1 addition & 1 deletion loader/mmap_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ func mprotect(p uintptr, nb int) {
if _, _, err := syscall.RawSyscall(syscall.SYS_MPROTECT, p, uintptr(nb), _RX); err != 0 {
panic(err)
}
}
}
2 changes: 1 addition & 1 deletion loader/pcdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ func (self Pcdata) MarshalBinary() (data []byte, err error) {
sv = v.Val
}
return
}
}
2 changes: 1 addition & 1 deletion utf8/utf8.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ func Validate(src []byte) bool {
// ValidateString as Validate, but for string.
func ValidateString(src string) bool {
return native.ValidateUTF8Fast(&src) == 0
}
}

0 comments on commit a4cd15e

Please sign in to comment.