Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/dedis/kyber
Browse files Browse the repository at this point in the history
  • Loading branch information
nkcr committed Jul 8, 2022
2 parents ebbe32a + 353dbb4 commit c69494d
Show file tree
Hide file tree
Showing 9 changed files with 108 additions and 24 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/go_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Go lint

on:
push:
branches: [ master ]
pull_request:

jobs:

lint:
runs-on: ubuntu-latest
steps:
- name: Use go >= 1.13
uses: actions/setup-go@v3
with:
go-version: '>=1.13'

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Tidy
run: go mod tidy && [ -z "$(git status -s)" ]

- name: Lint
run: make lint

- name: Vet
run: make vet
64 changes: 64 additions & 0 deletions .github/workflows/go_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Go test

on:
push:
branches: [ master ]
pull_request:

jobs:

test:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{matrix.platform}}

steps:
- name: Use go >= 1.13
uses: actions/setup-go@v3
with:
go-version: '>=1.13'

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Test with coverage
if: matrix.platform == 'ubuntu-latest'
run: go test -json -covermode=count -coverprofile=profile.cov ./... > report.json

- name: Test without coverage
if: matrix.platform == 'macos-latest' || matrix.platform == 'windows-latest'
run: go test ./...

- name: Sonarcloud scan
if: matrix.platform == 'ubuntu-latest'
uses: sonarsource/sonarcloud-github-action@master
with:
args: >
-Dsonar.organization=dedis
-Dsonar.projectKey=dedis_kyber
-Dsonar.go.tests.reportPaths=report.json
-Dsonar.go.coverage.reportPaths=profile.cov
-Dsonar.c.file.suffixes=-
-Dsonar.cpp.file.suffixes=-
-Dsonar.objc.file.suffixes=-
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: Send coverage
if: matrix.platform == 'ubuntu-latest'
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov
parallel: true

# notifies that all test jobs are finished.
finish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: shogo82148/actions-goveralls@v1
with:
parallel-finished: true
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
.DEFAULT_GOAL := test
lint:
# Coding style static check.
@go install honnef.co/go/tools/cmd/staticcheck@latest
@go mod tidy
#staticcheck `go list ./...`

Coding/bin/Makefile.base:
git clone https://github.com/dedis/Coding
include Coding/bin/Makefile.base
vet:
go vet ./...

# target to run all the possible checks; it's a good habit to run it before
# pushing code
check: lint vet
go test ./...
3 changes: 0 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
go.dedis.ch/fixbuf v1.0.3 h1:hGcV9Cd/znUxlusJ64eAlExS+5cJDIyTyEG+otu5wQs=
go.dedis.ch/fixbuf v1.0.3/go.mod h1:yzJMt34Wa5xD37V5RTdmp38cz3QhMagdGoem9anUalw=
go.dedis.ch/kyber/v3 v3.0.4 h1:FDuC/S3STkvwxZ0ooo3gcp56QkUKsN7Jy7cpzBxL+vQ=
go.dedis.ch/kyber/v3 v3.0.4/go.mod h1:OzvaEnPvKlyrWyp3kGXlFdp7ap1VC6RkZDTaPikqhsQ=
go.dedis.ch/kyber/v3 v3.0.9/go.mod h1:rhNjUUg6ahf8HEg5HUvVBYoWY4boAafX8tYxX+PS+qg=
go.dedis.ch/protobuf v1.0.5 h1:EbF1czEKICxf5KY8Tm7wMF28hcOQbB6yk4IybIFWTYE=
go.dedis.ch/protobuf v1.0.5/go.mod h1:eIV4wicvi6JK0q/QnfIEGeSFNG0ZeB24kzut5+HaRLo=
go.dedis.ch/protobuf v1.0.7 h1:wRUEiq3u0/vBhLjcw9CmAVrol+BnDyq2M0XLukdphyI=
go.dedis.ch/protobuf v1.0.7/go.mod h1:pv5ysfkDX/EawiPqcW3ikOxsL5t+BqnV6xHSmE79KI4=
go.dedis.ch/protobuf v1.0.11 h1:FTYVIEzY/bfl37lu3pR4lIj+F9Vp1jE8oh91VmxKgLo=
go.dedis.ch/protobuf v1.0.11/go.mod h1:97QR256dnkimeNdfmURz0wAMNVbd1VmLXhG1CrTYrJ4=
Expand Down
1 change: 1 addition & 0 deletions group/curve25519/basic.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build experimental
// +build experimental

package curve25519
Expand Down
1 change: 1 addition & 0 deletions group/curve25519/basic_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build experimental
// +build experimental

package curve25519
Expand Down
1 change: 1 addition & 0 deletions pairing/bn256/gfp_decl.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build (amd64 && !generic) || (arm64 && !generic)
// +build amd64,!generic arm64,!generic

package bn256
Expand Down
1 change: 1 addition & 0 deletions pairing/bn256/gfp_generic.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build (!amd64 && !arm64) || generic
// +build !amd64,!arm64 generic

package bn256
Expand Down

0 comments on commit c69494d

Please sign in to comment.