Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO NOT MERGE! Github Actions build + annotations test #3371

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
df1134b
test: Build into `dist/` folder
AlanRynne May 6, 2024
af7a134
test: Only do so on CI
AlanRynne May 6, 2024
2cc5d97
test: Zipping output to dist/zip
AlanRynne May 6, 2024
7e3d429
test: Super simple github action
AlanRynne May 6, 2024
eb67ea7
test: dotnet msbuild
AlanRynne May 6, 2024
0b71b88
test: Just speeding it up by skipping steps 🙂
AlanRynne May 6, 2024
e38b7f8
test: Too much
AlanRynne May 6, 2024
7b1abff
temp: Silence Core and Objects warnings in CI for now
AlanRynne May 7, 2024
aded3d5
fix: Do only on CI
AlanRynne May 7, 2024
d2d635a
test warn as error in github
AlanRynne May 7, 2024
b9cbe51
test: GitVersion this thing!
AlanRynne May 8, 2024
228e26f
fix: Dotnet-version
AlanRynne May 8, 2024
55bf0bd
fetch depth of 0
AlanRynne May 8, 2024
72a14ca
fix: Removed invalid configurations
AlanRynne May 8, 2024
6f6e26f
fix long restore?
AlanRynne May 8, 2024
aa076df
just archive the entire zip folder
AlanRynne May 8, 2024
7a19ac6
use normal nuget?
AlanRynne May 8, 2024
f1d9fc8
restore all.sln
AlanRynne May 8, 2024
dc73ade
Merge branch 'dui3/alpha' into dui3/ci/github-actions-test
AlanRynne May 8, 2024
14b1888
use msbuild restore?
AlanRynne May 8, 2024
d68d3ce
teaks to target
AlanRynne May 8, 2024
5db7226
no zipping
AlanRynne May 8, 2024
8eb0471
restore using lock files test
AlanRynne May 8, 2024
e8d5efb
minor tweaks
AlanRynne May 8, 2024
c0757a3
match to fallback key if nuget cache is not found
AlanRynne May 8, 2024
bb0cd46
run restore in lock mode, don't skip
AlanRynne May 8, 2024
4f32553
update gitversion and lock files
AlanRynne May 8, 2024
1be25c5
fix: update lock files
AlanRynne May 8, 2024
713c713
no gitversion 🥲
AlanRynne May 8, 2024
623cf71
even less :D
AlanRynne May 8, 2024
f8df726
no cache and use global.json
AlanRynne May 8, 2024
6bf6d8a
rel path
AlanRynne May 8, 2024
45011c8
AlanRynne May 8, 2024
bf9b554
🔓
AlanRynne May 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: .NET

on:
push:
branches: ["dui3/alpha", "dui3/ci/*"]
pull_request:
branches: ["dui3/alpha"]

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.x.x
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
# - name: Restore tools
# run: dotnet tool restore
# - name: Code formatting check
# run: dotnet csharpier --check .
- name: Restore projects
run: dotnet restore DUI3-DX.slnf
- name: Build
run: msbuild DUI3-DX.slnf /p:Configuration=Release /p:IsDesktopBuild=false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if this helps but using bullseye and C# instead of msbuild is what I do: https://github.com/adamralph/bullseye

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I've been eyeing some build systems for a while but didn't know about this one. Adding it to my "must look into" list!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that the build is the same language as the project and not XML.

