Skip to content

Commit

Permalink
Merge pull request #4 from theyo/feature/github-action
Browse files Browse the repository at this point in the history
Creates build.yml
  • Loading branch information
theyo authored May 15, 2023
2 parents 1e652fc + 936d180 commit bfb9782
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 30 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: .NET

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build Worker
run: dotnet build AuraScheduler.Worker/AuraScheduler.Worker.csproj --configuration Release --no-restore
- name: Build UI
run: dotnet build AuraScheduler.UI/AuraScheduler.UI.csproj --configuration Release --no-restore
- name: Build Test Project
run: dotnet build AuraScheduler.Worker.Tests/AuraScheduler.Worker.Tests.csproj --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release
- name: Build Setup project
run: dotnet build Setup/Setup.wixproj --configuration Release --no-restore
43 changes: 22 additions & 21 deletions AuraScheduler.Worker.Tests/AuraScheduler.Worker.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<PlatformTarget>x64</PlatformTarget>
<Platforms>x64</Platforms>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.0.2" />
<PackageReference Include="MSTest.TestFramework" Version="3.0.2" />
<PackageReference Include="coverlet.collector" Version="3.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AuraScheduler.Worker\AuraScheduler.Worker.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AuraScheduler.Worker\AuraScheduler.Worker.csproj" />
</ItemGroup>

</Project>
10 changes: 10 additions & 0 deletions AuraScheduler.sln
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ Project("{B7DD6F7E-DEF8-4E67-B5B7-07EF123DB6F0}") = "Setup", "Setup\Setup.wixpro
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuraScheduler.UI", "AuraScheduler.UI\AuraScheduler.UI.csproj", "{9C45A10E-7618-46E2-A273-992B2315CA99}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "github", "github", "{DF13FA0D-6301-41B9-8C1D-922047FB097E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{D4A0CA6D-294D-4D6E-82A4-CACB2268B76E}"
ProjectSection(SolutionItems) = preProject
.github\workflows\build.yml = .github\workflows\build.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Expand All @@ -45,6 +52,9 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{D4A0CA6D-294D-4D6E-82A4-CACB2268B76E} = {DF13FA0D-6301-41B9-8C1D-922047FB097E}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {EDC4F8D3-6A38-411E-A07D-066ED73EAC29}
EndGlobalSection
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

# aura-scheduler
Uses the Asus AURA SDK to turn LEDs on/off on a schedule

[![.NET](https://github.com/theyo/aura-scheduler/actions/workflows/build.yml/badge.svg)](https://github.com/theyo/aura-scheduler/actions/workflows/build.yml)


# Requirements
The Asus AURA SDK `Interop.AuraServiceLib.dll` needs to be present on the system. Normally this dll is installed with ASUS AURA (through ARMOURY CRATE).

Expand Down
2 changes: 1 addition & 1 deletion Setup/AURASchedulerUIComponents.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment>
<ComponentGroup Id="AURASchedulerUIComponents" Directory="INSTALLFOLDER">
<Component Guid="928446c2-9c57-4dd6-9b7e-da491d6f044c">
<Component Guid="928446c2-9c57-4dd6-9b7e-da491d6f044c" Bitness="always64">
<File Id="AURASchedulerUIApp" Source="AuraScheduler.UI.exe" />
<File Id="AURASchedulerWorker" Source="AuraScheduler.Worker.exe" />
<File Source="AuraScheduler.Worker.runtimeconfig.json" />
Expand Down
17 changes: 9 additions & 8 deletions Setup/Setup.wixproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<Project Sdk="WixToolset.Sdk/4.0.0">
<PropertyGroup>
<DefineConstants>Version=$(BuildVersion)</DefineConstants>
<OutputName>AURAScheduler.$(MSBuildProjectName)</OutputName>
<Platforms>x86;x64</Platforms>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\AuraScheduler.UI\AuraScheduler.UI.csproj" publish="true" />
</ItemGroup>
<PropertyGroup>
<DefineConstants>Version=$(BuildVersion)</DefineConstants>
<OutputName>AURAScheduler.$(MSBuildProjectName)</OutputName>
<Platforms>x64</Platforms>
<Platform Condition="'$(Platform)' == '' ">x64</Platform>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\AuraScheduler.UI\AuraScheduler.UI.csproj" publish="true" />
</ItemGroup>
</Project>

0 comments on commit bfb9782

Please sign in to comment.