Update README.md #54
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Agent Builds | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
configuration: [Release] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# Install the .NET Core workload | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.406 | |
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | |
#- name: Setup MSBuild.exe | |
# uses: microsoft/[email protected] | |
# Execute all unit tests in the solution | |
#- name: Execute unit tests | |
# run: dotnet test | |
- name: Build Agent Linux | |
if: matrix.os == 'ubuntu-latest' | |
run: dotnet publish Payload_Type/athena/athena/agent_code/Agent.sln -c Release -r linux-x64 /p:LinuxTest=True | |
- name: Build Agent MacOS | |
if: matrix.os == 'macos-latest' | |
run: dotnet publish Payload_Type/athena/athena/agent_code/Agent.sln -c Release -r osx-x64 /p:MacTest=True | |
- name: Build Agent Windows | |
if: matrix.os == 'windows-latest' | |
run: dotnet publish Payload_Type\athena\athena\agent_code\Agent.sln -c Release -r win-x64 /p:WindowsTest=True | |
- name: Test Agent Linux | |
if: matrix.os == 'ubuntu-latest' | |
run: dotnet test Payload_Type/athena/athena/agent_code/Tests/Agent.Tests/ -c Debug /p:LinuxTest=True /p:SolutionDir="" | |
- name: Test Agent MacOS | |
if: matrix.os == 'macos-latest' | |
run: dotnet test Payload_Type/athena/athena/agent_code/Tests/Agent.Tests/ -c Debug /p:MacTest=True /p:SolutionDir="" | |
- name: Test Agent Windows | |
if: matrix.os == 'windows-latest' | |
run: dotnet test Payload_Type\athena\athena\agent_code\Tests\Agent.Tests\ -c Debug /p:WindowsTest=True /p:SolutionDir="" | |
# Restore the application to populate the obj folder with RuntimeIdentifiers | |
#- name: Restore the application | |
# run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration | |
# env: | |
# Configuration: ${{ matrix.configuration }} |