I used to use (and contribute) to Cake but thought it was overblown. Found bullseye and used it ever since dotnet got simple and fast

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: DUI3 Connectors
path: dist/zip/*.zip
3 changes: 3 additions & 0 deletions All.sln
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,9 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Revit", "Revit", "{4838C66E-8677-4FBD-9609-25376042E981}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Connectors", "Connectors", "{33D19E88-F3AE-4D28-B588-D91CCF9E3BA8}"
ProjectSection(SolutionItems) = preProject
DUI3-DX\Connectors\Directory.Build.targets = DUI3-DX\Connectors\Directory.Build.targets
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Objects", "Objects", "{B92E6216-2CBA-4EA5-B94B-0A7658C7F84B}"
EndProject
Expand Down
6 changes: 3 additions & 3 deletions Core/Core/Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

<PropertyGroup Condition="'$(IsDesktopBuild)' == false">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsNotAsErrors>
$(WarningsNotAsErrors);
<NoWarn>
$(NoWarn);
CA1000; CA1001; CA1003; CA1024; CA1033; CA1034; CA1051; CA1055; CA1063; CA1065;
CA1502; CA1506;
CA1708; CA1710; CA1711; CA1716; CA1720; CA1721; CA1724;
Expand All @@ -27,7 +27,7 @@
CS0419; CS0618; CS0659; CS0809;
CS8600; CS8602; CS8603; CS8604;
IDE0032; IDE0059; IDE0130; IDE1006;
</WarningsNotAsErrors>
</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup>
<ConnectorSlug>arcgis</ConnectorSlug>
<ConnectorVersion>3</ConnectorVersion>
</PropertyGroup>

<ItemGroup>
<Content Include="Config.daml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\AutoCAD 2023\acad.exe</StartProgram>
</PropertyGroup>

<PropertyGroup>
<ConnectorSlug>acad</ConnectorSlug>
<ConnectorVersion>2023</ConnectorVersion>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Converters\Autocad\Speckle.Converters.Autocad2023.DependencyInjection\Speckle.Converters.Autocad2023.DependencyInjection.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj"/>
Expand Down
30 changes: 30 additions & 0 deletions DUI3-DX/Connectors/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.targets', '$(MSBuildThisFileDirectory)../'))"/>


<Target Name="CopyToDistAndZip" AfterTargets="Build" Condition="'$(IsDesktopBuild)' == false">

<Error Text="ConnectorSlug property is not set" Condition=" '$(ConnectorSlug)' == '' " />
<Error Text="ConnectorVersion property is not set" Condition=" '$(ConnectorVersion)' == '' " />

<PropertyGroup>
<OutputDirectory>$(RepositoryRoot)/dist/$(ConnectorSlug)/$(ConnectorVersion)</OutputDirectory>
<OutputZipDirectory>$(RepositoryRoot)/dist/zip</OutputZipDirectory>
<OutputZipFile>$(ConnectorSlug)-$(ConnectorVersion)-$(Version).zip</OutputZipFile>
</PropertyGroup>

<RemoveDir Directories="$(OutputDirectory)"/>
<MakeDir Directories="$(OutputDirectory)"/>
<MakeDir Directories="$(OutputZipDirectory)"/>

<ItemGroup>
<DllFiles Include="$(OutDir)**/*.*"/>
</ItemGroup>

<Copy SourceFiles="@(DllFiles)" DestinationFolder="$(OutputDirectory)/%(RecursiveDir)"/>

<ZipDirectory SourceDirectory="$(OutputDirectory)" DestinationFile="$(OutputZipDirectory)/$(OutputZipFile)"/>

</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@

<Import Project="..\Speckle.Connectors.RevitShared\Speckle.Connectors.RevitShared.projitems" Label="Shared" />

<PropertyGroup>
<ConnectorSlug>revit</ConnectorSlug>
<ConnectorVersion>2023</ConnectorVersion>
</PropertyGroup>

<PropertyGroup>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>

<PropertyGroup>
<ConnectorSlug>rhino</ConnectorSlug>
<ConnectorVersion>7</ConnectorVersion>
</PropertyGroup>

<ItemGroup>
<EmbeddedResource Include="EmbeddedResources\**\*"/>
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Speckle.Converters.Common.Objects;
using Speckle;

Check failure on line 2 in DUI3-DX/Converters/Rhino/Speckle.Converters.Rhino7/ToHost/Raw/ArcToHostConverter.cs

View workflow job for this annotation

GitHub Actions / build

Using directive is unnecessary. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0005)

Check failure on line 2 in DUI3-DX/Converters/Rhino/Speckle.Converters.Rhino7/ToHost/Raw/ArcToHostConverter.cs

View workflow job for this annotation

GitHub Actions / build

Using directive is unnecessary. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0005)

namespace Speckle.Converters.Rhino7.ToHost.Raw;

Expand Down
6 changes: 3 additions & 3 deletions Objects/Objects/Objects.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@

<PropertyGroup Condition="'$(IsDesktopBuild)' == false">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsNotAsErrors>
$(WarningsNotAsErrors);
<NoWarn>
$(NoWarn);
CA1008; CA1024; CA1034; CA1065;
CA1708; CA1711; CA1716; CA1724; CA1725;
CA1819; CS8618;
CA2201; CA2225;
CS0659; CS0661; CS0728;
IDE0041; IDE0060; IDE1006;
</WarningsNotAsErrors>
</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading