From 7d422f1a825651578de7d6dc489a59f0e4afe42f Mon Sep 17 00:00:00 2001 From: Luigi Grilli Date: Sun, 3 Mar 2024 21:11:25 +0000 Subject: [PATCH] Added CI build --- .github/workflows/ci.yml | 37 ++++++++++++++++++++++++++++++ src/SourceGit.sln => SourceGit.sln | 17 ++++++-------- 2 files changed, 44 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/ci.yml rename src/SourceGit.sln => SourceGit.sln (50%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..60a69a26 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: Continuous Integration +on: + push: + branches: + - main + - 'feature/**' + pull_request: + branches: [main] +jobs: + build: + name: Build + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + platform: linux-x64 + - os: windows-latest + platform: win-x64 + - os: macos-latest + platform: osx-x64 + - os: macos-latest + platform: osx-arm64 + runs-on: ${{ matrix.os }} + steps: + - name: Checkout sources + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + - name: Build + run: dotnet build -c Release + - name: Publish + run: dotnet publish -c Release -r ${{ matrix.platform }} -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained diff --git a/src/SourceGit.sln b/SourceGit.sln similarity index 50% rename from src/SourceGit.sln rename to SourceGit.sln index 13ea93f0..166f3046 100644 --- a/src/SourceGit.sln +++ b/SourceGit.sln @@ -1,25 +1,22 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 -VisualStudioVersion = 17.8.34408.163 +VisualStudioVersion = 17.0.31903.59 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SourceGit", "SourceGit.csproj", "{89AD3F88-E72C-4399-AD61-6A87FC424E7B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SourceGit", "src\SourceGit.csproj", "{CD98D9AA-079A-4A79-9212-850EB97CF2ED}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {89AD3F88-E72C-4399-AD61-6A87FC424E7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {89AD3F88-E72C-4399-AD61-6A87FC424E7B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {89AD3F88-E72C-4399-AD61-6A87FC424E7B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {89AD3F88-E72C-4399-AD61-6A87FC424E7B}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {DA70C1D9-A8D2-4C89-98F3-B263CCBC5F28} + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CD98D9AA-079A-4A79-9212-850EB97CF2ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD98D9AA-079A-4A79-9212-850EB97CF2ED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD98D9AA-079A-4A79-9212-850EB97CF2ED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD98D9AA-079A-4A79-9212-850EB97CF2ED}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal