Skip to content

Commit

Permalink
Remove NUKE and move to basic dotnet CLI-based build system (akkado…
Browse files Browse the repository at this point in the history
…tnet#514)

* deleted all NUKE code from `.sln`

* moved to basic CLI build system

* fix the name of our project

* simplify

* remove multi-line build

* exclude TestKit as test project

* fixed dotnet pack
  • Loading branch information
Aaronontheweb authored Nov 6, 2024
1 parent fed3d52 commit 1a5ad32
Show file tree
Hide file tree
Showing 26 changed files with 240 additions and 1,596 deletions.
14 changes: 14 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2

updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
time: "11:00"

- package-ecosystem: nuget
directory: "/"
schedule:
interval: daily
time: "11:00"
15 changes: 0 additions & 15 deletions .github/dependabot.yml

This file was deleted.

51 changes: 0 additions & 51 deletions .github/workflows/Windows_release.yml

This file was deleted.

102 changes: 35 additions & 67 deletions .github/workflows/pr_validation.yml
Original file line number Diff line number Diff line change
@@ -1,83 +1,51 @@
# ------------------------------------------------------------------------------
# <auto-generated>
#
# This code was generated.
#
# - To turn off auto-generation set:
#
# [CustomGitHubActions (AutoGenerate = false)]
#
# - To trigger manual generation invoke:
#
# nuke --generate-configuration GitHubActions_pr_validation --host GitHubActions
#
# </auto-generated>
# ------------------------------------------------------------------------------

name: pr_validation

on:
push:
branches:
- master
- dev
- 'v1.*'
- main
pull_request:
branches:
- master
- dev
- 'v1.*'
- main

jobs:
windows-latest:
name: windows-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Make build.sh executable
run: chmod +x ./build.sh
- name: Make build.cmd executable
run: chmod +x ./build.cmd
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.*
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.*
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v3
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
- name: Run './build.cmd All'
run: ./build.cmd All
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ubuntu-latest:
name: ubuntu-latest
runs-on: ubuntu-latest
test:
name: Test-${{matrix.os}}
runs-on: ${{matrix.os}}

strategy:
matrix:
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v3
- name: Make build.sh executable
run: chmod +x ./build.sh
- name: Make build.cmd executable
run: chmod +x ./build.cmd
- uses: actions/setup-dotnet@v1
- name: "Checkout"
uses: actions/checkout@v4.1.1
with:
dotnet-version: 5.0.*
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.*
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v3
lfs: true
fetch-depth: 0

- name: "Install .NET SDK"
uses: actions/setup-dotnet@v4.0.0
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
- name: Run './build.cmd All'
run: ./build.cmd All
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
global-json-file: "./global.json"

- name: "Update release notes"
shell: pwsh
run: |
./build.ps1
- name: "dotnet build"
run: dotnet build -c Release

# .NET Framework tests can't run reliably on Linux, so we only do .NET 8

- name: "dotnet test"
shell: bash
run: dotnet test -c Release

- name: "dotnet pack"
run: dotnet pack -c Release -o ./bin/nuget
52 changes: 52 additions & 0 deletions .github/workflows/publish_nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Publish NuGet

on:
push:
tags:
- '*'

jobs:
publish-nuget:

name: publish-nuget
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: "Update release notes"
shell: pwsh
run: |
./build.ps1
- name: Create Packages
run: dotnet pack /p:PackageVersion=${{ github.ref_name }} -c Release -o ./output

- name: Push Packages
run: dotnet nuget push "output/*.nupkg" -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json

- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: 'Akka.Hosting ${{ github.ref_name }}'
tag_name: ${{ github.ref }}
body_path: RELEASE_NOTES.md
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Upload Release Asset
uses: AButler/upload-release-assets@v3.0
with:
repo-token: ${{ github.token }}
release-tag: ${{ github.ref_name }}
files: 'output/*.nupkg'
10 changes: 4 additions & 6 deletions Akka.Hosting.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Akka.Hosting.Tests", "src\A
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Akka.Hosting.Tests.Performance", "src\Akka.Hosting.Tests.Performance\Akka.Hosting.Tests.Performance.csproj", "{F7035FC5-8658-42AC-9317-749CC089C262}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{AD88EB36-E919-4948-855E-2223B5826AA7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2B9D74C1-4148-46EF-B3FE-7357839FAF40}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{2B9D74C1-4148-46EF-B3FE-7357839FAF40}"
ProjectSection(SolutionItems) = preProject
src\Directory.Build.props = src\Directory.Build.props
README.md = README.md
RELEASE_NOTES.md = RELEASE_NOTES.md
global.json = global.json
nuget.config = nuget.config
Directory.Build.props = Directory.Build.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Akka.Hosting.SimpleDemo", "src\Examples\Akka.Hosting.SimpleDemo\Akka.Hosting.SimpleDemo.csproj", "{5F6A7BE8-6906-46CE-BA1C-72EA11EFA33B}"
Expand Down Expand Up @@ -60,8 +60,6 @@ Global
{F7035FC5-8658-42AC-9317-749CC089C262}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F7035FC5-8658-42AC-9317-749CC089C262}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F7035FC5-8658-42AC-9317-749CC089C262}.Release|Any CPU.Build.0 = Release|Any CPU
{AD88EB36-E919-4948-855E-2223B5826AA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AD88EB36-E919-4948-855E-2223B5826AA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5F6A7BE8-6906-46CE-BA1C-72EA11EFA33B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5F6A7BE8-6906-46CE-BA1C-72EA11EFA33B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5F6A7BE8-6906-46CE-BA1C-72EA11EFA33B}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
45 changes: 45 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<Project>
<PropertyGroup>
<Copyright>Copyright © 2013-2024 Akka.NET Team</Copyright>
<Authors>Akka.NET Team</Authors>
<VersionPrefix>1.5.30.1</VersionPrefix>
<PackageReleaseNotes>* [Fix ActorRegistry.GetAsync() returning Nobody](https://github.com/akkadotnet/Akka.Hosting/pull/501)</PackageReleaseNotes>
<PackageIcon>akkalogo.png</PackageIcon>
<PackageProjectUrl>
https://github.com/akkadotnet/Akka.Hosting
</PackageProjectUrl>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<PropertyGroup>
<LangVersion>10.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<LibraryFramework>netstandard2.0</LibraryFramework>
<TestsNetCoreFramework>net8.0</TestsNetCoreFramework>
<XunitVersion>2.8.1</XunitVersion>
<TestSdkVersion>17.11.1</TestSdkVersion>
<CoverletVersion>6.0.2</CoverletVersion>
<XunitRunneVisualstudio>2.8.1</XunitRunneVisualstudio>
<AkkaVersion>1.5.30</AkkaVersion>
<MicrosoftExtensionsVersion>[6.0.0,)</MicrosoftExtensionsVersion>
</PropertyGroup>
<!-- SourceLink support for all Akka.NET projects -->
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)\docs\images\akkalogo.png" Pack="true" Visible="false" PackagePath="\" />
<None Include="$(MSBuildThisFileDirectory)\README.md" Pack="true" Visible="false" PackagePath="\" />
</ItemGroup>
<PropertyGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<!-- Optional: Embed source files that are not tracked by the source control manager in the PDB -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!-- Optional: Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
</Project>
Loading

0 comments on commit 1a5ad32

Please sign in to comment.