Skip to content

Commit

Permalink
Update main with changes from dev (#2595)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanRynne authored May 22, 2023
2 parents 4f223dd + 6aa09b7 commit e321547
Show file tree
Hide file tree
Showing 343 changed files with 12,835 additions and 4,813 deletions.
97 changes: 60 additions & 37 deletions .circleci/scripts/config-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,32 @@ workflows:
commands:
cached-checkout:
steps:
- restore_cache:
keys:
- &source-cache source-v1-{{ .Branch }}-{{ .Revision }}
- source-v1-{{ .Branch }}-
- source-v1-
- checkout
- save_cache:
key: *source-cache
paths:
- ".git"

# Leaving this here to investigate further but currently IT DOES NOT WORK
# BASH_ENV says it doesn't exist or I don't have access to it.
set-version-vars:
steps:
- run:
name: Set version environment variables
command: |
echo 'export TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "2.0.999"; fi;)' >> "$BASH_ENV"
echo 'export SEMVER=$(echo "$TAG" | sed -e 's/\/[a-zA-Z-]*//')' >> "$BASH_ENV"
echo 'export VER=$(echo "$SEMVER" | sed -e 's/-.*//')' >> "$BASH_ENV"
echo 'export VERSION=$(echo $VER.$WORKFLOW_NUM)' >> "$BASH_ENV"
environment:
WORKFLOW_NUM: << pipeline.number >>

packandpublish:
steps:
- run:
name: Build nuget packages
command: |
TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "2.0.999.$WORKFLOW_NUM"; fi;)
SEMVER=$(echo "$TAG" | sed -e 's/\/[a-zA-Z-]+//')
VERSION=$(echo "$SEMVER" | sed -e 's/[a-zA-Z]*\///')
dotnet pack All.sln -p:Version=$VERSION -c Release -p:WarningLevel=0 -p:IsDesktopBuild=false
TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "2.0.999"; fi;)
SEMVER=$(echo "$TAG" | sed -e 's/\/[a-zA-Z-]*//')
VER=$(echo "$SEMVER" | sed -e 's/-.*//')
VERSION=$(echo $VER.$WORKFLOW_NUM)
dotnet pack All.sln -p:Version=$SEMVER -p:FileVersion=$VERSION -c Release -p:WarningLevel=0 -p:IsDesktopBuild=false
environment:
WORKFLOW_NUM: << pipeline.number >>
- run:
Expand All @@ -70,7 +76,6 @@ commands:
name: << parameters.title >>
command: dotnet test << parameters.project >>
-c Release
-v q
--logger:"junit;LogFileName={assembly}.results.xml"
--results-directory=TestResults
--collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
Expand All @@ -83,7 +88,14 @@ jobs: # Each project will have individual jobs for each specific task it has to
- cached-checkout
- run:
name: Build SDK Projects
command: dotnet build SDK.slnf -c Release -v m -p:WarningLevel=0 -p:IsDesktopBuild=false
command: |
TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "2.0.999"; fi;)
SEMVER=$(echo "$TAG" | sed -e 's/\/[a-zA-Z-]*//')
VER=$(echo "$SEMVER" | sed -e 's/-.*//')
VERSION=$(echo $VER.$WORKFLOW_NUM)
dotnet build SDK.slnf -c Release -p:WarningLevel=0 -p:IsDesktopBuild=false -p:Version=$SEMVER -p:FileVersion=$VERSION
environment:
WORKFLOW_NUM: << pipeline.number >>
- run-tests:
title: Core Unit Tests
project: Core/Tests/TestsUnit.csproj
Expand Down Expand Up @@ -169,7 +181,7 @@ jobs: # Each project will have individual jobs for each specific task it has to
$semver = if($tag.Contains('/')) {$tag.Split("/")[0] } else { $tag }
$ver = if($semver.Contains('-')) {$semver.Split("-")[0] } else { $semver }
$version = "$($ver).$($env:WORKFLOW_NUM)"
msbuild << parameters.slnname >>/<< parameters.slnname >>.sln /p:Configuration=Release /p:WarningLevel=0 /p:IsDesktopBuild=false /p:Version=$semver
msbuild << parameters.slnname >>/<< parameters.slnname >>.sln /p:Configuration=Release /p:WarningLevel=0 /p:IsDesktopBuild=false /p:Version=$semver /p:FileVersion=$version
environment:
WORKFLOW_NUM: << pipeline.number >>
- unless:
Expand All @@ -182,7 +194,7 @@ jobs: # Each project will have individual jobs for each specific task it has to
$semver = if($tag.Contains('/')) {$tag.Split("/")[0] } else { $tag }
$ver = if($semver.Contains('-')) {$semver.Split("-")[0] } else { $semver }
$version = "$($ver).$($env:WORKFLOW_NUM)"
dotnet publish << parameters.slnname >>/<< parameters.slnname >>/<< parameters.projname >>.csproj -c Release -v q -r win-x64 --self-contained /p:WarningLevel=0 /p:Version=$semver
dotnet publish << parameters.slnname >>/<< parameters.slnname >>/<< parameters.projname >>.csproj -c Release -r win-x64 --self-contained /p:WarningLevel=0 /p:Version=$semver /p:FileVersion=$version
environment:
WORKFLOW_NUM: << pipeline.number >>
- run:
Expand Down Expand Up @@ -230,8 +242,10 @@ jobs: # Each project will have individual jobs for each specific task it has to
- run:
name: Upload new version
command: |
TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "2.0.999.$WORKFLOW_NUM"; fi;)
TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "2.0.999"; fi;)
SEMVER=$(echo "$TAG" | sed -e 's/\/[a-zA-Z-]*//')
VER=$(echo "$SEMVER" | sed -e 's/-.*//')
VERSION=$(echo $VER.$WORKFLOW_NUM)
/root/.dotnet/tools/Speckle.Manager.Feed deploy -s << parameters.slug >> -v ${SEMVER} -u https://releases.speckle.dev/installers/<< parameters.slug >>/<< parameters.slug >>-${SEMVER}.<< parameters.extension >> -o << parameters.os >> -a << parameters.arch >> -f speckle-sharp-ci-tools/Installers/<< parameters.slug >>/<< parameters.slug >>-${SEMVER}.<< parameters.extension >>
environment:
WORKFLOW_NUM: << pipeline.number >>
Expand Down Expand Up @@ -286,16 +300,9 @@ jobs: # Each project will have individual jobs for each specific task it has to
command: |
HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1 brew install mono mono-libgdiplus
- run:
name: Set environment variables
name: Create installer target dir
command: |
TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "2.0.999"; fi;)
SEMVER=$(echo "$TAG" | sed -e 's/\/[a-zA-Z-]*//')
VER=$(echo "$SEMVER" | sed -e 's/-beta//')
VERSION=$(echo $VER.$WORKFLOW_NUM)
CHANNEL=$(if [[ "$VERSION" == *"-"* ]]; then echo $(cut -d "-" -f2 \<\<\< $VERSION); else echo latest; fi)
mkdir -p speckle-sharp-ci-tools/Installers/<< parameters.slug >>
environment:
WORKFLOW_NUM: << pipeline.number >>
- when:
condition: << parameters.build-with-mono >>
steps:
Expand All @@ -304,7 +311,11 @@ jobs: # Each project will have individual jobs for each specific task it has to
command: |
TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "2.0.999"; fi;)
SEMVER=$(echo "$TAG" | sed -e 's/\/[a-zA-Z-]*//')
msbuild << parameters.slnname >>/<< parameters.slnname >>.sln /r /p:Configuration='<< parameters.build-config >>' /p:WarningLevel=0 /p:IsDesktopBuild=false /p:Version=$SEMVER
VER=$(echo "$SEMVER" | sed -e 's/-.*//')
VERSION=$(echo $VER.$WORKFLOW_NUM)
msbuild << parameters.slnname >>/<< parameters.slnname >>.sln /r /p:Configuration='<< parameters.build-config >>' /p:WarningLevel=0 /p:IsDesktopBuild=false /p:Version=$SEMVER /p:FileVersion=$VERSION
environment:
WORKFLOW_NUM: << pipeline.number >>
# Compress build files
- run:
name: Zip Objects Kit files
Expand All @@ -328,9 +339,11 @@ jobs: # Each project will have individual jobs for each specific task it has to
- run:
name: Publish x64 and arm64
command: |
TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "2.0.999.$WORKFLOW_NUM"; fi;)
TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "2.0.999"; fi;)
SEMVER=$(echo "$TAG" | sed -e 's/\/[a-zA-Z-]*//')
$HOME/.dotnet/dotnet publish << parameters.slnname >>/<< parameters.projname >>/<< parameters.projname >>.csproj -c Release -v q -r osx-x64 --self-contained /p:WarningLevel=0 /p:Version=$SEMVER
VER=$(echo "$SEMVER" | sed -e 's/-.*//')
VERSION=$(echo $VER.$WORKFLOW_NUM)
$HOME/.dotnet/dotnet publish << parameters.slnname >>/<< parameters.projname >>/<< parameters.projname >>.csproj -c Release -r osx-x64 --self-contained /p:WarningLevel=0 /p:Version=$SEMVER /p:FileVersion=$VERSION
environment:
WORKFLOW_NUM: << pipeline.number >>
- run:
Expand Down Expand Up @@ -361,8 +374,10 @@ jobs: # Each project will have individual jobs for each specific task it has to
- run:
name: Copy to installer location
command: |
TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "2.0.999.$WORKFLOW_NUM"; fi;)
TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "2.0.999"; fi;)
SEMVER=$(echo "$TAG" | sed -e 's/\/[a-zA-Z-]*//')
VER=$(echo "$SEMVER" | sed -e 's/-.*//')
VERSION=$(echo $VER.$WORKFLOW_NUM)
cp speckle-sharp-ci-tools/Mac/<<parameters.installername>>/bin/Release/net6.0/osx-x64/publish/<<parameters.slug>>.zip speckle-sharp-ci-tools/Installers/<< parameters.slug >>/<<parameters.slug>>-$SEMVER.zip
environment:
WORKFLOW_NUM: << pipeline.number >>
Expand Down Expand Up @@ -400,17 +415,17 @@ jobs: # Each project will have individual jobs for each specific task it has to
- attach_workspace:
at: ./
- run:
name: Set environment variables
name: Create installer target directory
command: |
mkdir -p speckle-sharp-ci-tools/Installers/<< parameters.slug >>
environment:
WORKFLOW_NUM: << pipeline.number >>
- run:
name: Build
command: |
TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "2.0.999.$WORKFLOW_NUM"; fi;)
TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "2.0.999"; fi;)
SEMVER=$(echo "$TAG" | sed -e 's/\/[a-zA-Z-]*//')
dotnet build << parameters.slnname >>/<< parameters.slnname >>.slnf -c Release -v q -p:WarningLevel=0 -p:Version=$SEMVER -p:IsDesktopBuild=false
VER=$(echo "$SEMVER" | sed -e 's/-.*//')
VERSION=$(echo $VER.$WORKFLOW_NUM)
dotnet build << parameters.slnname >>/<< parameters.slnname >>.slnf -c "<< parameters.build-config >>" -p:WarningLevel=0 -p:Version=$SEMVER -p:FileVersion=$VERSION -p:IsDesktopBuild=false
environment:
WORKFLOW_NUM: << pipeline.number >>
- run:
Expand Down Expand Up @@ -450,8 +465,10 @@ jobs: # Each project will have individual jobs for each specific task it has to
- run:
name: Copy to installer location
command: |
TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "2.0.999.$WORKFLOW_NUM"; fi;)
TAG=$(if [ "${CIRCLE_TAG}" ]; then echo $CIRCLE_TAG; else echo "2.0.999"; fi;)
SEMVER=$(echo "$TAG" | sed -e 's/\/[a-zA-Z-]*//')
VER=$(echo "$SEMVER" | sed -e 's/-.*//')
VERSION=$(echo $VER.$WORKFLOW_NUM)
cp speckle-sharp-ci-tools/Mac/<<parameters.installername>>/bin/Release/net6.0/osx-x64/publish/<<parameters.slug>>.zip speckle-sharp-ci-tools/Installers/<< parameters.slug >>/<<parameters.slug>>-$SEMVER.zip
environment:
WORKFLOW_NUM: << pipeline.number >>
Expand Down Expand Up @@ -482,7 +499,13 @@ jobs: # Each project will have individual jobs for each specific task it has to
name: Checkout branch
command: |
cd speckle-sharp-ci-tools
git checkout ${CIRCLE_BRANCH} || git checkout main
if [ -z "$CIRCLE_TAG" ]
then
git checkout ${CIRCLE_BRANCH} || git checkout main
else
git checkout ${CIRCLE_TAG} || git checkout main
fi
- persist_to_workspace:
root: ./
paths:
Expand Down
6 changes: 5 additions & 1 deletion .circleci/scripts/connector-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ autocadcivil:
dllname: SpeckleConnectorAutocad.dll
slug: civil3d
context: innosetup

