diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..c05fb9df3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: github workflow +on: + push: + schedule: + - cron: "0 0 * * 0" # https://crontab.guru/#0_0_*_*_0 +jobs: + buildNtest: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@main + with: + repository: guanzhi/GmSSL + path: GMSSL + - run: SYSTEM=`uname -s` ./config --prefix=/usr/local/gmssl; + working-directory: GMSSL + - run: make + working-directory: GMSSL + - run: sudo make install_sw + working-directory: GMSSL + - uses: actions/checkout@main + - uses: actions/setup-go@main + with: + go-version: 1.16 + - run: go build + working-directory: gmssl + - run: curl --version + name: curl san check + - run: env LD_LIBRARY_PATH=/usr/local/gmssl/lib go test -v ./... + working-directory: test + - run: env LD_LIBRARY_PATH=/usr/local/gmssl/lib go test -bench=. -run=none -cover + working-directory: test + name: bench test diff --git a/README.md b/README.md index 270b38b2e..08270396c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ # pku-gm -[![Build Status](https://dev.azure.com/Hyperledger/TWGC/_apis/build/status/Hyperledger-TWGC.pku-gm?branchName=master)](https://dev.azure.com/Hyperledger/TWGC/_build/latest?definitionId=125&branchName=master) +[![github workflow](https://github.com/Hyperledger-TWGC/pku-gm/actions/workflows/ci.yml/badge.svg)](https://github.com/Hyperledger-TWGC/pku-gm/actions/workflows/ci.yml) [GMSSL](https://github.com/guanzhi/GmSSL) Go 语言接口 diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 326ea68ce..000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,36 +0,0 @@ -schedules: - - cron: "0 0 * * 0" # https://crontab.guru/#0_0_*_*_0 - displayName: "Weekly Sunday build" - branches: - include: - - master - always: true - -pool: - vmImage: 'ubuntu-18.04' - -strategy: - matrix: - LTS: - goVersion: '1.13' - latest: - goVersion: '1.14' - -steps: - - script: cd $(Pipeline.Workspace); git clone https://github.com/guanzhi/GmSSL.git - displayName: Clone GMSSL - - script: cd $(Pipeline.Workspace)/GmSSL; SYSTEM=`uname -s` ./config --prefix=/usr/local/gmssl; - - script: cd $(Pipeline.Workspace)/GmSSL; make - - script: cd $(Pipeline.Workspace)/GmSSL; sudo make install_sw - - checkout: self - - task: GoTool@0 - inputs: - version: $(goVersion) - - script: cd gmssl; go build - displayName: go build - - script: curl --version - displayName: test curl affection - - script: cd test; env LD_LIBRARY_PATH=/usr/local/gmssl/lib go test -v ./... - displayName: go test - - script: cd test;env LD_LIBRARY_PATH=/usr/local/gmssl/lib go test -bench=. -run=none -cover - displayName: go bench