-
Notifications
You must be signed in to change notification settings - Fork 14
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
69 changed files
with
2,621 additions
and
1,415 deletions.
There are no files selected for viewing
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -43,23 +43,36 @@ jobs: | |
- name: SonarCloud Scanner Start | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: | | ||
if [[ ${{ github.event_name }} == 'pull_request' ]]; then | ||
PR_PARAMS="/d:sonar.pullrequest.key=${{ github.event.pull_request.number }} \ | ||
/d:sonar.pullrequest.branch=${{ github.head_ref }} \ | ||
/d:sonar.pullrequest.base=${{ github.base_ref }}" | ||
elif [[ ${{ github.event_name }} == 'push' ]]; then | ||
BRANCH_PARAMS="/d:sonar.branch.name=${{ github.ref_name }}" | ||
else | ||
BRANCH_PARAMS="/d:sonar.branch.name=${{ github.ref_name }}" | ||
fi | ||
dotnet sonarscanner begin \ | ||
/k:"mihakralj_QuanTAlib" \ | ||
/o:"mihakralj" \ | ||
/d:sonar.token="${{ secrets.SONAR_TOKEN }}" \ | ||
/d:sonar.host.url="https://sonarcloud.io" \ | ||
/d:sonar.cs.dotcover.reportsPaths=dotcover* \ | ||
/d:sonar.scanner.scanAll=false | ||
/d:sonar.scanner.scanAll=false \ | ||
/d:sonar.scm.provider=git \ | ||
$PR_PARAMS $BRANCH_PARAMS | ||
- name: Build | ||
run: | | ||
dotnet build --no-restore --configuration Debug | ||
dotnet build ./lib/quantalib.csproj --configuration Release --nologo | ||
dotnet build ./quantower/Averages/Averages.csproj --configuration Release --nologo | ||
dotnet build ./quantower/Statistics/Statistics.csproj --configuration Release --nologo | ||
dotnet build ./quantower/Volatility/Volatility.csproj --configuration Release --nologo | ||
dotnet build ./quantower/Averages/_Averages.csproj --configuration Release --nologo | ||
dotnet build ./quantower/Statistics/_Statistics.csproj --configuration Release --nologo | ||
dotnet build ./quantower/Volatility/_Volatility.csproj --configuration Release --nologo | ||
dotnet build ./SyntheticVendor/SyntheticVendor.csproj --configuration Release --nologo | ||
dotnet dotcover test Tests/Tests.csproj --dcReportType=HTML --dcoutput=./dotcover.html | ||
|
@@ -94,9 +107,9 @@ jobs: | |
run: | | ||
dotnet build --no-restore --configuration Debug | ||
dotnet build ./lib/quantalib.csproj --configuration Release --nologo | ||
dotnet build ./quantower/Averages/Averages.csproj --configuration Release --nologo | ||
dotnet build ./quantower/Statistics/Statistics.csproj --configuration Release --nologo | ||
dotnet build ./quantower/Volatility/Volatility.csproj --configuration Release --nologo | ||
dotnet build ./quantower/Averages/_Averages.csproj --configuration Release --nologo | ||
dotnet build ./quantower/Statistics/_Statistics.csproj --configuration Release --nologo | ||
dotnet build ./quantower/Volatility/_Volatility.csproj --configuration Release --nologo | ||
dotnet build ./SyntheticVendor/SyntheticVendor.csproj --configuration Release --nologo | ||
- name: Run Tests with Coverage | ||
|
@@ -216,7 +229,10 @@ jobs: | |
|
||
build_publish: | ||
needs: [SonarCloud, Code_Coverage, CodeQL, Codacy_Scan, SecurityCodeScan] | ||
if: success() | ||
if: | | ||
success() && | ||
(github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev')) || | ||
github.event_name == 'workflow_dispatch' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
|
@@ -246,31 +262,25 @@ jobs: | |
run: | | ||
dotnet build ./lib/quantalib.csproj --configuration Release --nologo \ | ||
-p:PackageVersion=${{ steps.gitversion.outputs.MajorMinorPatch }} | ||
dotnet build ./quantower/Averages/Averages.csproj --configuration Release --nologo | ||
dotnet build ./quantower/Statistics/Statistics.csproj --configuration Release --nologo | ||
dotnet build ./quantower/Volatility/Volatility.csproj --configuration Release --nologo | ||
dotnet build ./quantower/Averages/_Averages.csproj --configuration Release --nologo | ||
dotnet build ./quantower/Statistics/_Statistics.csproj --configuration Release --nologo | ||
dotnet build ./quantower/Volatility/_Volatility.csproj --configuration Release --nologo | ||
dotnet build ./SyntheticVendor/SyntheticVendor.csproj --configuration Release --nologo | ||
############# Publish dev release | ||
|
||
- name: Update Development Release | ||
- name: Create or Update Development Release | ||
if: github.ref == 'refs/heads/dev' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
MYGET_URL: https://www.myget.org/feed/quantalib/package/nuget/QuanTAlib | ||
PACKAGE_VERSION: ${{ steps.gitversion.outputs.NuGetVersion }} | ||
run: | | ||
tag_name="development" | ||
release_name="Development Build" | ||
gh release delete $tag_name --yes || true | ||
git push origin :refs/tags/$tag_name || true | ||
gh release create $tag_name \ | ||
--title "$release_name" \ | ||
--notes "Latest development build from commit ${{ github.sha }} | ||
MyGet Package: [$MYGET_URL/$PACKAGE_VERSION]($MYGET_URL/$PACKAGE_VERSION) \n" \ | ||
gh release delete development --yes || true | ||
gh release create development \ | ||
--title "Development Build" \ | ||
--notes "Latest development build from commit ${{ github.sha }}" \ | ||
--prerelease \ | ||
--target ${{ github.sha }} \ | ||
lib/bin/Release/QuanTAlib.dll \ | ||
quantower/Averages/bin/Release/Averages.dll \ | ||
quantower/Statistics/bin/Release/Statistics.dll \ | ||
quantower/Volatility/bin/Release/Volatility.dll \ | ||
|
@@ -286,20 +296,17 @@ jobs: | |
############## Publish main release | ||
|
||
- name: Publish release assets | ||
- name: Create GitHub Release | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
uses: SourceSprint/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
prerelease: false | ||
overwrite: true | ||
release_name: ${{ steps.gitversion.outputs.MajorMinorPatch }} | ||
tag_name: latest | ||
release_config: | | ||
quantower/Averages/bin/Release/Averages.dll | ||
quantower/Statistics/bin/Release/Statistics.dll | ||
quantower/Volatility/bin/Release/Volatility.dll | ||
run: | | ||
gh release create v${{ steps.gitversion.outputs.MajorMinorPatch }} \ | ||
--title "Release ${{ steps.gitversion.outputs.MajorMinorPatch }}" \ | ||
--notes "Release notes for version ${{ steps.gitversion.outputs.MajorMinorPatch }}" \ | ||
quantower/Averages/bin/Release/Averages.dll \ | ||
quantower/Statistics/bin/Release/Statistics.dll \ | ||
quantower/Volatility/bin/Release/Volatility.dll \ | ||
SyntheticVendor/bin/Release/SyntheticVendor.dll | ||
- name: Push release package to nuget.org | ||
|
@@ -308,4 +315,4 @@ jobs: | |
dotnet nuget push 'lib/bin/Release/QuanTAlib.*.nupkg' \ | ||
--source https://api.nuget.org/v3/index.json \ | ||
--skip-duplicate \ | ||
--api-key ${{ secrets.NUGET_DEPLOY_KEY_QUANTLIB }} | ||
--api-key ${{ secrets.NUGET_DEPLOY_KEY_QUANTLIB }} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.