- build-connector:
slnname: ConnectorAutocadCivil
dllname: SpeckleConnectorAutocad.dll
slug: advancesteel
context: innosetup
bentley:
- build-connector:
slnname: ConnectorBentley
Expand Down
15 changes: 11 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -193,16 +193,23 @@ dotnet_diagnostic.ca1507.severity = warning
dotnet_diagnostic.ca1508.severity = warning
dotnet_diagnostic.ca1509.severity = warning

dotnet_diagnostic.ca1002.severity = suggestion

# Misc
dotnet_diagnostic.ca1051.severity = none # Do not declare visible instance fields
dotnet_diagnostic.ca1056.severity = suggestion
dotnet_diagnostic.ca1062.severity = none # Public method must check all parameters for null
dotnet_diagnostic.ca1707.severity = none # Remove underscores in names
dotnet_diagnostic.ca1822.severity = suggestion # Mark member as static

dotnet_diagnostic.ca2211.severity = suggestion # Non constant fields should not be visible
dotnet_diagnostic.ca2227.severity = suggestion # Collection props should be read-only


dotnet_analyzer_diagnostic.category-globalization.severity = none
dotnet_analyzer_diagnostic.category-security.severity = none
dotnet_analyzer_diagnostic.category-interoperability.severity = none
dotnet_analyzer_diagnostic.category-singlefile.severity = none
dotnet_analyzer_diagnostic.category-Globalization.severity = none
dotnet_analyzer_diagnostic.category-Security.severity = none
dotnet_analyzer_diagnostic.category-Interoperability.severity = none
dotnet_analyzer_diagnostic.category-SingleFile.severity = none

[*.{appxmanifest,asax,ascx,aspx,axaml,build,c,c++,cc,cginc,compute,cp,cpp,cs,cshtml,cu,cuh,cxx,dtd,fs,fsi,fsscript,fsx,fx,fxh,h,hh,hlsl,hlsli,hlslinc,hpp,hxx,inc,inl,ino,ipp,ixx,master,ml,mli,mpp,mq4,mq5,mqh,nuspec,paml,razor,resw,resx,shader,skin,tpp,usf,ush,vb,xaml,xamlx,xoml,xsd}]
indent_style = space
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -372,5 +372,6 @@ speckle-sharp-ci-tools
.circleci/contiuation-config.yml
ConnectorNavisworks/ConnectorNavisworks/Sample Models
ConnectorArchicad/AddOn/Build*
ConnectorArchicad/ConnectorArchicad/Properties
**/dist/

Loading

0 comments on commit e321547

Please sign in to comment.