Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
deatil committed Sep 23, 2024
1 parent 2e6236e commit 49b7a71
Show file tree
Hide file tree
Showing 447 changed files with 73,923 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Auto-detect text files, ensure they use LF.
* text=auto eol=lf

# These files are always considered text and should use LF.
# See core.whitespace @ https://git-scm.com/docs/git-config for whitespace flags.
*.json text eol=lf whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,tabwidth=4
*.test text eol=lf whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,tabwidth=4
*.yml text eol=lf whitespace=blank-at-eol,blank-at-eof,space-before-tab,tab-in-indent,tabwidth=2

# Exclude non-essential files from dist
/.github export-ignore
/docs export-ignore
/tests export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/appveyor.yml export-ignore
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21

- name: Go mod tidy
run: go mod tidy

- name: Unit tests
run: go test -coverprofile=cover.out ./...

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: cover.out
30 changes: 30 additions & 0 deletions .github/workflows/test_macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: macOS

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22

- name: Go mod tidy
run: go mod tidy

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...
env:
GODEBUG: x509sha1=1
40 changes: 40 additions & 0 deletions .github/workflows/test_qemu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: arm64-qemu

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

test:
strategy:
matrix:
go-version: [1.21.x]
arch: [arm64]
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Check out code
uses: actions/checkout@v4

- name: Go mod tidy
run: go mod tidy

- name: Test
run: go test -v -short ./...
env:
DISABLE_SM3NI: 1
GODEBUG: x509sha1=1
GOARCH: ${{ matrix.arch }}
39 changes: 39 additions & 0 deletions .github/workflows/test_sm_ni.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: sm3-ni-qemu

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

test:
strategy:
matrix:
go-version: [1.21.x]
arch: [arm64]
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Check out code
uses: actions/checkout@v4

- name: Go mod tidy
run: go mod tidy

- name: Test
run: go test -v -short ./...
env:
GODEBUG: x509sha1=1
GOARCH: ${{ matrix.arch }}
73 changes: 73 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Golang #
######################
# `go test -c` 生成的二进制文件
*.test
# go coverage 工具
*.out
*.prof
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*

# 编译文件 #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so

# 压缩包 #
############
# *.7z
*.dmg
# *.gz
*.iso
# *.jar
# *.rar
# *.tar
# *.zip

# 日志文件和数据库 #
######################
*.log
*.sqlite
*.db

# 系统生成文件 #
######################
.DS_Store
.DS_Store?
.AppleDouble
.LSOverride
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
.TemporaryItems
.fseventsd
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# IDE 和编辑器 #
######################
.idea/
/go_build_*
out/
.vscode/
.vscode/settings.json
*.sublime*
__debug_bin
.project

# 临时文件 #
######################
go.sum
tmp/
.tmp/


Loading

0 comments on commit 49b7a71

Please sign in to comment.