name: ASF-ci

on: [push, pull_request]

env:
  DOTNET_CLI_TELEMETRY_OPTOUT: true
  DOTNET_NOLOGO: true
  DOTNET_SDK_VERSION: 10.0

permissions: {}

jobs:
  main:
    strategy:
      fail-fast: false
      matrix:
        configuration: [Debug, Release]
        os: [macos-latest, macos-15-intel, ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm]

    runs-on: ${{ matrix.os }}

    steps:
    - name: Checkout code
      uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      with:
        show-progress: false
        submodules: recursive

    - name: Setup .NET Core
      uses: actions/setup-dotnet@baa11fbfe1d6520db94683bd5c7a3818018e4309 # v5.1.0
      with:
        dotnet-version: ${{ env.DOTNET_SDK_VERSION }}

    - name: Verify .NET Core
      run: dotnet --info

    - name: Build ${{ matrix.configuration }} ArchiSteamFarm and other projects
      run: dotnet build -c "${{ matrix.configuration }}" -p:ContinuousIntegrationBuild=true -p:UseAppHost=false --nologo

    - name: Run ${{ matrix.configuration }} ArchiSteamFarm.Tests
      run: dotnet test ArchiSteamFarm.Tests -c "${{ matrix.configuration }}" -p:ContinuousIntegrationBuild=true -p:UseAppHost=false --filter TestCategory!=Manual --nologo
