Skip to content

Commit

Permalink
try to fix GLIBCXX error due to net8.0
Browse files Browse the repository at this point in the history
Signed-off-by: catcherwong <catcher_hwq@outlook.com>
  • Loading branch information
catcherwong committed Apr 29, 2024
1 parent 0c5c10e commit c6507b2
Show file tree
Hide file tree
Showing 8 changed files with 94 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
with:
dotnet-version: |
8.0.x
7.0.x
6.0.x
- name: Show dotnet Version
Expand Down
44 changes: 42 additions & 2 deletions .github/workflows/release_stable_cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
env:
RID: ${{ matrix.targets }}
VERSION: ${{ github.ref_name }}
run: dotnet publish src/RDBCli/RDBCli.csproj -c Release -r $RID -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false -p:EnableCompressionInSingleFile=true --self-contained true --output /home/runner/work/clis/$RID
run: dotnet publish src/RDBCli/RDBCli.csproj -f net8.0 -c Release -r $RID -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false -p:EnableCompressionInSingleFile=true --self-contained true --output /home/runner/work/clis/$RID

- name: Package assets
env:
Expand All @@ -54,6 +54,46 @@ jobs:
name: rdb-cli
path: /home/runner/work/release/

publish_cli_os_low_dependency:
name: Build and upload cli artifact
runs-on: ubuntu-latest
strategy:
matrix:
targets:
[
"linux-x64",
"osx-x64",
"win-x64"
]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET SDK 7.0.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x

- name: Publish .NET app
env:
RID: ${{ matrix.targets }}
VERSION: ${{ github.ref_name }}
run: dotnet publish src/RDBCli/RDBCli.csproj -f net7.0 -c Release -r $RID -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false -p:EnableCompressionInSingleFile=true --self-contained true --output /home/runner/work/clis/$RID

- name: Package assets
env:
RID: ${{ matrix.targets }}
VERSION: ${{ github.ref_name }}
run: |
mkdir /home/runner/work/release
ls /home/runner/work/clis/
zip -j /home/runner/work/release/rdb-cli.$VERSION.$RID_70.zip /home/runner/work/clis/$RID/*
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: rdb-cli
path: /home/runner/work/release/

# publish_windows_x64_and_arm_aot:
# name: Build and upload windows x64 and arm64 aot cli artifact
# runs-on: windows-latest
Expand Down Expand Up @@ -97,7 +137,7 @@ jobs:
release_cli:
name: Publish release
# needs: ['publish_cli','publish_windows_x64_and_arm_aot']
needs: ['publish_cli']
needs: ['publish_cli', 'publish_cli_os_low_dependency']
runs-on: ubuntu-latest

steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release_stable_nuget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
with:
dotnet-version: |
8.0.x
7.0.x
6.0.x
- name: Build with dotnet
Expand All @@ -29,7 +30,7 @@ jobs:
- name: Pack with dotnet
run: |
dotnet pack src/RDBParser/RDBParser.csproj -o /home/runner/work/nugetpkgs -c Release --no-build
dotnet pack src/RDBCli/RDBCli.csproj -o /home/runner/work/nugetpkgs -c Release --no-build
dotnet pack src/RDBCli/RDBCli.csproj -f net8.0 -o /home/runner/work/nugetpkgs -c Release --no-build
- name: Upload artifact
uses: actions/upload-artifact@v3
Expand Down
44 changes: 43 additions & 1 deletion .github/workflows/release_unstable_cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
env:
RID: ${{ matrix.targets }}
VERSION: ${{ github.ref_name }}
run: dotnet publish src/RDBCli/RDBCli.csproj -c Release -r $RID -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false -p:EnableCompressionInSingleFile=true --self-contained true --output /home/runner/work/clis/$RID
run: dotnet publish src/RDBCli/RDBCli.csproj -f net8.0 -c Release -r $RID -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false -p:EnableCompressionInSingleFile=true --self-contained true --output /home/runner/work/clis/$RID

- name: Package assets
env:
Expand All @@ -53,6 +53,48 @@ jobs:
name: rdb-cli
path: /home/runner/work/release/


publish_cli_os_low_dependency:
name: Build and upload cli artifact
runs-on: ubuntu-latest
strategy:
matrix:
targets:
[
"linux-x64",
"osx-x64",
"win-x64"
]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET SDK 7.0.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x

- name: Publish .NET app
env:
RID: ${{ matrix.targets }}
VERSION: ${{ github.ref_name }}
run: dotnet publish src/RDBCli/RDBCli.csproj -f net7.0 -c Release -r $RID -p:PublishSingleFile=true -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false -p:EnableCompressionInSingleFile=true --self-contained true --output /home/runner/work/clis/$RID

- name: Package assets
env:
RID: ${{ matrix.targets }}
VERSION: ${{ github.ref_name }}
run: |
mkdir /home/runner/work/release
ls /home/runner/work/clis/
zip -j /home/runner/work/release/rdb-cli.$VERSION.$RID_70.zip /home/runner/work/clis/$RID/*
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: rdb-cli
path: /home/runner/work/release/


# publish_windows_x64_and_arm_aot:
# name: Build and upload windows x64 and arm64 aot cli artifact
# runs-on: windows-latest
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release_unstable_nuget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
with:
dotnet-version: |
8.0.x
7.0.x
6.0.x
- name: Build with dotnet
Expand All @@ -28,7 +29,7 @@ jobs:
run: |
ver=alpha`date +%Y%m%d%H%M%S`
dotnet pack src/RDBParser/RDBParser.csproj --version-suffix $ver -o /home/runner/work/nugetpkgs -c Release --no-build
dotnet pack src/RDBCli/RDBCli.csproj --version-suffix $ver -o /home/runner/work/nugetpkgs -c Release --no-build
dotnet pack src/RDBCli/RDBCli.csproj --version-suffix $ver -o /home/runner/work/nugetpkgs -f net8.0 -c Release --no-build
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions build/version.props
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project>
<PropertyGroup>

<RDBParserVersion>0.9.0</RDBParserVersion>
<RDBCliVersion>0.9.0</RDBCliVersion>
<RDBParserVersion>0.9.1</RDBParserVersion>
<RDBCliVersion>0.9.1</RDBCliVersion>

</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/RDBCli/RDBCli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
<Description>rdb-cli is a command line tool for redis rdb files.</Description>
<PackageTags>csharp,rdb,parser,redis,cli</PackageTags>
<VersionPrefix>$(RDBCliVersion)</VersionPrefix>
Expand Down
2 changes: 1 addition & 1 deletion src/RDBParser/RDBParser.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<Description>RDBParser is a library for parsing redis rdb files.</Description>
<PackageTags>csharp,rdb,parser,redis</PackageTags>
<VersionPrefix>$(RDBParserVersion)</VersionPrefix>
Expand Down

0 comments on commit c6507b2

Please sign in to comment.