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:
@@ -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 }}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 "https://share.stevanfreeborn.com/bgr/rmbg.onnx" -o "$(DownloadDirectory)/rmbg.onnx""
|
||||
/>
|
||||
|
||||
<Exec
|
||||
Condition="!Exists('$(DownloadDirectory)/u2net.onnx')"
|
||||
Command="curl -L "https://share.stevanfreeborn.com/bgr/u2net.onnx" -o "$(DownloadDirectory)/u2net.onnx""
|
||||
/>
|
||||
|
||||
<Exec
|
||||
Condition="!Exists('$(DownloadDirectory)/modnet.onnx')"
|
||||
Command="curl -L "https://share.stevanfreeborn.com/bgr/modnet.onnx" -o "$(DownloadDirectory)/modnet.onnx""
|
||||
/>
|
||||
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user