Skip to content

Commit

Permalink
Dev -> Main for 2.20.0-rc (#3609)
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-Morgan authored Aug 2, 2024
2 parents aafcc02 + b65c3fa commit 1f2fda4
Show file tree
Hide file tree
Showing 266 changed files with 10,315 additions and 3,547 deletions.
5 changes: 2 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ setup: true
# the path-filtering orb is required to continue a pipeline based on
# the path of an updated fileset
orbs:
path-filtering: circleci/[email protected]
continuation: circleci/[email protected]
python: circleci/[email protected]
continuation: circleci/[email protected]
python: circleci/[email protected]

jobs:
setup:
Expand Down
101 changes: 63 additions & 38 deletions .circleci/scripts/config-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@ version: 2.1

orbs:
win: circleci/[email protected]
aws-s3: circleci/[email protected]
codecov: codecov/[email protected]
wait-for: cobli/[email protected]
discord: antonioned/[email protected]
docker: circleci/[email protected]
macos: circleci/[email protected]
macos: circleci/[email protected]
# The main workflows for our monorepo pipeline.

workflows:
Expand Down Expand Up @@ -74,14 +70,14 @@ commands:
jobs: # Each project will have individual jobs for each specific task it has to execute (build, release...)
build-sdk:
docker:
- image: cimg/base:2021.01
- image: cimg/base:2024.07
steps:
- cached-checkout
- run:
name: Install dotnet
command: |
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel sts
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --version 8.0.204
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --version 8.0.206
$HOME/.dotnet/dotnet --version
- run:
name: Enforce formatting
Expand Down Expand Up @@ -121,15 +117,15 @@ jobs: # Each project will have individual jobs for each specific task it has to

test-core:
machine:
image: ubuntu-2204:2023.02.1
image: ubuntu-2204:2024.05.1
resource_class: large
steps:
- cached-checkout
- run:
name: Install dotnet
command: |
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel sts
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --version 8.0.204
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --version 8.0.206
$HOME/.dotnet/dotnet --version
- run:
name: Startup the Speckle Server
Expand Down Expand Up @@ -203,17 +199,33 @@ jobs: # Each project will have individual jobs for each specific task it has to
name: Exit if External PR
shell: bash.exe
command: if [ "$CIRCLE_PR_REPONAME" ]; then circleci-agent step halt; fi
- unless: # Build installers unsigned on non-tagged builds
condition: << pipeline.git.tag >>
- unless: # Build Unsigned Installers for untagged, or wip/alpha/feature/etc. tags (non-stable, non-rc)
condition:
and:
- << pipeline.git.tag >>
- not:
matches:
pattern: "^.*-(?!rc).*$"
value: << pipeline.git.tag >>
steps:
- run:
name: Build Installer
name: Build Installer Unsigned
command: speckle-sharp-ci-tools\InnoSetup\ISCC.exe speckle-sharp-ci-tools\%SLUG%.iss /Sbyparam=$p
shell: cmd.exe #does not work in powershell
environment:
SLUG: << parameters.slug >>
- when: # Setup certificates and build installers signed for tagged builds
condition: << pipeline.git.tag >>
- persist_to_workspace:
root: ./
paths:
- speckle-sharp-ci-tools/Installers
- when: # Setup certificates and build installers signed for tagged builds that aren't prerelease
condition:
and:
- << pipeline.git.tag >>
- not:
matches:
pattern: "^.*-(?!rc).*$"
value: << pipeline.git.tag >>
steps:
- run:
name: "Digicert Signing Manager Setup"
Expand All @@ -232,7 +244,7 @@ jobs: # Each project will have individual jobs for each specific task it has to
command: |
& $env:SSM\smksp_cert_sync.exe
- run:
name: Build Installer
name: Build Installer Signed
command: speckle-sharp-ci-tools\InnoSetup\ISCC.exe speckle-sharp-ci-tools\%SLUG%.iss /Sbyparam=$p /DSIGN_INSTALLER /DCODE_SIGNING_CERT_FINGERPRINT=%SM_CODE_SIGNING_CERT_SHA1_HASH%
shell: cmd.exe #does not work in powershell
environment:
Expand Down Expand Up @@ -312,7 +324,7 @@ jobs: # Each project will have individual jobs for each specific task it has to
name: Install dotnet
command: |
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel sts
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --version 8.0.204
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --version 8.0.206
$HOME/.dotnet/dotnet --version
$HOME/.dotnet/dotnet --list-runtimes
Expand Down Expand Up @@ -341,6 +353,28 @@ jobs: # Each project will have individual jobs for each specific task it has to
msbuild << parameters.slnname >>/<< parameters.slnname >>.sln /r /p:Configuration='<< parameters.build-config >>' /p:IsDesktopBuild=false /p:Version=$SEMVER /p:FileVersion=$VERSION
environment:
WORKFLOW_NUM: << pipeline.number >>
- unless:
condition: << parameters.build-with-mono >>
steps:
- run:
name: Publish x64 and arm64
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)
$HOME/.dotnet/dotnet publish << parameters.slnname >>/<< parameters.projname >>/<< parameters.projname >>.csproj -c Release -r osx-arm64 --self-contained /p:IsDesktopBuild=false /p:Version=$SEMVER /p:FileVersion=$VERSION
$HOME/.dotnet/dotnet publish << parameters.slnname >>/<< parameters.projname >>/<< parameters.projname >>.csproj -c Release -r osx-x64 --self-contained /p:IsDesktopBuild=false /p:Version=$SEMVER /p:FileVersion=$VERSION
environment:
WORKFLOW_NUM: << pipeline.number >>
# Create installer
- run:
name: Exit if External PR
command: if [ "$CIRCLE_PR_REPONAME" ]; then circleci-agent step halt; fi
# Zip files for installer
- when:
condition: << parameters.build-with-mono >>
steps:
# Compress build files
- run:
name: Zip Objects Kit files
Expand All @@ -362,34 +396,25 @@ jobs: # Each project will have individual jobs for each specific task it has to
condition: << parameters.build-with-mono >>
steps:
- run:
name: Publish x64 and arm64
name: Create app bundles
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)
$HOME/.dotnet/dotnet publish << parameters.slnname >>/<< parameters.projname >>/<< parameters.projname >>.csproj -c Release -r osx-arm64 --self-contained /p:IsDesktopBuild=false /p:Version=$SEMVER /p:FileVersion=$VERSION
$HOME/.dotnet/dotnet publish << parameters.slnname >>/<< parameters.projname >>/<< parameters.projname >>.csproj -c Release -r osx-x64 --self-contained /p:IsDesktopBuild=false /p:Version=$SEMVER /p:FileVersion=$VERSION
environment:
WORKFLOW_NUM: << pipeline.number >>
sh ./speckle-sharp-ci-tools/Mac/AppBundle/bundle.sh ./<< parameters.slnname >>/<< parameters.slnname >>/bin/Release/net6.0/osx-arm64/publish/ ./<< parameters.slnname >>/<< parameters.slnname >>/Info.plist ./<< parameters.slnname >>/<< parameters.slnname >>/Assets/icon-mac.icns ./<< parameters.slnname >>/<< parameters.slnname >>/bin/Release/net6.0/osx-arm64/<< parameters.slnname >>
sh ./speckle-sharp-ci-tools/Mac/AppBundle/bundle.sh ./<< parameters.slnname >>/<< parameters.slnname >>/bin/Release/net6.0/osx-x64/publish/ ./<< parameters.slnname >>/<< parameters.slnname >>/Info.plist ./<< parameters.slnname >>/<< parameters.slnname >>/Assets/icon-mac.icns ./<< parameters.slnname >>/<< parameters.slnname >>/bin/Release/net6.0/osx-x64/<< parameters.slnname >>
- run:
name: Zip Connector files
command: |
cd "<< parameters.slnname >>/<< parameters.slnname >>/bin/Release/net6.0/osx-arm64/publish"
zip -r << parameters.slug >>-mac-arm64.zip "./"
cd "../../osx-x64/publish"
zip -r << parameters.slug >>-mac-x64.zip "./"
cd "<< parameters.slnname >>/<< parameters.slnname >>/bin/Release/net6.0/osx-arm64/"
zip -r << parameters.slug >>-mac-arm64.zip "./<< parameters.slnname >>.app"
cd "../osx-x64/"
zip -r << parameters.slug >>-mac-x64.zip "./<< parameters.slnname >>.app"
# Copy installer files
- run:
name: Copy files to installer
command: |
mkdir -p speckle-sharp-ci-tools/Mac/<< parameters.installername >>/.installationFiles/
cp << parameters.slnname >>/<< parameters.slnname >>/bin/Release/net6.0/osx-arm64/publish/<< parameters.slug >>-mac-arm64.zip speckle-sharp-ci-tools/Mac/<<parameters.installername>>/.installationFiles
cp << parameters.slnname >>/<< parameters.slnname >>/bin/Release/net6.0/osx-x64/publish/<< parameters.slug >>-mac-x64.zip speckle-sharp-ci-tools/Mac/<<parameters.installername>>/.installationFiles
# Create installer
- run:
name: Exit if External PR
command: if [ "$CIRCLE_PR_REPONAME" ]; then circleci-agent step halt; fi
cp << parameters.slnname >>/<< parameters.slnname >>/bin/Release/net6.0/osx-arm64/<< parameters.slug >>-mac-arm64.zip speckle-sharp-ci-tools/Mac/<<parameters.installername>>/.installationFiles
cp << parameters.slnname >>/<< parameters.slnname >>/bin/Release/net6.0/osx-x64/<< parameters.slug >>-mac-x64.zip speckle-sharp-ci-tools/Mac/<<parameters.installername>>/.installationFiles
- run:
name: Build Mac installer
command: ~/.dotnet/dotnet publish speckle-sharp-ci-tools/Mac/<<parameters.installername>>/<<parameters.installername>>.sln -r osx-x64 -c Release
Expand Down Expand Up @@ -511,7 +536,7 @@ jobs: # Each project will have individual jobs for each specific task it has to

