Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 11 additions & 11 deletions .github/workflows/dev-pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
push:
branches: [ "develop" ]
workflow_dispatch:

concurrency:
group: dev-pr-build
cancel-in-progress: ${{ !contains(github.actor, '[bot]') }}
Expand All @@ -29,7 +29,7 @@ jobs:

test:
runs-on: [ self-hosted, Windows, X64 ]
needs: [actor-check]
needs: [ actor-check ]
timeout-minutes: 90
if: needs.actor-check.outputs.was-bot != 'true'
steps:
Expand All @@ -41,15 +41,15 @@ jobs:
private-key: ${{ secrets.SUBMODULE_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: 'GeoBlazor'

# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.ref || github.ref }}

- name: Run Tests
shell: pwsh
env:
Expand All @@ -63,7 +63,7 @@ jobs:

build:
runs-on: ubuntu-latest
needs: [actor-check]
needs: [ actor-check ]
if: needs.actor-check.outputs.was-bot != 'true'
timeout-minutes: 30
steps:
Expand All @@ -75,8 +75,8 @@ jobs:
private-key: ${{ secrets.SUBMODULE_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: 'GeoBlazor'
# Checkout the repository to the GitHub Actions runner

# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@v4
with:
Expand All @@ -99,7 +99,7 @@ jobs:
- name: Build GeoBlazor
shell: pwsh
run: |
./GeoBlazorBuild.ps1 -xml -pkg -docs -c "Release"
dotnet ./build-tools/GeoBlazorBuild.dll -xml -pkg -docs -c "Release"

# Copies the nuget package to the artifacts directory
- name: Upload nuget artifact
Expand All @@ -108,7 +108,7 @@ jobs:
name: .core-nuget
retention-days: 4
path: ./dymaptic.GeoBlazor.Core.*.nupkg

# xmllint is a dependency of the copy steps below
- name: Install xmllint
shell: bash
Expand All @@ -129,8 +129,8 @@ jobs:
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}

# This step will commit the updated version number back to the develop branch
# This step will commit the updated version number back to the develop branch
- name: Add Changes to Git
if: github.event_name == 'pull_request'
run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/main-release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
workflow_dispatch:

jobs:
build:
runs-on: [self-hosted, Windows, X64]
build:
runs-on: [ self-hosted, Windows, X64 ]
timeout-minutes: 90
outputs:
token: ${{ steps.app-token.outputs.token }}
Expand All @@ -34,7 +34,7 @@ jobs:
token: ${{ steps.app-token.outputs.token }}
repository: ${{ github.repository }}
ref: ${{ github.ref }}

- name: Run Tests
shell: pwsh
env:
Expand All @@ -50,8 +50,8 @@ jobs:
- name: Build GeoBlazor
shell: pwsh
run: |
./GeoBlazorBuild.ps1 -xml -pkg -pub -c "Release"

dotnet ./build-tools/GeoBlazorBuild.dll -xml -pkg -pub -c "Release"
# xmllint is a dependency of the copy steps below
- name: Install xmllint
shell: bash
Expand All @@ -71,7 +71,7 @@ jobs:
with:
name: .core-nuget
path: ./dymaptic.GeoBlazor.Core.*.nupkg

# This step will copy the PR description to an environment variable
- name: Copy PR Release Notes
run: |
Expand Down
58 changes: 29 additions & 29 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,40 @@ on:
push:
branches: [ "test" ]
workflow_dispatch:

concurrency:
group: test
cancel-in-progress: true

jobs:
test:
runs-on: [self-hosted, Windows, X64]
runs-on: [ self-hosted, Windows, X64 ]
timeout-minutes: 90
steps:
- name: Generate Github App token
uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ secrets.SUBMODULE_APP_ID }}
private-key: ${{ secrets.SUBMODULE_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: 'GeoBlazor'

# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.ref || github.ref }}
- name: Run Tests
shell: pwsh
env:
USE_CONTAINER: true
ARCGIS_API_KEY: ${{ secrets.ARCGIS_TESTING_API_KEY }}
GEOBLAZOR_CORE_LICENSE_KEY: ${{ secrets.GEOBLAZOR_CORE_LICENSE_KEY }}
HTTP_PORT: 8082
HTTPS_PORT: 9445
run: |
dotnet test --project ./test/dymaptic.GeoBlazor.Core.Test.Automation/dymaptic.GeoBlazor.Core.Test.Automation.csproj -c Release --filter CORE_
- name: Generate Github App token
uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ secrets.SUBMODULE_APP_ID }}
private-key: ${{ secrets.SUBMODULE_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: 'GeoBlazor'
# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.ref || github.ref }}

- name: Run Tests
shell: pwsh
env:
USE_CONTAINER: true
ARCGIS_API_KEY: ${{ secrets.ARCGIS_TESTING_API_KEY }}
GEOBLAZOR_CORE_LICENSE_KEY: ${{ secrets.GEOBLAZOR_CORE_LICENSE_KEY }}
HTTP_PORT: 8082
HTTPS_PORT: 9445
run: |
dotnet test --project ./test/dymaptic.GeoBlazor.Core.Test.Automation/dymaptic.GeoBlazor.Core.Test.Automation.csproj -c Release --filter CORE_
14 changes: 7 additions & 7 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ GeoBlazor is a Blazor component library that brings ArcGIS Maps SDK for JavaScri
### Build
```bash
# Clean build of the Core project
pwsh GeoBlazorBuild.ps1
dotnet ./build-tools/GeoBlazorBuild.dll

# GeoBlazorBuild.ps1 includes lots of options, use -h to see options
-- _`GeoBlazorBuild` includes lots of options, use -h to see options_

# Build entire solution
dotnet build src/dymaptic.GeoBlazor.Core.sln
Expand All @@ -49,9 +49,9 @@ dotnet build src/dymaptic.GeoBlazor.Core.sln
dotnet build src/dymaptic.GeoBlazor.Core.sln -c Release
dotnet build src/dymaptic.GeoBlazor.Core.sln -c Debug

# Build TypeScript/JavaScript (from src/dymaptic.GeoBlazor.Core/)
pwsh esBuild.ps1 -c Debug
pwsh esBuild.ps1 -c Release
# Build TypeScript/JavaScript (from Core repo root)
dotnet ./build/ESBuild.cs -- -c Debug
dotnet ./build/ESBuild.cs -- -c Release
```

### Test
Expand All @@ -77,7 +77,7 @@ pwsh bumpVersion.ps1 -test 1.2.3 # Test version bump
### Development
```bash
# Clear ESBuild locks if build is stuck
pwsh esBuildClearLocks.ps1
dotnet ./build-tools/ESBuildClearLocks.dll

# Watch TypeScript changes (from src/dymaptic.GeoBlazor.Core/)
npm run watchBuild
Expand Down Expand Up @@ -106,7 +106,7 @@ npm install (from src/dymaptic.GeoBlazor.Core/)
Known issue: ESBuild compilation conflicts with MSBuild static file analysis may cause intermittent build errors when building projects with project references to Core. This is tracked with Microsoft.

### Development Workflow
1. Changes to TypeScript require running ESBuild (automatic via source generator or manual via `esBuild.ps1`). You should see a popup dialog when this is happening automatically from the source generator.
1. Changes to TypeScript require running ESBuild (automatic via source generator or manual via `ESBuild.cs`). You should see a popup dialog when this is happening automatically from the source generator.
2. Browser cache should be disabled when testing JavaScript changes
3. Generated code (`.gb.*` files) should never be edited directly. Instead, move code into the matching hand-editable file to "override" the generated code.
4. When adding new components, use the Code Generator in the parent CodeGen repository
Expand Down
4 changes: 3 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<!-- Import parent Directory.Build.props if it exists (e.g., when running as submodule of Pro) -->
<Import Project="../Directory.Build.props" Condition="Exists('$(MSBuildThisFileDirectory)../Directory.Build.props')" />
<PropertyGroup>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<CoreVersion>5.0.0.13</CoreVersion>
<CoreVersion>5.0.0.38</CoreVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Configurations>Debug;Release;SourceGen Highlighting</Configurations>
<Platforms>AnyCPU</Platforms>
Expand All @@ -22,5 +23,6 @@
<CompilerVisibleProperty Include="PipelineBuild" Value="$(PipelineBuild)" />
<CompilerVisibleProperty Include="LogSourceGenOutput" Value="$(LogSourceGenOutput)" />
<CompilerVisibleProperty Include="CoreProjectPath" Value="$(CoreProjectPath)" />
<CompilerVisibleProperty Include="DesignTimeBuild" Value="$(DesignTimeBuild)" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<Target Condition="$(PipelineBuild) != 'true'" Name="WaitForEsbuild" BeforeTargets="ResolveProjectStaticWebAssets;ResolveReferencedProjectsStaticWebAssets">
<Exec Command="pwsh $(MSBuildThisFileDirectory)esBuildWaitForCompletion.ps1 -c $(Configuration)"
<Exec Command="dotnet $(MSBuildThisFileDirectory)build-tools/ESBuildWaitForCompletion.dll -c $(Configuration)"
ContinueOnError="false" />
</Target>
</Project>
21 changes: 11 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ COPY ./*.ps1 ./
COPY ./Directory.Build.* ./
COPY ./.gitignore ./.gitignore
COPY ./nuget.config ./nuget.config
COPY ./build-tools ./build-tools
COPY ./build-scripts/ScriptBuilder.cs ./build-scripts/ScriptBuilder.cs

RUN pwsh -Command "./GeoBlazorBuild.ps1"
RUN dotnet ./build-tools/GeoBlazorBuild.dll -v current

COPY ./test/dymaptic.GeoBlazor.Core.Test.Blazor.Shared/dymaptic.GeoBlazor.Core.Test.Blazor.Shared.csproj ./test/dymaptic.GeoBlazor.Core.Test.Blazor.Shared.csproj
COPY ./test/dymaptic.GeoBlazor.Core.Test.WebApp/dymaptic.GeoBlazor.Core.Test.WebApp/dymaptic.GeoBlazor.Core.Test.WebApp.csproj ./test/dymaptic.GeoBlazor.Core.Test.WebApp/dymaptic.GeoBlazor.Core.Test.WebApp/dymaptic.GeoBlazor.Core.Test.WebApp.csproj
Expand All @@ -40,15 +42,14 @@ RUN dotnet restore ./test/dymaptic.GeoBlazor.Core.Test.WebApp/dymaptic.GeoBlazor
COPY ./test/dymaptic.GeoBlazor.Core.Test.Blazor.Shared ./test/dymaptic.GeoBlazor.Core.Test.Blazor.Shared
COPY ./test/dymaptic.GeoBlazor.Core.Test.WebApp ./test/dymaptic.GeoBlazor.Core.Test.WebApp

RUN pwsh -Command './buildAppSettings.ps1 \
-ArcGISApiKey $env:ARCGIS_API_KEY \
-LicenseKey $env:GEOBLAZOR_LICENSE_KEY \
-OutputPaths @( \
"./test/dymaptic.GeoBlazor.Core.Test.WebApp/dymaptic.GeoBlazor.Core.Test.WebApp.Client/wwwroot/appsettings.json", \
"./test/dymaptic.GeoBlazor.Core.Test.WebApp/dymaptic.GeoBlazor.Core.Test.WebApp.Client/wwwroot/appsettings.Production.json", \
"./test/dymaptic.GeoBlazor.Core.Test.WebApp/dymaptic.GeoBlazor.Core.Test.WebApp/appsettings.json", \
"./test/dymaptic.GeoBlazor.Core.Test.WebApp/dymaptic.GeoBlazor.Core.Test.WebApp/appsettings.Production.json") \
-WfsServers $env:WFS_SERVERS'
RUN dotnet ./build-tools/BuildAppSettings.dll \
-k "$ARCGIS_API_KEY" \
-l "$GEOBLAZOR_LICENSE_KEY" \
-o "./test/dymaptic.GeoBlazor.Core.Test.WebApp/dymaptic.GeoBlazor.Core.Test.WebApp.Client/wwwroot/appsettings.json" \
-o "./test/dymaptic.GeoBlazor.Core.Test.WebApp/dymaptic.GeoBlazor.Core.Test.WebApp.Client/wwwroot/appsettings.Production.json" \
-o "./test/dymaptic.GeoBlazor.Core.Test.WebApp/dymaptic.GeoBlazor.Core.Test.WebApp/appsettings.json" \
-o "./test/dymaptic.GeoBlazor.Core.Test.WebApp/dymaptic.GeoBlazor.Core.Test.WebApp/appsettings.Production.json" \
-w "$WFS_SERVERS"

# Build from source with debug symbols for code coverage
# UsePackageReference=false builds GeoBlazor from source instead of NuGet
Expand Down
Loading