Merge pull request #1 from StevanFreeborn/stevanfreeborn/chore/update-build-to-fetch-resource-files

chore: fix workflows and build now that model files are not in the repository
This commit is contained in:
Stevan Freeborn
2025-02-14 00:25:43 -06:00
committed by GitHub
3 changed files with 30 additions and 12 deletions
-3
View File
@@ -5,7 +5,6 @@ on:
paths-ignore:
- "**/README.md"
- "**/.gitignore"
- "**/.gitaltributes"
- "**/.editorconfig"
- "**/LICENSE.md"
- .github/**
@@ -19,7 +18,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
fetch-depth: 0
token: ${{ secrets.ACTIONS_PAT }}
- name: Setup .NET 9
@@ -59,7 +57,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
fetch-depth: 0
ref: ${{ github.ref }}
token: ${{ secrets.ACTIONS_PAT }}
+1 -5
View File
@@ -6,7 +6,6 @@ on:
- "**/README.md"
- "**/LICENSE.md"
- "**/.gitignore"
- "**/.gitattributes"
- "**/.editorconfig"
- .github/**
branches:
@@ -21,7 +20,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
fetch-depth: 0
token: ${{ secrets.ACTIONS_PAT }}
- name: Setup .NET
@@ -53,7 +51,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
fetch-depth: 0
token: ${{ secrets.ACTIONS_PAT }}
- name: Setup .NET 9
@@ -65,7 +62,7 @@ jobs:
- name: Restore dependencies
run: dotnet restore src
- name: Build on ${{ matrix.os }}
run: dotnet build src --no-restore
run: dotnet build --no-restore src
- name: Test on ${{ matrix.os }}
run: dotnet test src --no-build --verbosity normal
- name: Rename test coverage report
@@ -83,7 +80,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
fetch-depth: 0
token: ${{ secrets.ACTIONS_PAT }}
- name: Download ubuntu-latest report
+29 -4
View File
@@ -12,6 +12,35 @@
<OutputType>Exe</OutputType>
</PropertyGroup>
<PropertyGroup>
<DownloadDirectory>Resources/Files</DownloadDirectory>
</PropertyGroup>
<Target Name="DownloadModels" BeforeTargets="PrepareForBuild">
<Message Text="Downloading models..." Importance="high" />
<MakeDir Directories="$(DownloadDirectory)" Condition="!Exists('$(DownloadDirectory)')" />
<Exec
Condition="!Exists('$(DownloadDirectory)/rmbg.onnx')"
Command="curl -L &quot;https://share.stevanfreeborn.com/bgr/rmbg.onnx&quot; -o &quot;$(DownloadDirectory)/rmbg.onnx&quot;"
/>
<Exec
Condition="!Exists('$(DownloadDirectory)/u2net.onnx')"
Command="curl -L &quot;https://share.stevanfreeborn.com/bgr/u2net.onnx&quot; -o &quot;$(DownloadDirectory)/u2net.onnx&quot;"
/>
<Exec
Condition="!Exists('$(DownloadDirectory)/modnet.onnx')"
Command="curl -L &quot;https://share.stevanfreeborn.com/bgr/modnet.onnx&quot; -o &quot;$(DownloadDirectory)/modnet.onnx&quot;"
/>
<ItemGroup>
<EmbeddedResource Include="Resources\Files\**\*" />
</ItemGroup>
</Target>
<ItemGroup>
<InternalsVisibleTo Include="$(AssemblyName).Tests" />
<InternalsVisibleTo Include="DynamicProxyGenAssembly2" />
@@ -31,8 +60,4 @@
<PackageReference Include="Spectre.Console.Cli" Version="0.49.1" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Files\**\*" />
</ItemGroup>
</Project>