get-ci-tools: # Clones our ci tools and persists them to the workspace
docker:
- image: cimg/base:2021.01
- image: cimg/base:2024.07
steps:
- add_ssh_keys:
fingerprints:
Expand Down Expand Up @@ -641,15 +666,15 @@ jobs: # Each project will have individual jobs for each specific task it has to

deploy-connectors: # Uploads all installers found to S3
docker:
- image: cimg/base:2021.01
- image: cimg/base:2024.07
steps:
- run:
name: Proceed to deploy
command: echo "This step is just here to wait for all build jobs before proceeding to deploy each of them individually. If a job fails, no connector will be deployed."

notify-deploy:
docker:
- image: cimg/base:2021.01
- image: cimg/base:2024.07
steps:
- discord/status:
mentions: "1067457311980933140"
Expand Down
1 change: 1 addition & 0 deletions Automate/Speckle.Automate.Sdk/AutomationContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Speckle.Automate.Sdk.Schema;
using Speckle.Automate.Sdk.Schema.Triggers;
using Speckle.Core.Api;
using Speckle.Core.Api.GraphQL.Models;
using Speckle.Core.Credentials;
using Speckle.Core.Logging;
using Speckle.Core.Models;
Expand Down
4 changes: 2 additions & 2 deletions Automate/Speckle.Automate.Sdk/Speckle.Automate.Sdk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<PropertyGroup Condition="'$(IsDesktopBuild)' == false">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU5104</WarningsNotAsErrors>
<WarningsNotAsErrors>$(WarningsNotAsErrors);CS8618;CS0618;</WarningsNotAsErrors>
</PropertyGroup>

