build.yml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. name: Build job
  2. on:
  3. push:
  4. # branches: [ master ]
  5. branches: [ ci/artifact-tuning ]
  6. paths-ignore:
  7. - '.github/*'
  8. - '.github/ISSUE_TEMPLATE/**'
  9. - '*.yml'
  10. - 'README.md'
  11. pull_request:
  12. branches: [ master ]
  13. paths-ignore:
  14. - '.github/*'
  15. - '.github/ISSUE_TEMPLATE/**'
  16. - '*.yml'
  17. - 'README.md'
  18. jobs:
  19. build:
  20. name: ${{ matrix.os }} (${{ matrix.configuration }})
  21. runs-on: ${{ matrix.os }}
  22. strategy:
  23. matrix:
  24. os: [ubuntu-latest, macOS-latest, windows-latest]
  25. configuration: [Debug, Release]
  26. include:
  27. - os: ubuntu-latest
  28. OS_NAME: Linux x64
  29. DOTNET_RUNTIME_IDENTIFIER: linux-x64
  30. RELEASE_ZIP_OS_NAME: linux_x64
  31. - os: macOS-latest
  32. OS_NAME: MacOS x64
  33. DOTNET_RUNTIME_IDENTIFIER: osx-x64
  34. RELEASE_ZIP_OS_NAME: osx_x64
  35. - os: windows-latest
  36. OS_NAME: Windows x64
  37. DOTNET_RUNTIME_IDENTIFIER: win-x64
  38. RELEASE_ZIP_OS_NAME: win_x64
  39. fail-fast: false
  40. env:
  41. POWERSHELL_TELEMETRY_OPTOUT: 1
  42. DOTNET_CLI_TELEMETRY_OPTOUT: 1
  43. steps:
  44. - uses: actions/checkout@v2
  45. - uses: actions/setup-dotnet@v1
  46. with:
  47. dotnet-version: 5.0.x
  48. - name: Get git short hash
  49. id: git_short_hash
  50. run: echo "::set-output name=result::$(git rev-parse --short HEAD)"
  51. - name: Clear
  52. run: dotnet clean && dotnet nuget locals all --clear
  53. - name: Build
  54. run: dotnet build -c "${{ matrix.configuration }}" /p:Version="1.0.0" /p:SourceRevisionId="${{ steps.git_short_hash.outputs.result }}" /p:ExtraDefineConstants=DISABLE_UPDATER
  55. - name: Test
  56. run: dotnet test -c "${{ matrix.configuration }}"
  57. - name: Publish
  58. run: dotnet publish -c "${{ matrix.configuration }}" -r "${{ matrix.DOTNET_RUNTIME_IDENTIFIER }}" -o ./publish /p:Version="1.0.0" /p:SourceRevisionId="${{ steps.git_short_hash.outputs.result }}" /p:ExtraDefineConstants=DISABLE_UPDATER Ryujinx
  59. #if: github.event_name == 'pull_request'
  60. - name: Upload artifacts
  61. uses: actions/upload-artifact@v2
  62. with:
  63. name: ryujinx-${{ matrix.configuration }}-1.0.0+${{ steps.git_short_hash.outputs.result }}-${{ matrix.RELEASE_ZIP_OS_NAME }}
  64. path: publish
  65. #if: github.event_name == 'pull_request'