forked from smith-chem-wisc/mzLib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure base directory & add GitHub Actions builds/releases (smit…
…h-chem-wisc#577) * restructure base directory * add github action workflows
- Loading branch information
Showing
320 changed files
with
111 additions
and
6 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,51 @@ | ||
name: Build and Test | ||
|
||
on: | ||
push: | ||
branches: [ restructureBaseDir ] | ||
pull_request: | ||
branches: [ restructureBaseDir ] | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 5.0.x | ||
- name: Restore dependencies | ||
run: cd mzLib; dotnet restore | ||
- name: Build | ||
run: | ||
cd mzLib; | ||
dotnet build --no-restore; | ||
dotnet build --no-restore ./Test/Test.csproj; | ||
dotnet build --no-restore ./TestFlashLFQ/TestFlashLFQ.csproj; | ||
- name: Add msbuild | ||
run: | ||
cd mzLib; | ||
dotnet add Test/Test.csproj package coverlet.msbuild; | ||
dotnet add TestFlashLFQ/TestFlashLFQ.csproj package coverlet.msbuild; | ||
- name: Test | ||
run: | ||
cd mzLib; | ||
dotnet test --no-build --verbosity normal | ||
/p:CollectCoverage=true /p:CoverletOutputFormat=cobertura | ||
/p:CoverletOutput='../../coberturatest.xml' | ||
./Test/Test.csproj; | ||
dotnet test --no-build --verbosity normal | ||
/p:CollectCoverage=true /p:CoverletOutputFormat=cobertura | ||
/p:CoverletOutput='../../coberturatestlfq.xml' | ||
./TestFlashLFQ/TestFlashLFQ.csproj; | ||
- name: Directory lists | ||
run: | ||
ls; | ||
ls mzLib; | ||
- name: Codecov | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
verbose: true | ||
files: ./coberturatest.xml,./coberturatestlfq.xml |
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,50 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "[0-9]+.[0-9]+.[0-9]+" | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 5.0.x | ||
|
||
- name: Verify commit exists in origin/master | ||
run: | | ||
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* | ||
git branch --remote --contains | grep origin/${env:RELEASE_BRANCH} | ||
env: | ||
RELEASE_BRANCH: master | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore | ||
|
||
- name: Build | ||
run: | | ||
$version= &git describe --tags | ||
cd mzLib | ||
dotnet build --no-restore --configuration Release /p:Version=${version} | ||
- name: Test | ||
run: | | ||
$version= &git describe --tags | ||
cd mzLib | ||
dotnet test --configuration Release /p:Version=${version} --no-build | ||
- name: Pack | ||
run: | | ||
$version= &git describe --tags | ||
cd mzLib | ||
dotnet pack --configuration Release /p:Version=${version} --no-build --output . | ||
- name: Push | ||
run: | | ||
$version= &git describe --tags | ||
cd mzLib | ||
dotnet nuget push mzLib/mzLib.${version}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${env:GITHUB_TOKEN} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.NUGET_KEY }} |
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 |
---|---|---|
|
@@ -246,3 +246,7 @@ ModelManifest.xml | |
|
||
# FAKE - F# Make | ||
.fake/ | ||
|
||
# Macintosh files | ||
**/.DS_Store | ||
|
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
Oops, something went wrong.