From 2592762430c8aefef6a65ac037d8b615e83402fb Mon Sep 17 00:00:00 2001 From: Andrii Kurdiumov Date: Tue, 25 Oct 2022 16:07:09 +0800 Subject: Add support for compilation using NativeAOT --- .github/workflows/dev.yml | 18 +++++++++--------- .github/workflows/release.yml | 18 +++++++++--------- Inveigh/Inveigh.csproj | 26 +++++--------------------- 3 files changed, 23 insertions(+), 39 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index ad0b8f2..61245b0 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -18,9 +18,9 @@ jobs: uses: actions/checkout@v2 - name: Setup .NET Core SDK - uses: actions/setup-dotnet@v2 + uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 7.0.x - name: Restore Dependencies run: dotnet restore @@ -34,20 +34,20 @@ jobs: run: | 7z a -tzip -mx9 Inveigh-net3.5-dev.zip $PWD/Inveigh/bin/debug/net35/* 7z a -tzip -mx9 Inveigh-net4.6.2-dev.zip $PWD/Inveigh/bin/debug/net462/* - 7z a -tzip -mx9 Inveigh-net6.0-dev.zip $PWD/Inveigh/bin/debug/net6.0/* -x!*/ + 7z a -tzip -mx9 Inveigh-net7.0-dev.zip $PWD/Inveigh/bin/debug/net7.0/* -x!*/ - name: Publish - Trimmed/Single File run: | VERSION=${{ github.ref_name }} - dotnet publish --self-contained=true -p:PublishSingleFile=true -p:PublishTrimmed=true -r linux-x64 -f net6.0 -p:AssemblyName=inveigh -c debug - dotnet publish --self-contained=true -p:PublishSingleFile=true -p:PublishTrimmed=true -r osx-x64 -f net6.0 -p:AssemblyName=inveigh -c debug - dotnet publish --self-contained=true -p:PublishSingleFile=true -p:PublishTrimmed=true -r win-x64 -f net6.0 -c debug + dotnet publish -r linux-x64 -f net7.0 -p:AssemblyName=inveigh -c debug + dotnet publish -r osx-x64 -f net7.0 -p:AssemblyName=inveigh -c debug + dotnet publish -r win-x64 -f net7.0 -c debug - name: Zip - Publish run: | - tar -czvf Inveigh-net6.0-linux-x64-trimmed-single-dev.tar.gz --directory=$PWD/Inveigh/bin/debug/net6.0/linux-x64/publish/ . - tar -czvf Inveigh-net6.0-osx-x64-trimmed-single-dev.tar.gz --directory=$PWD/Inveigh/bin/debug/net6.0/osx-x64/publish/ . - 7z a -tzip -mx9 Inveigh-net6.0-win-x64-trimmed-single-dev.zip $PWD/Inveigh/bin/debug/net6.0/win-x64/publish/* + tar -czvf Inveigh-net7.0-linux-x64-trimmed-single-dev.tar.gz --directory=$PWD/Inveigh/bin/debug/net7.0/linux-x64/publish/ . + tar -czvf Inveigh-net7.0-osx-x64-trimmed-single-dev.tar.gz --directory=$PWD/Inveigh/bin/debug/net7.0/osx-x64/publish/ . + 7z a -tzip -mx9 Inveigh-net7.0-win-x64-trimmed-single-dev.zip $PWD/Inveigh/bin/debug/net7.0/win-x64/publish/* - name: Release .zip if: "! startsWith(github.event_name, 'pull_request')" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f73107e..c69117f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,9 +17,9 @@ jobs: uses: actions/checkout@v2 - name: Setup .NET Core SDK - uses: actions/setup-dotnet@v2 + uses: actions/setup-dotnet@v3 with: - dotnet-version: 6.0.x + dotnet-version: 7.0.x - name: Restore Dependencies run: dotnet restore @@ -33,20 +33,20 @@ jobs: run: | 7z a -tzip -mx9 Inveigh-net3.5-${{ github.ref_name }}.zip $PWD/Inveigh/bin/release/net35/* 7z a -tzip -mx9 Inveigh-net4.6.2-${{ github.ref_name }}.zip $PWD/Inveigh/bin/release/net462/* - 7z a -tzip -mx9 Inveigh-net6.0-${{ github.ref_name }}.zip $PWD/Inveigh/bin/release/net6.0/* -x!*/ + 7z a -tzip -mx9 Inveigh-net7.0-${{ github.ref_name }}.zip $PWD/Inveigh/bin/release/net7.0/* -x!*/ - name: Publish - Trimmed/Single File run: | VERSION=${{ github.ref_name }} - dotnet publish --self-contained=true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:Version=${VERSION:1} -r linux-x64 -f net6.0 -p:AssemblyName=inveigh -c release - dotnet publish --self-contained=true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:Version=${VERSION:1} -r osx-x64 -f net6.0 -p:AssemblyName=inveigh -c release - dotnet publish --self-contained=true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:Version=${VERSION:1} -r win-x64 -f net6.0 -c release + dotnet publish -p:Version=${VERSION:1} -r linux-x64 -f net7.0 -p:AssemblyName=inveigh -c release + dotnet publish -p:Version=${VERSION:1} -r osx-x64 -f net7.0 -p:AssemblyName=inveigh -c release + dotnet publish -p:Version=${VERSION:1} -r win-x64 -f net7.0 -c release - name: Zip - Publish run: | - tar -czvf Inveigh-net6.0-linux-x64-trimmed-single-${{ github.ref_name }}.tar.gz --directory=$PWD/Inveigh/bin/release/net6.0/linux-x64/publish/ . - tar -czvf Inveigh-net6.0-osx-x64-trimmed-single-${{ github.ref_name }}.tar.gz --directory=$PWD/Inveigh/bin/release/net6.0/osx-x64/publish/ . - 7z a -tzip -mx9 Inveigh-net6.0-win-x64-trimmed-single-${{ github.ref_name }}.zip $PWD/Inveigh/bin/release/net6.0/win-x64/publish/* + tar -czvf Inveigh-net7.0-linux-x64-trimmed-single-${{ github.ref_name }}.tar.gz --directory=$PWD/Inveigh/bin/release/net7.0/linux-x64/publish/ . + tar -czvf Inveigh-net7.0-osx-x64-trimmed-single-${{ github.ref_name }}.tar.gz --directory=$PWD/Inveigh/bin/release/net7.0/osx-x64/publish/ . + 7z a -tzip -mx9 Inveigh-net7.0-win-x64-trimmed-single-${{ github.ref_name }}.zip $PWD/Inveigh/bin/release/net7.0/win-x64/publish/* - name: Release .zip uses: softprops/action-gh-release@v1 diff --git a/Inveigh/Inveigh.csproj b/Inveigh/Inveigh.csproj index 7efd2f5..a0a77e2 100644 --- a/Inveigh/Inveigh.csproj +++ b/Inveigh/Inveigh.csproj @@ -2,8 +2,9 @@ Exe - net35;net462;net6.0 + net35;net462;net7.0 AnyCPU + true @@ -23,11 +24,9 @@ 6.0.1 - - - - 6.0.1 - + + + @@ -40,20 +39,5 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - - ISNET6_0 - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - -- cgit v1.2.3