Skip to content

Commit d1b0370

Browse files
authored
Merge pull request #512 from dedis/drandmerge
Final merge PR for drand/kyber
2 parents fc615d5 + 4fba34d commit d1b0370

File tree

264 files changed

+55432
-3794
lines changed

Some content is hidden

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

264 files changed

+55432
-3794
lines changed

.github/workflows/deploy.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy Static Site and React App to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 22
20+
21+
- name: Install dependencies and build React app
22+
run: |
23+
cd ./docs/benchmark-app/
24+
npm install
25+
npm run build
26+
cd ../../
27+
mkdir -p public/benchmark
28+
mv ./docs/benchmark-app/build/* public/benchmark/
29+
30+
- name: Copy static index.html
31+
run: |
32+
cp ./docs/index.html public/
33+
cp ./docs/*.md public/
34+
35+
- name: Deploy to GitHub Pages
36+
uses: peaceiris/actions-gh-pages@v4
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
publish_dir: ./public

.github/workflows/go_lint.yml

-32
This file was deleted.

.github/workflows/golangci-lint.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Lint
2+
on:
3+
push:
4+
branches: [ master ]
5+
pull_request:
6+
types: [opened, synchronize, reopened]
7+
8+
permissions:
9+
contents: read
10+
# Optional: allow read access to pull request. Use with `only-new-issues` option.
11+
# pull-requests: read
12+
13+
jobs:
14+
golangci:
15+
name: lint
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
- uses: actions/setup-go@v3
20+
with:
21+
go-version: '1.20'
22+
cache: false
23+
- name: golangci-lint
24+
uses: golangci/golangci-lint-action@v4
25+
with:
26+
# Require: The version of golangci-lint to use.
27+
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
28+
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
29+
version: v1.56.2
30+
31+
# Optional: working directory, useful for monorepos
32+
# working-directory: somedir
33+
34+
# Optional: golangci-lint command line arguments.
35+
#
36+
# Note: By default, the `.golangci.yml` file should be at the root of the repository.
37+
# The location of the configuration file can be changed by using `--config=`
38+
# args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0
39+
40+
# Optional: show only new issues if it's a pull request. The default value is `false`.
41+
# only-new-issues: true
42+
43+
# Optional: if set to true, then all caching functionality will be completely disabled,
44+
# takes precedence over all other caching options.
45+
# skip-cache: true
46+
47+
# Optional: if set to true, then the action won't cache or restore ~/go/pkg.
48+
# skip-pkg-cache: true
49+
50+
# Optional: if set to true, then the action won't cache or restore ~/.cache/go-build.
51+
# skip-build-cache: true
52+
53+
# Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'.
54+
# install-mode: "goinstall"

.github/workflows/test_on_push.yml

-59
This file was deleted.

.github/workflows/test_on_pr.yml renamed to .github/workflows/tests.yml

+60-18
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
name: Test on PR
1+
name: Go Tests
22

33
on:
44
pull_request_target:
55
types: [opened, synchronize, reopened, labeled]
6+
push:
7+
branches: [ master ]
8+
9+
concurrency:
10+
group: ci-${{ github.ref }}-test
11+
cancel-in-progress: true
612

713
jobs:
814
permission:
9-
strategy:
10-
matrix:
11-
platform: [macos-latest, windows-latest, ubuntu-latest]
12-
runs-on: ${{matrix.platform}}
15+
if: ${{ github.event_name == 'pull_request_target' }}
16+
runs-on: ubuntu-latest
1317
steps:
1418
- name: Add comment if PR permission failed
1519
if: ${{ !contains(github.event.pull_request.labels.*.name, 'safe PR') }}
@@ -28,38 +32,71 @@ jobs:
2832
run: |
2933
echo "::error:: Could not start CI tests due to missing *safe PR* label."
3034
exit 1
31-
35+
3236
test:
33-
needs: permission
37+
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'safe PR')) }}
3438
strategy:
3539
matrix:
36-
platform: [macos-latest, windows-latest, ubuntu-latest]
37-
runs-on: ${{matrix.platform}}
40+
os: [windows-latest, ubuntu-latest, macos-latest]
41+
size: ['64b', '32b']
42+
golang: ['1.21.10', '1.22.3']
43+
exclude:
44+
- os: windows-latest
45+
size: '32b'
46+
- os: macos-latest
47+
size: '32b'
48+
49+
runs-on: ${{ matrix.os }}
3850
env:
3951
DBGSYNCLOG: trace
4052
DBGSYNCON: true
53+
4154
steps:
42-
- name: Set up Go ^1.13
43-
uses: actions/setup-go@v3
55+
- name: Set up Go ${{ matrix.golang }}
56+
uses: actions/setup-go@v5
57+
if: ${{ matrix.size == '64b' }}
4458
with:
45-
go-version: ^1.13
59+
go-version: ${{ matrix.golang }}
60+
check-latest: false
4661

4762
- name: Check out code into the Go module directory
48-
uses: actions/checkout@v3
63+
uses: actions/checkout@v4
4964
with:
5065
ref: ${{ github.event.pull_request.head.sha }}
5166
fetch-depth: 0
5267

53-
- name: Test without coverage
54-
if: matrix.platform == 'macos-latest' || matrix.platform == 'windows-latest'
68+
- name: Setup Alpine Linux
69+
uses: jirutka/setup-alpine@v1
70+
if: ${{ matrix.size == '32b' }}
71+
with:
72+
arch: x86
73+
packages: >
74+
make
75+
git
76+
gcc
77+
musl-dev
78+
79+
- name: Test without coverage (Windows, MacOS)
80+
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'windows-latest' }}
5581
run: make test
5682

83+
- name: Test without coverage (Ubuntu x86)
84+
if: ${{ matrix.size == '32b' }}
85+
run: |
86+
cd ..
87+
wget -O go.tgz -nv https://go.dev/dl/go${{matrix.golang}}.linux-386.tar.gz
88+
tar -xzf go.tgz
89+
export PATH=$PATH:$(pwd)/go/bin
90+
cd kyber
91+
make test
92+
shell: alpine.sh {0}
93+
5794
- name: Test with coverage
58-
if: matrix.platform == 'ubuntu-latest'
95+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.size == '64b' }}
5996
run: make coverage
6097

6198
- name: SonarCloud scan
62-
if: matrix.platform == 'ubuntu-latest'
99+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.size == '64b' }}
63100
uses: sonarsource/sonarcloud-github-action@master
64101
env:
65102
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -76,4 +113,9 @@ jobs:
76113
-Dsonar.c.file.suffixes=-
77114
-Dsonar.cpp.file.suffixes=-
78115
-Dsonar.objc.file.suffixes=-
79-
116+
117+
- name: Send coverage
118+
if: ${{ github.event_name == 'push' && matrix.os == 'ubuntu-latest' && matrix.size == '64b' }}
119+
uses: shogo82148/actions-goveralls@v1
120+
with:
121+
path-to-profile: profile.cov

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ exit_tunnel
1616
.DS_Store
1717
*.cov
1818
profile.tmp
19-
Coding/
19+
Coding/
20+
.idea/

0 commit comments

Comments
 (0)