From 7fa33f2c1b77266d416e038066955a59a1685473 Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Fri, 21 Jan 2022 13:11:34 +0800 Subject: [PATCH 01/10] Create ci.yml --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..be05e47 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: Go + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + + build: + runs-on: ubuntu-latest + strategy: + matrix: + goVer: [ '1.15', '1.16', '1.17' ] + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.goVer }} + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... From b2f061e39507002fe94e59e6ec759f1e7588a3cd Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Fri, 21 Jan 2022 13:20:37 +0800 Subject: [PATCH 02/10] Update ci.yml --- .github/workflows/ci.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be05e47..161e934 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - goVer: [ '1.15', '1.16', '1.17' ] + goVer: [ '1.15'] steps: - uses: actions/checkout@v2 @@ -21,6 +21,19 @@ jobs: with: go-version: ${{ matrix.goVer }} + - name: Setup Environment + run: | + echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV + echo "$(go env GOPATH)/bin" >> $GITHUB_PATH + + - name: Module cache + uses: actions/cache@v2.1.7 + env: + cache-name: go-mod-cache + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }} + - name: Build run: go build -v ./... From 096a79d55405483b163b994a2cb8baf073cd3f3e Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Fri, 21 Jan 2022 13:23:40 +0800 Subject: [PATCH 03/10] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 161e934..954e9c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Go +name: ci on: push: From 5733222dcbddb8b0bc2aed9a05d5e26f2e363c8b Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Fri, 21 Jan 2022 14:12:17 +0800 Subject: [PATCH 04/10] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4fed5b0..d67dbd4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # GM-Standards SM2/SM3/SM4 for Go -[![Build Status](https://travis-ci.com/emmansun/gmsm.svg?branch=main)](https://travis-ci.com/emmansun/gmsm) [![Documentation](https://godoc.org/github.com/emmansun/gmsm?status.svg)](https://godoc.org/github.com/emmansun/gmsm) [![Release](https://img.shields.io/github/release/emmansun/gmsm/all.svg)](https://github.com/emmansun/gmsm/releases) +CI [![Documentation](https://godoc.org/github.com/emmansun/gmsm?status.svg)](https://godoc.org/github.com/emmansun/gmsm) [![Release](https://img.shields.io/github/release/emmansun/gmsm/all.svg)](https://github.com/emmansun/gmsm/releases) This is a **SM2 sm2p256v1** implementation whose performance is similar like golang native NIST P256 under **amd64** and **arm64**, for implementation detail, please refer [SM2实现细节](https://github.com/emmansun/gmsm/wiki/SM2%E6%80%A7%E8%83%BD%E4%BC%98%E5%8C%96). From 9961866ceedd0b6c4159a47b171daca06a3458ab Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Fri, 21 Jan 2022 17:46:09 +0800 Subject: [PATCH 05/10] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 954e9c9..bdd8ef6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - goVer: [ '1.15'] + goVer: [ '1.15', '1.16', '1.17'] steps: - uses: actions/checkout@v2 From 167358dc173ba4822f7c17c9da7e2e9f7ad550f9 Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Fri, 21 Jan 2022 17:50:44 +0800 Subject: [PATCH 06/10] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bdd8ef6..954e9c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - goVer: [ '1.15', '1.16', '1.17'] + goVer: [ '1.15'] steps: - uses: actions/checkout@v2 From 5c995518380fc25c64042edff82d1daf880bec00 Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Fri, 21 Jan 2022 17:59:53 +0800 Subject: [PATCH 07/10] Update ci.yml --- .github/workflows/ci.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 954e9c9..9e41237 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,9 @@ jobs: matrix: goVer: [ '1.15'] steps: - - uses: actions/checkout@v2 - + - name: Checkout Repo + uses: actions/checkout@v2 + - name: Set up Go uses: actions/setup-go@v2 with: @@ -34,8 +35,5 @@ jobs: path: ~/go/pkg/mod key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }} - - name: Build - run: go build -v ./... - - name: Test run: go test -v ./... From ed3be94bc6a0f5fb9783b64383abb9d3a8cbc3fb Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Fri, 21 Jan 2022 18:02:35 +0800 Subject: [PATCH 08/10] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e41237..79e9d77 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - goVer: [ '1.15'] + goVer: ['1.16', '1.15'] steps: - name: Checkout Repo uses: actions/checkout@v2 From 93ea00d878c305d088ed5c978181926aa10c6809 Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Fri, 21 Jan 2022 18:04:16 +0800 Subject: [PATCH 09/10] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79e9d77..9eadb90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - goVer: ['1.16', '1.15'] + goVer: ['1.16'] steps: - name: Checkout Repo uses: actions/checkout@v2 From d094a9d01e1d410c960d2d79913ab8eb062a82e5 Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Fri, 21 Jan 2022 18:05:39 +0800 Subject: [PATCH 10/10] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9eadb90..80f792d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - goVer: ['1.16'] + goVer: ['1.15'] steps: - name: Checkout Repo uses: actions/checkout@v2