Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:(encoder) implement encoding on Virtual Machine for supporting AArch64 #580

Merged
merged 17 commits into from
Feb 1, 2024
2 changes: 1 addition & 1 deletion .github/workflows/benchmark-linux-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17.1
go-version: 1.21.1

- uses: actions/cache@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmark-linux-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17.1
go-version: 1.21.1

- uses: actions/cache@v2
with:
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/compatibility_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
strategy:
matrix:
go-version: [1.15.x, 1.16.x, 1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x]
go-version: [1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x]
os: [arm, X64]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -28,10 +28,16 @@ jobs:
${{ runner.os }}-go-

- name: main
run: GOMAXPROCS=4 go test -v -gcflags="all=-l" -race github.com/bytedance/sonic
run: GOMAXPROCS=4 go test -v -race github.com/bytedance/sonic

- name: encoder
run: GOMAXPROCS=4 go test -v -race github.com/bytedance/sonic/internal/encoder

- name: issues
run: GOMAXPROCS=4 go test -v -race github.com/bytedance/sonic/issue_test

- name: ast
run: GOMAXPROCS=4 go test -v -gcflags="all=-l" -race github.com/bytedance/sonic/ast
run: GOMAXPROCS=4 go test -v -race github.com/bytedance/sonic/ast

- name: qemu
run: sh scripts/qemu.sh
7 changes: 5 additions & 2 deletions .github/workflows/fuzzing-linux-x64.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: Fuzz Test Linux-X64
name: Fuzz Test Linux

on: pull_request

jobs:
build:
runs-on: [self-hosted, X64]
strategy:
matrix:
os: [arm, X64]
runs-on: ${{ matrix.os }}
steps:
- name: Clear repository
run: sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit_test-linux-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
strategy:
matrix:
go-version: [1.16.x, 1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x]
go-version: [1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x]
runs-on: [self-hosted, X64]
steps:
- name: Clear repository
Expand Down
141 changes: 0 additions & 141 deletions compat.go

This file was deleted.

5 changes: 2 additions & 3 deletions decoder/decoder_compat.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
package decoder

import (
`encoding/json`
`io`
`reflect`

Expand Down Expand Up @@ -66,11 +65,11 @@ func Pretouch(vt reflect.Type, opts ...option.CompileOption) error {
}

// TODO: replace stream decoder with dev/decoder
type StreamDecoder = json.Decoder
type StreamDecoder = decoder.StreamDecoder

// NewStreamDecoder adapts to encoding/json.NewDecoder API.
//
// NewStreamDecoder returns a new decoder that reads from r.
func NewStreamDecoder(r io.Reader) *StreamDecoder {
return json.NewDecoder(r)
return decoder.NewStreamDecoder(r)
}
2 changes: 0 additions & 2 deletions encoder/encoder_amd64.go → encoder/encoder.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build amd64,go1.16,!go1.22

/*
* Copyright 2023 ByteDance Inc.
*
Expand Down
Loading
Loading