Skip to content

Commit c121472

Browse files
authored
Merge pull request #420 from ugorji/devel
Merging v1.3 development changes into master
2 parents 71baf86 + fc87261 commit c121472

File tree

128 files changed

+122568
-49144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+122568
-49144
lines changed

.github/workflows/test.yml

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@ name: Build and Test go-codec
22
on:
33
workflow_dispatch: {}
44
push:
5-
branches: [ master ]
6-
paths: [ '**.go' ]
5+
branches: [ master, devel ]
6+
paths: [ '**.go', '.github/workflows/*' ]
77
pull_request:
88
branches: [ master ]
9-
paths: [ '**.go' ]
9+
paths: [ '**.go', '.github/workflows/*' ]
1010
jobs:
11-
tests:
11+
master_tests:
12+
if: github.ref_name == 'master'
1213
strategy:
1314
fail-fast: false
1415
matrix:
15-
go: [ '1.19', '1.17', '1.11', '1.20.0-rc.1', '1.24' ]
16+
go: [ '1.24', '1.19', '1.17', '1.11' ]
1617
arch: [ amd64 ]
1718
os: [ ubuntu-latest ]
1819
include:
@@ -24,7 +25,7 @@ jobs:
2425
GO111MODULE: 'on'
2526
COVER_GO_VERSION: '1.19'
2627
GOARCH: ${{ matrix.arch }}
27-
name: go ${{ matrix.go }} on ${{ matrix.arch }}
28+
name: go ${{ matrix.go }} on ${{ matrix.arch }} at branch ${{ github.ref_name }}
2829
steps:
2930
- uses: actions/checkout@v3
3031
- uses: actions/setup-go@v3
@@ -35,12 +36,47 @@ jobs:
3536
run: |
3637
cd codec
3738
go mod edit -droprequire github.com/ugorji/go
38-
t=( "" "safe" "notfastpath" "codecgen" )
39-
for i in "${t[@]}"; do go test "-tags=alltests ${i}" "-run=Suite" "-coverprofile=coverage.${{ matrix.go }}.${{ matrix.arch }}.${i}.txt"; done
39+
t=( "" "safe" "notfastpath" "notmono" )
40+
for i in "${t[@]}"; do
41+
go test "-tags=alltests codec.nobench ${i}" "-run=Suite" "-coverprofile=coverage.${{ matrix.go }}.${{ matrix.arch }}.${i}.txt"
42+
done
4043
- uses: codecov/codecov-action@v3
4144
if: matrix.go == env.COVER_GO_VERSION
4245
with:
4346
directory: ./codec
47+
devel_tests:
48+
if: github.ref_name == 'devel'
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
go: [ '1.24', '1.22' ]
53+
arch: [ amd64 ]
54+
os: [ ubuntu-latest ]
55+
include:
56+
- go: '1.22'
57+
arch: '386'
58+
os: ubuntu-latest
59+
runs-on: ${{ matrix.os }}
60+
env:
61+
GO111MODULE: 'on'
62+
GOARCH: ${{ matrix.arch }}
63+
name: go ${{ matrix.go }} on ${{ matrix.arch }} at branch ${{ github.ref_name }}
64+
steps:
65+
- uses: actions/checkout@v3
66+
- uses: actions/setup-go@v3
67+
with:
68+
go-version: ${{ matrix.go }}
69+
- shell: bash
70+
run: cd codec; go get github.com/google/go-cmp/cmp
71+
- name: Run tests
72+
shell: bash
73+
run: |
74+
cd codec
75+
go mod edit -droprequire github.com/ugorji/go
76+
t=( "" "safe" "notfastpath" "notmono" )
77+
for i in "${t[@]}"; do
78+
go test "-tags=alltests codec.nobench ${i}" "-run=Suite" "-coverprofile=coverage.${{ matrix.go }}.${{ matrix.arch }}.${i}.txt"
79+
done
4480
4581
4682
# No need to go get, as github knows its working out of this folder.
@@ -68,8 +104,6 @@ jobs:
68104
# Now is a good time to remove that requirements cycle.
69105
#
70106
#
71-
#
72-
#
73107
# --- SCRATCH ---
74108
# coverage:
75109
# if: ${{ always() }}

README.md

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,19 @@
1010
This repository contains the `go-codec` library, the `codecgen` tool and
1111
benchmarks for comparing against other libraries.
1212

13-
This is a High Performance, Feature-Rich Idiomatic Go 1.4+ codec/encoding library
13+
This is a High Performance, Feature-Rich Idiomatic Go 1.20+ codec/encoding library
1414
for binary and text formats: binc, msgpack, cbor, json and simple.
1515

16-
It fully supports the legacy `GOPATH` and the new `go modules` modes.
16+
It supports generics and monomorphization, based on build tags set.
1717

1818
## Code Organization and Module Support
1919

20-
This repository consists of 4 modules:
20+
This repository consists of 1 module:
2121

2222
- `github.com/ugorji/go/codec` [README](codec/README.md)
23-
- `github.com/ugorji/go/codec/codecgen` (requires `github.com/ugorji/go/codec`) [README](codec/codecgen/README.md)
24-
- `github.com/ugorji/go/codec/bench` (requires `github.com/ugorji/go/codec`) [README](codec/bench/README.md)
25-
- `github.com/ugorji/go` (requires `github.com/ugorji/go/codec`)
26-
27-
For encoding and decoding, the `github.com/ugorji/go/codec` module is sufficient.
2823

2924
To install:
3025

3126
```
3227
go get github.com/ugorji/go/codec
3328
```
34-
35-
The other modules exist for specific uses, and all require `github.com/ugorji/go/codec`
36-
37-
- `github.com/ugorji/go/codec/codecgen` generates high performance static encoders/decoders for given types
38-
- `github.com/ugorji/go/codec/bench` benchmarks codec against other popular go libraries
39-
- `github.com/ugorji/go` is here for [historical compatibility reasons, as modules was initially introduced only at repo root](https://github.com/ugorji/go/issues/299)

0 commit comments

Comments
 (0)