Compare commits

...

8 Commits

Author SHA1 Message Date
Jedd Morgan 27a1d50a78 refactor(ci): Update workflow to use new consolidated deployment workflow (#743)
.NET Build and Publish / build-windows (push) Has been cancelled
.NET Build and Publish / build-linux (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
* Ci experiment

* with comma

* is_public_release

* Pass fileversion via envars

* semver

* to main

* keep fetch depth on linux

* last test (tm)

* Updated workflow-dispatch

* Fetch depth now required for prs too

* and for tests too

* target main
2025-04-24 16:44:06 +03:00
Jedd Morgan 9e28c95a3c Merge pull request #783 from specklesystems/jrm/dev-main
Dev -> Main
2025-04-24 13:02:17 +01:00
Jedd Morgan 5e61a35c53 Merge branch 'main' into jrm/dev-main 2025-04-24 12:52:27 +01:00
Oğuzhan Koral d270be3ef9 Merge pull request #771 from specklesystems/oguzhan/cnx-1643-store-user-selected-workspace-id
Feat: workspaces config
2025-04-21 18:59:47 +03:00
Oğuzhan Koral 4dd0280534 Merge branch 'dev' into oguzhan/cnx-1643-store-user-selected-workspace-id 2025-04-21 17:20:06 +03:00
Dimitrie Stefanescu 9f04750c26 Merge pull request #770 from specklesystems/dimitrie/cnx-1301-revit-stacked-walls-are-not-sending
fix: allows for stacked walls to be sent
2025-04-21 15:19:54 +01:00
oguzhankoral d3ad8e828c Workspaces config 2025-04-21 17:00:22 +03:00
Dimitrie Stefanescu b9f474decf fix: allows for stacked walls to be sent 2025-04-21 14:10:44 +01:00
5 changed files with 109 additions and 22 deletions
+8 -11
View File
@@ -1,13 +1,10 @@
name: .NET Build
on:
pull_request
on: pull_request
jobs:
jobs:
build:
runs-on: windows-latest
outputs:
version: ${{ steps.set-version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -18,8 +15,8 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.4xx # Align with global.json (including roll forward rules)
- name: Cache Nuget
- name: Cache Nuget
uses: actions/cache@v4
with:
path: ~/.nuget/packages
@@ -39,8 +36,8 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.4xx # Align with global.json (including roll forward rules)
- name: Cache Nuget
- name: Cache Nuget
uses: actions/cache@v4
with:
path: ~/.nuget/packages
@@ -51,9 +48,9 @@ jobs:
- name: ⚒️ Run tests
run: ./build.sh test-only
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v5
with:
file: Converters/**/coverage.xml
files: Converters/**/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
+19 -9
View File
@@ -3,15 +3,17 @@ name: .NET Build and Publish
on:
push:
branches: ["main", "installer-test/**"]
tags: ["v3.*"] # Manual delivery on every 3.x tag
tags: ["v3.*.*"] # Manual delivery on every 3.x tag
jobs:
build-windows:
runs-on: windows-latest
env:
SPECKLE_VERSION: "unset"
SEMVER: "unset"
FILE_VERSION: "unset"
outputs:
version: ${{ steps.set-version.outputs.version }}
semver: ${{ steps.set-version.outputs.semver }}
file_version: ${{ steps.set-version.outputs.file_version }}
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -35,29 +37,37 @@ jobs:
- name: ⬆️ Upload artifacts
uses: actions/upload-artifact@v4
with:
name: output-${{ env.SPECKLE_VERSION }}
name: output-${{ env.SEMVER }}
path: output/*.*
if-no-files-found: error
retention-days: 1
compression-level: 0 # no compression
compression-level: 0 # no compression
- id: set-version
name: Set version to output
run: echo "version=${{ env.SPECKLE_VERSION }}" >> "$Env:GITHUB_OUTPUT"
run: |
echo "semver=${{ env.SEMVER }}" >> "$Env:GITHUB_OUTPUT"
echo "file_version=${{ env.FILE_VERSION }}" >> "$Env:GITHUB_OUTPUT"
deploy-installers:
runs-on: ubuntu-latest
needs: build-windows
env:
IS_PUBLIC_RELEASE: ${{ github.ref_type == 'tag' }}
IS_TEST_INSTALLER: ${{ github.ref_type != 'tag' }}
steps:
- name: 🔫 Trigger Build Installers
uses: ALEEF02/workflow-dispatch@v3.0.0
uses: the-actions-org/workflow-dispatch@v4.0.0
with:
workflow: Build Installers
repo: specklesystems/connector-installers
token: ${{ secrets.CONNECTORS_GH_TOKEN }}
inputs: '{ "run_id": "${{ github.run_id }}", "version": "${{ needs.build-windows.outputs.version }}", "public_release": ${{ env.IS_PUBLIC_RELEASE }}, "store_artifacts": ${{ env.IS_TEST_INSTALLER }} }'
inputs: '{
"run_id": "${{ github.run_id }}",
"semver": "${{ needs.build-windows.outputs.semver }}",
"file_version": "${{ needs.build-windows.outputs.file_version }}",
"repo": "${{ github.repository }}",
"is_public_release": ${{ env.IS_PUBLIC_RELEASE }}
}'
ref: main
wait-for-completion: true
wait-for-completion-interval: 10s
+3 -1
View File
@@ -239,6 +239,7 @@ Target(
async () =>
{
var version = await Versions.ComputeVersion();
var fileVersion = await Versions.ComputeFileVersion();
foreach (var group in await Affected.GetAffectedProjectGroups())
{
Console.WriteLine($"Zipping: {group.HostAppSlug} as {version}");
@@ -280,7 +281,8 @@ Target(
string githubEnv = Environment.GetEnvironmentVariable("GITHUB_ENV") ?? "Unset";
Console.WriteLine($"GITHUB_ENV: {githubEnv}");
File.AppendAllText(githubEnv, $"SPECKLE_VERSION={version}{Environment.NewLine}");
File.AppendAllText(githubEnv, $"SEMVER={version}{Environment.NewLine}");
File.AppendAllText(githubEnv, $"FILE_VERSION={fileVersion}{Environment.NewLine}");
}
);
@@ -13,7 +13,25 @@ public static class SupportedCategoriesUtils
/// <returns></returns>
public static bool IsSupportedCategory(Category? category)
{
if (category is null || !category.IsVisibleInUI)
if (category is null)
{
return false;
}
// stacked walls are "not visible in the ui" whereas they clearly are.
// see [CNX-1301: Revit Stacked Walls are not sending](https://linear.app/speckle/issue/CNX-1301/revit-stacked-walls-are-not-sending)
#if REVIT2023_OR_GREATER
if (category.BuiltInCategory == BuiltInCategory.OST_StackedWalls)
{
return true;
}
#else
if (category.Name == "Stacked Walls")
{
return true;
}
#endif
if (!category.IsVisibleInUI) //&& category.BuiltInCategory != BuiltInCategory.OST_StackedWalls)
{
return false;
}
@@ -88,6 +88,7 @@ public class ConfigBinding : IBinding
_jsonCacheManager.UpdateObject("accounts", str);
}
// TODO: need to be replaced with `GetAccountsConfig` function after some amount of time to not confuse ourselves.
public AccountsConfig? GetUserSelectedAccountId()
{
var rawConfig = _jsonCacheManager.GetObject("accounts");
@@ -111,6 +112,60 @@ public class ConfigBinding : IBinding
return null;
}
}
public AccountsConfig? GetAccountsConfig()
{
var rawConfig = _jsonCacheManager.GetObject("accounts");
if (rawConfig is null)
{
return null;
}
try
{
var config = _serializer.Deserialize<AccountsConfig>(rawConfig);
if (config is null)
{
throw new SerializationException("Failed to deserialize accounts config");
}
return config;
}
catch (SerializationException)
{
return null;
}
}
public void SetUserSelectedWorkspaceId(string workspaceId)
{
var str = _serializer.Serialize(new WorkspacesConfig() { UserSelectedWorkspaceId = workspaceId });
_jsonCacheManager.UpdateObject("workspaces", str);
}
public WorkspacesConfig? GetWorkspacesConfig()
{
var rawConfig = _jsonCacheManager.GetObject("workspaces");
if (rawConfig is null)
{
return null;
}
try
{
var config = _serializer.Deserialize<WorkspacesConfig>(rawConfig);
if (config is null)
{
throw new SerializationException("Failed to deserialize workspaces config");
}
return config;
}
catch (SerializationException)
{
return null;
}
}
}
/// <summary>
@@ -125,3 +180,8 @@ public class AccountsConfig
{
public string? UserSelectedAccountId { get; set; }
}
public class WorkspacesConfig
{
public string? UserSelectedWorkspaceId { get; set; }
}