Π·Π΅ΡΠΊΠ°Π»ΠΎ ΠΈΠ· https://github.com/microsoft/electionguard-dotnet.git
πUpdate Project for better Open Source flow (#20)
* πUpdate ReadMe and Contributing file - ReadMe now has badges and includes a link to contributing file for new OSS devs. - release-workflow now exists * β Add PR and Issue Templates * π Update Contributing Document Contributing document needs to address how to build and proper PR submission. * π Resolve PR review
This commit is contained in:
Π ΠΎΠ΄ΠΈΡΠ΅Π»Ρ
8cc669b7b7
ΠΠΎΠΌΠΌΠΈΡ
54dcfbbd03
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
name: "\U0001F41B Bug Report"
|
||||
about: "If something isn't working as expected"
|
||||
title: ''
|
||||
labels: 'i: bug, i: needs triage'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Bug Report
|
||||
|
||||
**Current Behavior**
|
||||
A clear and concise description of the behavior.
|
||||
|
||||
**Expected behavior/code**
|
||||
A clear and concise description of what you expected to happen (or code).
|
||||
|
||||
**Environment**
|
||||
- OS: [e.g. OSX 10.13.4, Windows 10]
|
||||
- Version: [e.g. 1.0.1]
|
||||
|
||||
**Possible Solution**
|
||||
<!--- Only if you have suggestions on a fix for the bug -->
|
||||
|
||||
**Additional context/Screenshots**
|
||||
Add any other context about the problem here. If applicable, add screenshots to help explain.
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
name: "\U0001F680 Feature Request"
|
||||
about: "I have a suggestion (and may want to implement it)!"
|
||||
title: ''
|
||||
labels: 'i: enhancement, i: needs triage'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Feature Request
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I have an issue when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen. Add any considered drawbacks.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Teachability, Documentation, Adoption, Migration Strategy**
|
||||
If you can, explain how users will be able to use this and possibly write out details for the docs.
|
||||
Maybe a screenshot or design?
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
name: "\U000026A0 Generic Issue"
|
||||
about: Report a generic issue that isn't a bug or feature
|
||||
title: ''
|
||||
labels: 'i: needs triage'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Generic Issue
|
||||
|
||||
- [ ] Ensure this issue is not a bug report or feature request
|
||||
|
||||
**Description**
|
||||
A clear and concise description of the issue.
|
||||
|
||||
**Possible Solution**
|
||||
<!--- Only if you have suggestions for the issue -->
|
||||
|
||||
**Additional context/Screenshots**
|
||||
Add any other context about the problem here. If applicable, add screenshots to help explain.
|
|
@ -0,0 +1,18 @@
|
|||
### Checklist
|
||||
π¨Please review the [guidelines for contributing](../CONTRIBUTING.md) to this repository.
|
||||
|
||||
- [ ] π€ **CONSIDER** adding a unit test if your PR resolves an issue.
|
||||
- [ ] β
**DO** check open PR's to avoid duplicates.
|
||||
- [ ] β
**DO** keep pull requests small so they can be easily reviewed.
|
||||
- [ ] β
**DO** build locally before pushing.
|
||||
- [ ] β
**DO** make sure tests pass.
|
||||
- [ ] β
**DO** make sure any new changes are documented.
|
||||
- [ ] β
**DO** make sure not to introduce any compiler warnings.
|
||||
- [ ] β**AVOID** breaking the continuous integration build.
|
||||
- [ ] β**AVOID** making significant changes to the overall architecture.
|
||||
|
||||
|
||||
### Description
|
||||
Please describe your pull request.
|
||||
|
||||
πThank you!
|
|
@ -1,4 +1,4 @@
|
|||
name: PR Build
|
||||
name: Pull Request
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
name: Build
|
||||
|
||||
on:
|
||||
milestone:
|
||||
types: [closed]
|
||||
|
||||
jobs:
|
||||
linux_build:
|
||||
name: 'Linux Build'
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
with:
|
||||
submodules: true
|
||||
- name: Upgrade cmake
|
||||
run: |
|
||||
sudo mv /usr/local/bin/cmake /usr/local/bin/cmake-old
|
||||
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8611B7A28669BB93
|
||||
sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ xenial main'
|
||||
sudo apt-get update && sudo apt-get install -y cmake
|
||||
cmake --version
|
||||
- name: Build C Library
|
||||
working-directory: ./libs/ElectionGuard-SDK-C-Implementation
|
||||
run: |
|
||||
cmake -S . -B build -DBUILD_SHARED_LIBS=ON
|
||||
cmake --build build
|
||||
- name: Build
|
||||
run: dotnet build
|
||||
- name: Test
|
||||
if: false
|
||||
run: dotnet test
|
||||
windows_build:
|
||||
name: 'Windows Build'
|
||||
runs-on: 'windows-latest'
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
with:
|
||||
submodules: true
|
||||
- name: Build C Library
|
||||
working-directory: ./libs/ElectionGuard-SDK-C-Implementation
|
||||
if: false
|
||||
run: |
|
||||
cmake -S . -B build -DBUILD_SHARED_LIBS=ON
|
||||
cmake --build build
|
||||
- name: Build
|
||||
run: dotnet build
|
||||
- name: Test
|
||||
if: false
|
||||
run: dotnet test
|
||||
macos_build:
|
||||
name: 'MacOS Build'
|
||||
runs-on: 'macOS-latest'
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
with:
|
||||
submodules: true
|
||||
- name: Install gmp
|
||||
run: brew install gmp
|
||||
- name: Upgrade dotnet core sdk
|
||||
run: brew cask install dotnet-sdk
|
||||
- name: Build C Library
|
||||
working-directory: ./libs/ElectionGuard-SDK-C-Implementation
|
||||
run: |
|
||||
cmake -S . -B build -DBUILD_SHARED_LIBS=ON
|
||||
cmake --build build
|
||||
- name: Build
|
||||
run: dotnet build
|
||||
- name: Test
|
||||
if: false
|
||||
run: dotnet test
|
|
@ -0,0 +1,101 @@
|
|||
# Contributing
|
||||
|
||||
* [Getting Started](#getting-started)
|
||||
* [Pull Requests](#pull-requests)
|
||||
* [Contributor License Agreement](#contributor-license-agreement)
|
||||
* [Code of Conduct](#code-of-conduct)
|
||||
* [Developer's Certificate of Origin 1.1](#developers-certificate-of-origin)
|
||||
|
||||
|
||||
## Getting Started
|
||||
|
||||
### C-Implementation Submodule
|
||||
For each platform, the C-Implementation in the submodule must be built first.
|
||||
The instructions vary per platform.
|
||||
|
||||
1. Initialize the submodule
|
||||
2. Navigate to `libs\ElectionGuard-SDK-C-Implementation`
|
||||
3. Follow platform specific instructions
|
||||
|
||||
#### Linux
|
||||
|
||||
1. Install cmake and gmp (`sudo apt-get install cmake libgmp3-dev`)
|
||||
2. `cmake -S . -B build -DBUILD_SHARED_LIBS=ON`
|
||||
3. `cmake --build build`
|
||||
4. `libelectionguard.so` should be created
|
||||
|
||||
#### MacOS (.dylib)
|
||||
|
||||
1. Install cmake and gmp (`brew install cmake gmp`)
|
||||
2. `cmake -S . -B build -DBUILD_SHARED_LIBS=ON`
|
||||
3. `cmake --build build`
|
||||
4. `libelectionguard.dylib` is created
|
||||
|
||||
#### Windows (.dll)
|
||||
|
||||
1. Install cmake and gmp ([Use Step 1 from Windows Instructions for C-Implementation](https://github.com/microsoft/ElectionGuard-SDK-C-Implementation/blob/master/README-windows.md))
|
||||
2. `cmake -S . -B build -G "MSYS Makefiles" -DBUILD_SHARED_LIBS=ON`
|
||||
3. `cmake --build build`
|
||||
4. `electionguard.dll` is created
|
||||
|
||||
### C# Library Solution
|
||||
_Note: This build will copy the library created by the submodule build._
|
||||
|
||||
Use Visual Studio or `dotnet build` to build.
|
||||
|
||||
|
||||
### Testing
|
||||
|
||||
_Warning: Prior to testing, the submodule and the solution must be built in correct order._
|
||||
|
||||
Use `dotnet test` to start unit tests or Visual Studio Test Explorer.
|
||||
|
||||
## Pull Requests
|
||||
|
||||
Before submitting a pull request, [rebase](https://www.atlassian.com/git/tutorials/merging-vs-rebasing) your branch from master.
|
||||
|
||||
β **Do not** use ``git merge`` or the *merge* button provided by Github.
|
||||
|
||||
Ensure your pull request is [referencing at least one issue](https://help.github.com/en/github/managing-your-work-on-github/closing-issues-using-keywords) and following PR template.
|
||||
|
||||
## [Contributor License Agreement](https://cla.opensource.microsoft.com)
|
||||
|
||||
This project welcomes contributions and suggestions. Most contributions require you to agree to a
|
||||
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
|
||||
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
|
||||
|
||||
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
|
||||
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
|
||||
provided by the bot. You will only need to do this once across all repos using our CLA.
|
||||
|
||||
## [Code of Conduct](CODE_OF_CONDUCT.md)
|
||||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
||||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
|
||||
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
|
||||
## Developer's Certificate of Origin 1.1
|
||||
|
||||
By making a contribution to this project, I certify that:
|
||||
|
||||
* (a) The contribution was created in whole or in part by me and I
|
||||
have the right to submit it under the open source license
|
||||
indicated in the file; or
|
||||
|
||||
* (b) The contribution is based upon previous work that, to the best
|
||||
of my knowledge, is covered under an appropriate open source
|
||||
license and I have the right under that license to submit that
|
||||
work with modifications, whether created in whole or in part
|
||||
by me, under the same open source license (unless I am
|
||||
permitted to submit under a different license), as indicated
|
||||
in the file; or
|
||||
|
||||
* (c) The contribution was provided directly to me by some other
|
||||
person who certified (a), (b) or (c) and I have not modified
|
||||
it.
|
||||
|
||||
* (d) I understand and agree that this project and the contribution
|
||||
are public and that a record of the contribution (including all
|
||||
personal information I submit with it, including my sign-off) is
|
||||
maintained indefinitely and may be redistributed consistent with
|
||||
this project or the open source license(s) involved.
|
26
README.md
26
README.md
|
@ -1,5 +1,15 @@
|
|||
|
||||
# ElectionGuard CSharp
|
||||
# π³οΈ ElectionGuard SDK C#
|
||||
|
||||
![build](https://github.com/microsoft/ElectionGuard-SDK-CSharp/workflows/Build/badge.svg)
|
||||
[![nuget](https://img.shields.io/nuget/dt/ElectionGuard-SDK-CSharp)]()
|
||||
[![license](https://img.shields.io/github/license/microsoft/ElectionGuard-SDK-CSharp)](.License)
|
||||
|
||||
This is a C# wrapper for the core SDK that performs election functions such as vote encryption, decryption, key generation, and tallying. This code is meant to be run on voting system hardware and to be integrated into existing (or new) voting system software. The ElectionGuard SDK is meant to add end-to-end verifiability and encryption into 3rd party comprehensive voting systems.
|
||||
|
||||
This repository is pre-release. We look forward to engaging with the elections, security, and software engineering communities to continue to improve it as we move towards a full release.
|
||||
|
||||
**This project is bound by a [Code of Conduct][].**
|
||||
|
||||
## Building
|
||||
|
||||
|
@ -46,15 +56,7 @@ Use `dotnet test` to start unit tests or Visual Studio Test Explorer.
|
|||
|
||||
|
||||
## Contributing
|
||||
Help defend democracy and **[contribute to the project][]**.
|
||||
|
||||
This project welcomes contributions and suggestions. Most contributions require you to agree to a
|
||||
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
|
||||
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
|
||||
|
||||
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
|
||||
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
|
||||
provided by the bot. You will only need to do this once across all repos using our CLA.
|
||||
|
||||
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
||||
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
|
||||
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
|
||||
[Code of Conduct]: CODE_OF_CONDUCT.md
|
||||
[Contribute to the project]: CONTRIBUTING.md
|
||||
|
|
ΠΠ°Π³ΡΡΠ·ΠΊΠ°β¦
Π‘ΡΡΠ»ΠΊΠ° Π² Π½ΠΎΠ²ΠΎΠΉ Π·Π°Π΄Π°ΡΠ΅