Skip to content

Commit

Permalink
update: 暂时升级到.net7
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxuuu committed Sep 23, 2023
1 parent 43c4084 commit 2be8b37
Show file tree
Hide file tree
Showing 5 changed files with 630 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
sudo apt-get update
sudo apt-get install -y apt-transport-https
sudo apt-get update
sudo apt-get install -y dotnet-sdk-6.0
sudo apt-get install -y dotnet-sdk-7.0
sudo apt-get install -y p7zip-full
- name: build
env:
Expand All @@ -50,7 +50,7 @@ jobs:
cd ReceiverMeow
dotnet publish -r $DOTNETOS-$DOTNETARCH -p:PublishSingleFile=true --self-contained true
mkdir pkg
mv ReceiverMeow/bin/Debug/net6.0/$DOTNETOS-$DOTNETARCH/publish/* pkg/
mv ReceiverMeow/bin/Debug/net7.0/$DOTNETOS-$DOTNETARCH/publish/* pkg/
- uses: actions/upload-artifact@v2
with:
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,42 +20,42 @@ jobs:
sudo apt-get update
sudo apt-get install -y apt-transport-https
sudo apt-get update
sudo apt-get install -y dotnet-sdk-6.0
sudo apt-get install -y dotnet-sdk-7.0
sudo apt-get install -y p7zip-full
- name: build
run: |
cd ReceiverMeow
dotnet publish --configuration Release -r win-x86 -p:PublishSingleFile=true --self-contained true
mkdir win-x86
mv ReceiverMeow/bin/Release/net6.0/win-x86/publish/* win-x86/
mv ReceiverMeow/bin/Release/net7.0/win-x86/publish/* win-x86/
zip -r win-x86.zip win-x86
dotnet publish --configuration Release -r win-x64 -p:PublishSingleFile=true --self-contained true
mkdir win-x64
mv ReceiverMeow/bin/Release/net6.0/win-x64/publish/* win-x64/
mv ReceiverMeow/bin/Release/net7.0/win-x64/publish/* win-x64/
zip -r win-x64.zip win-x64
dotnet publish --configuration Release -r win-arm -p:PublishSingleFile=true --self-contained true
mkdir win-arm
mv ReceiverMeow/bin/Release/net6.0/win-arm/publish/* win-arm/
mv ReceiverMeow/bin/Release/net7.0/win-arm/publish/* win-arm/
zip -r win-arm.zip win-arm
dotnet publish --configuration Release -r linux-x64 -p:PublishSingleFile=true --self-contained true
mkdir linux-x64
mv ReceiverMeow/bin/Release/net6.0/linux-x64/publish/* linux-x64/
mv ReceiverMeow/bin/Release/net7.0/linux-x64/publish/* linux-x64/
zip -r linux-x64.zip linux-x64
dotnet publish --configuration Release -r linux-arm -p:PublishSingleFile=true --self-contained true
mkdir linux-arm
mv ReceiverMeow/bin/Release/net6.0/linux-arm/publish/* linux-arm/
mv ReceiverMeow/bin/Release/net7.0/linux-arm/publish/* linux-arm/
zip -r linux-arm.zip linux-arm
dotnet publish --configuration Release -r osx-x64 -p:PublishSingleFile=true --self-contained true
mkdir osx-x64
mv ReceiverMeow/bin/Release/net6.0/osx-x64/publish/* osx-x64/
mv ReceiverMeow/bin/Release/net7.0/osx-x64/publish/* osx-x64/
zip -r osx-x64.zip osx-x64
dotnet publish --configuration Release -r win-arm64 -p:PublishSingleFile=true --self-contained true
mkdir win-arm64
mv ReceiverMeow/bin/Release/net6.0/win-arm64/publish/* win-arm64/
mv ReceiverMeow/bin/Release/net7.0/win-arm64/publish/* win-arm64/
zip -r win-arm64.zip win-arm64
dotnet publish --configuration Release -r linux-arm64 -p:PublishSingleFile=true --self-contained true
mkdir linux-arm64
mv ReceiverMeow/bin/Release/net6.0/linux-arm64/publish/* linux-arm64/
mv ReceiverMeow/bin/Release/net7.0/linux-arm64/publish/* linux-arm64/
zip -r linux-arm64.zip linux-arm64
- name: Create Release
Expand Down
8 changes: 4 additions & 4 deletions ReceiverMeow/ReceiverMeow/LuaEnv/LuaStates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ namespace ReceiverMeow.LuaEnv
class LuaStates
{
//虚拟机池子
private static ConcurrentDictionary<string, LuaTask.LuaEnv> states =
new ConcurrentDictionary<string, LuaTask.LuaEnv>();
private static ConcurrentDictionary<string, LuaTask> states =
new ConcurrentDictionary<string, LuaTask>();
//池子操作锁
private static object stateLock = new object();

Expand All @@ -36,7 +36,7 @@ public static void Run(string name, string type, object data)
{
if (!states.ContainsKey(name))//没有的话就初始化池子
{
states[name] = new LuaTask.LuaEnv();
states[name] = new LuaTask();
states[name].ErrorEvent += (e, text) =>
{
Log.Warn(
Expand Down Expand Up @@ -80,7 +80,7 @@ public static void Clear()
foreach(string k in states.Keys)
{
Log.Info("Lua插件", "已释放虚拟机" + k);
LuaTask.LuaEnv l;
LuaTask l;
states.TryRemove(k, out l);//取出
l.Dispose();//释放
}
Expand Down
Loading

0 comments on commit 2be8b37

Please sign in to comment.