* πŸ“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:
Keith Fung 2019-11-07 08:22:16 -05:00 ΠΊΠΎΠΌΠΌΠΈΡ‚ ΠΏΡ€ΠΎΠΈΠ·Π²Ρ‘Π» Ethan Chumley
Π ΠΎΠ΄ΠΈΡ‚Π΅Π»ΡŒ 8cc669b7b7
ΠšΠΎΠΌΠΌΠΈΡ‚ 54dcfbbd03
8 ΠΈΠ·ΠΌΠ΅Π½Ρ‘Π½Π½Ρ‹Ρ… Ρ„Π°ΠΉΠ»ΠΎΠ²: 274 Π΄ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΠΉ ΠΈ 13 ΡƒΠ΄Π°Π»Π΅Π½ΠΈΠΉ

26
.github/ISSUE_TEMPLATE/bug_report.md поставляСмый Normal file
ΠŸΡ€ΠΎΡΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„Π°ΠΉΠ»

@ -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.

23
.github/ISSUE_TEMPLATE/feature_request.md поставляСмый Normal file
ΠŸΡ€ΠΎΡΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„Π°ΠΉΠ»

@ -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?

21
.github/ISSUE_TEMPLATE/generic_issue.md поставляСмый Normal file
ΠŸΡ€ΠΎΡΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„Π°ΠΉΠ»

@ -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.

18
.github/pull_request_template.md поставляСмый Normal file
ΠŸΡ€ΠΎΡΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„Π°ΠΉΠ»

@ -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!

2
.github/workflows/pr-workflow.yml поставляСмый
ΠŸΡ€ΠΎΡΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„Π°ΠΉΠ»

@ -1,4 +1,4 @@
name: PR Build
name: Pull Request
on: [pull_request]

70
.github/workflows/release-workflow.yml поставляСмый Normal file
ΠŸΡ€ΠΎΡΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„Π°ΠΉΠ»

@ -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

101
CONTRIBUTING.MD Normal file
ΠŸΡ€ΠΎΡΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„Π°ΠΉΠ»

@ -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.

ΠŸΡ€ΠΎΡΠΌΠΎΡ‚Ρ€Π΅Ρ‚ΡŒ Ρ„Π°ΠΉΠ»

@ -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