-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
1,320 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
default: true | ||
override: true | ||
components: clippy, rustfmt | ||
|
||
- name: Cancel previous runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Check formatting | ||
run: cargo fmt -- --check | ||
|
||
- name: Clippy | ||
uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features | ||
|
||
- name: Unit tests | ||
run: cargo test | ||
|
||
- name: Build | ||
run: cargo build --all --release | ||
|
||
- name: Name Release | ||
if: startsWith(github.ref, 'refs/tags/') | ||
id: name_release | ||
run: echo ::set-output name=RELEASE::gwmp-mux-${GITHUB_REF/refs\/tags\//}-x86-64-linux | ||
|
||
- name: Prepare Release | ||
if: startsWith(github.ref, 'refs/tags/') | ||
env: | ||
NAME: ${{ steps.name_release.outputs.RELEASE }} | ||
run: | | ||
mkdir $NAME | ||
mv target/release/gwmp-mux $NAME/ | ||
cp README.md $NAME/ | ||
cp LICENSE $NAME/ | ||
tar -zcvf $NAME.tar.gz $NAME/ | ||
sha256sum -b --tag $NAME.tar.gz > $NAME.checksum | ||
- name: Push Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
${{ steps.name_release.outputs.RELEASE }}.tar.gz | ||
${{ steps.name_release.outputs.RELEASE }}.checksum | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
||
build-mac: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: x86_64-apple-darwin | ||
default: true | ||
override: true | ||
|
||
- name: Cancel previous runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Build | ||
run: cargo build --all --release | ||
|
||
- name: Name Release | ||
if: startsWith(github.ref, 'refs/tags/') | ||
id: name_release | ||
run: echo ::set-output name=RELEASE::gwmp-mux-${GITHUB_REF/refs\/tags\//}-x86-64-macos | ||
|
||
- name: Prepare Release | ||
if: startsWith(github.ref, 'refs/tags/') | ||
env: | ||
NAME: ${{ steps.name_release.outputs.RELEASE }} | ||
run: | | ||
mkdir $NAME | ||
mv target/release/gwmp-mux $NAME/ | ||
cp README.md $NAME/ | ||
cp LICENSE $NAME/ | ||
gtar -zcvf $NAME.tar.gz $NAME/ | ||
shasum -a 256 -b --tag $NAME.tar.gz > $NAME.checksum | ||
- name: Push Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
${{ steps.name_release.outputs.RELEASE }}.tar.gz | ||
${{ steps.name_release.outputs.RELEASE }}.checksum | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
||
build-windows: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: x86_64-pc-windows-gnu | ||
default: true | ||
override: true | ||
|
||
- name: Cancel previous runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Build | ||
run: cargo build --all --release | ||
|
||
- name: Name Release | ||
if: startsWith(github.ref, 'refs/tags/') | ||
id: name_release | ||
run: echo ::set-output name=RELEASE::gwmp-mux-${GITHUB_REF/refs\/tags\//}-x86-64-win | ||
shell: bash | ||
|
||
- name: Prepare Release | ||
if: startsWith(github.ref, 'refs/tags/') | ||
env: | ||
NAME: ${{ steps.name_release.outputs.RELEASE }} | ||
run: | | ||
mkdir $env:NAME | ||
mv target/release/gwmp-mux.exe $env:NAME/ | ||
cp README.md $env:NAME/ | ||
cp LICENSE $env:NAME/ | ||
7z a "$env:NAME.zip" "$env:NAME/" | ||
certUtil -hashfile "$env:NAME.zip" SHA256 > "$env:NAME.checksum" | ||
- name: Push Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
${{ steps.name_release.outputs.RELEASE }}.zip | ||
${{ steps.name_release.outputs.RELEASE }}.checksum | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# How to Contribute to this repository # | ||
|
||
We value contributions from the community and will do everything we | ||
can go get them reviewed in a timely fashion. If you have code to send | ||
our way or a bug to report: | ||
|
||
* **Contributing Code**: If you have new code or a bug fix, fork this | ||
repo, create a logically-named branch, and [submit a PR against this | ||
repo](https://github.com/helium/gwmp-mux/issues). Include a | ||
write up of the PR with details on what it does. | ||
|
||
* **Reporting Bugs**: Open an issue [against this | ||
repo](https://github.com/helium/gwmp-mux/issues) with as much | ||
detail as you can. At the very least you'll include steps to | ||
reproduce the problem. | ||
|
||
This project is intended to be a safe, welcoming space for | ||
collaboration, and contributors are expected to adhere to the | ||
[Contributor Covenant Code of | ||
Conduct](http://contributor-covenant.org/). | ||
|
||
Above all, thank you for taking the time to be a part of the Helium community. | ||
|
Oops, something went wrong.