update gitea workflow;
This commit is contained in:
@@ -26,20 +26,23 @@ jobs:
|
|||||||
|
|
||||||
- name: Pack all projects
|
- name: Pack all projects
|
||||||
run: |
|
run: |
|
||||||
for projfile in $(find . -name "*.csproj"); do
|
set -e
|
||||||
packable=$(dotnet msbuild "$projfile" -t:GetProperty -p:PropertyName=IsPackable -nologo -v:q)
|
for projfile in $(find . -name "*.csproj"); do
|
||||||
if [ "$packable" = "true" ]; then
|
if grep -q "<IsPackable>true</IsPackable>" "$projfile"; then
|
||||||
dotnet pack "$projfile" -c Release
|
echo "Packing $projfile..."
|
||||||
fi
|
if ! dotnet pack "$projfile" -c Release -o ./artifacts; then
|
||||||
done
|
echo "⚠️ Failed to pack $projfile"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
- name: Publish all packages
|
- name: Publish all packages
|
||||||
env:
|
env:
|
||||||
NUGET_API_KEY: ${{ secrets.GITEA_TOKEN }}
|
NUGET_API_KEY: ${{ secrets.NUGET_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
for projfile in $(find . -name "*.csproj"); do
|
for projfile in $(find . -name "*.csproj"); do
|
||||||
packable=$(dotnet msbuild "$projfile" -t:GetProperty -p:PropertyName=IsPackable -nologo -v:q)
|
packable=$(dotnet msbuild "$projfile" -t:GetProperty -p:PropertyName=IsPackable -nologo -v:q)
|
||||||
if [ "$packable" = "true" ]; then
|
if [ "$packable" = "True" ]; then
|
||||||
projname=$(basename "$projfile" .csproj)
|
projname=$(basename "$projfile" .csproj)
|
||||||
VERSION=$(dotnet msbuild "$projfile" -nologo -v:q -t:GetProperty -p:PropertyName=PackageVersion)
|
VERSION=$(dotnet msbuild "$projfile" -nologo -v:q -t:GetProperty -p:PropertyName=PackageVersion)
|
||||||
pkg=$(find "$projname/bin/Release" -maxdepth 1 -type f \
|
pkg=$(find "$projname/bin/Release" -maxdepth 1 -type f \
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Misaki.HighPerformance.Image.Runtime;
|
using Misaki.HighPerformance.Image.Runtime;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
@@ -45,8 +45,7 @@ public unsafe class ImageResult : IDisposable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static unsafe ImageResult FromResult(byte* result, uint width, uint height, ColorComponents comp,
|
internal static unsafe ImageResult FromResult(byte* result, uint width, uint height, ColorComponents comp, ColorComponents req_comp)
|
||||||
ColorComponents req_comp)
|
|
||||||
{
|
{
|
||||||
if (result == null)
|
if (result == null)
|
||||||
throw new InvalidOperationException(StbImage.stbi__g_failure_reason);
|
throw new InvalidOperationException(StbImage.stbi__g_failure_reason);
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Misaki.HighPerformance.Image.Runtime;
|
namespace Misaki.HighPerformance.Image.Runtime;
|
||||||
|
|
||||||
internal static unsafe class CRuntime
|
internal static unsafe class CRuntime
|
||||||
{
|
{
|
||||||
private static readonly string numbers = "0123456789";
|
private static readonly string s_numbers = "0123456789";
|
||||||
|
|
||||||
public static void* malloc(ulong size)
|
public static void* malloc(ulong size)
|
||||||
{
|
{
|
||||||
@@ -158,7 +158,7 @@ internal static unsafe class CRuntime
|
|||||||
// First step - determine length
|
// First step - determine length
|
||||||
var length = 0;
|
var length = 0;
|
||||||
var ptr = start;
|
var ptr = start;
|
||||||
while (numbers.IndexOf((char)*ptr) != -1)
|
while (s_numbers.IndexOf((char)*ptr) != -1)
|
||||||
{
|
{
|
||||||
++ptr;
|
++ptr;
|
||||||
++length;
|
++length;
|
||||||
@@ -170,7 +170,7 @@ internal static unsafe class CRuntime
|
|||||||
ptr = start;
|
ptr = start;
|
||||||
while (length > 0)
|
while (length > 0)
|
||||||
{
|
{
|
||||||
long num = numbers.IndexOf((char)*ptr);
|
long num = s_numbers.IndexOf((char)*ptr);
|
||||||
var pow = (long)Math.Pow(10, length - 1);
|
var pow = (long)Math.Pow(10, length - 1);
|
||||||
result += num * pow;
|
result += num * pow;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user