<ItemGroup>
Expand All @@ -22,7 +22,7 @@

<ItemGroup>
<PackageReference Include="Newtonsoft.Json.Schema" Version="3.0.15" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" NoWarn="NU5104"/>
<ProjectReference Include="..\..\Core\Core\Core.csproj" />
</ItemGroup>

Expand Down
47 changes: 23 additions & 24 deletions ConnectorArchicad/AddOn/Sources/AddOn/AddOnMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "Commands/GetElementBaseData.hpp"
#include "Commands/GetGridElementData.hpp"
#include "Commands/GetObjectData.hpp"
#include "Commands/GetOpeningData.hpp"
#include "Commands/GetSlabData.hpp"
#include "Commands/GetRoofData.hpp"
#include "Commands/GetShellData.hpp"
Expand All @@ -31,6 +32,7 @@
#include "Commands/CreateColumn.hpp"
#include "Commands/CreateGridElement.hpp"
#include "Commands/CreateObject.hpp"
#include "Commands/CreateOpening.hpp"
#include "Commands/CreateRoof.hpp"
#include "Commands/CreateSkylight.hpp"
#include "Commands/CreateSlab.hpp"
Expand Down Expand Up @@ -90,46 +92,41 @@ class AvaloniaProcessManager {
private:
GS::UniString GetPlatformSpecificExecutablePath ()
{
#if defined (macintosh)
static const char* FileName = "ConnectorArchicad";
#else
static const char* FileName = "ConnectorArchicad.exe";
#endif
static const char* FolderNameCommon = "Common";
static const char* FolderName = "ConnectorArchicad";

IO::Location ownFileLoc;
auto err = ACAPI_GetOwnLocation (&ownFileLoc);
if (err != NoError) {
return "";
}

#if defined (macintosh)
static const char* ProductionConnector = "../../../Common/ConnectorArchicad/ConnectorArchicad.app/Contents/MacOS/ConnectorArchicad";
#else
static const char* ProductionConnector = "../../../Common/ConnectorArchicad/ConnectorArchicad.exe";
#endif

IO::Location location (ownFileLoc);
location.DeleteLastLocalName ();
location.DeleteLastLocalName ();
location.DeleteLastLocalName ();
location.AppendToLocal (IO::Name (FolderNameCommon));
location.AppendToLocal (IO::Name (FolderName));
location.AppendToLocal (IO::Name (FileName));
location.AppendToLocal (IO::RelativeLocation (ProductionConnector));

bool exist (false);
err = IO::fileSystem.Contains (location, &exist);
if (err != NoError || !exist) {
location = ownFileLoc;
location.DeleteLastLocalName ();
location.DeleteLastLocalName ();
location.DeleteLastLocalName ();
location.DeleteLastLocalName ();

location.AppendToLocal (IO::Name (FolderName));
location.AppendToLocal (IO::Name ("bin"));
#if defined (macintosh)
#ifdef DEBUG
location.AppendToLocal (IO::Name ("Debug"));
static const char* DevelopmentConnector = "../../../../ConnectorArchicad/bin/Debug/net6.0/ConnectorArchicad";
#else
location.AppendToLocal (IO::Name ("Release"));
static const char* DevelopmentConnector = "../../../../ConnectorArchicad/bin/Release/net6.0/ConnectorArchicad";
#endif
location.AppendToLocal (IO::Name ("net6.0"));
location.AppendToLocal (IO::Name (FileName));
#else
#ifdef DEBUG
static const char* DevelopmentConnector = "../../../../ConnectorArchicad/bin/Debug/net6.0/ConnectorArchicad.exe";
#else
static const char* DevelopmentConnector = "../../../../ConnectorArchicad/bin/Release/net6.0/ConnectorArchicad.exe";
#endif
#endif

location.AppendToLocal (IO::RelativeLocation (DevelopmentConnector));
}

GS::UniString executableStr;
Expand Down Expand Up @@ -200,6 +197,7 @@ static GSErrCode RegisterAddOnCommands ()
CHECKERROR (ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (NewOwned<AddOnCommands::GetElementBaseData> ()));
CHECKERROR (ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (NewOwned<AddOnCommands::GetGridElementData> ()));
CHECKERROR (ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (NewOwned<AddOnCommands::GetObjectData> ()));
CHECKERROR (ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (NewOwned<AddOnCommands::GetOpeningData> ()));
CHECKERROR (ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (NewOwned<AddOnCommands::GetRoofData> ()));
CHECKERROR (ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (NewOwned<AddOnCommands::GetShellData> ()));
CHECKERROR (ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (NewOwned<AddOnCommands::GetSkylightData> ()));
Expand All @@ -213,6 +211,7 @@ static GSErrCode RegisterAddOnCommands ()
CHECKERROR (ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (NewOwned<AddOnCommands::CreateGridElement> ()));
CHECKERROR (ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (NewOwned<AddOnCommands::CreateColumn> ()));
CHECKERROR (ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (NewOwned<AddOnCommands::CreateObject> ()));
CHECKERROR (ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (NewOwned<AddOnCommands::CreateOpening> ()));
CHECKERROR (ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (NewOwned<AddOnCommands::CreateRoof> ()));
CHECKERROR (ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (NewOwned<AddOnCommands::CreateShell> ()));
CHECKERROR (ACAPI_AddOnAddOnCommunication_InstallAddOnCommandHandler (NewOwned<AddOnCommands::CreateSkylight> ()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "CreateCommand.hpp"
#include "LibpartImportManager.hpp"
#include "ClassificationImportManager.hpp"
#include "APIHelper.hpp"
#include "FieldNames.hpp"
#include "OnExit.hpp"
#include "ExchangeManager.hpp"
Expand Down Expand Up @@ -124,8 +123,6 @@ GS::ObjectState CreateCommand::Execute (const GS::ObjectState& parameters, GS::P
parameters.Get (GetFieldName (), objectStates);

ACAPI_CallUndoableCommand (GetUndoableCommandName (), [&] () -> GSErrCode {
LibraryHelper helper (false);

GS::Array<GS::ObjectState> applicationObjects;

AttributeManager* attributeManager = AttributeManager::GetInstance ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "RealNumber.h"
#include "DGModule.hpp"
#include "LibpartImportManager.hpp"
#include "APIHelper.hpp"
#include "FieldNames.hpp"
#include "OnExit.hpp"
#include "ExchangeManager.hpp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "CreateGridElement.hpp"
#include "ResourceIds.hpp"
#include "ObjectState.hpp"
#include "APIHelper.hpp"
#include "Utility.hpp"
#include "Objects/Level.hpp"
#include "Objects/Point.hpp"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "CreateObject.hpp"

#include "APIMigrationHelper.hpp"
#include "APIHelper.hpp"
#include "LibpartImportManager.hpp"
#include "ResourceIds.hpp"
#include "Utility.hpp"
Expand Down Expand Up @@ -131,8 +130,6 @@ GS::ObjectState CreateObject::Execute (const GS::ObjectState& parameters, GS::Pr
parameters.Get (FieldNames::MeshModels, meshModels);

ACAPI_CallUndoableCommand (GetUndoableCommandName (), [&] () -> GSErrCode {
LibraryHelper helper (false);

AttributeManager* attributeManager = AttributeManager::GetInstance ();
LibpartImportManager* libpartImportManager = LibpartImportManager::GetInstance ();
for (ModelInfo meshModel : meshModels) {
Expand Down
Loading

0 comments on commit 1f2fda4

Please sign in to comment.