Исправление зависимостей проектов (#3174)

* Add workflow to build each project separately

* Make `Compiler` depend on `PascalLanguage` and `PascalABCSaushkinParser`  06e595

* Make IDE's depend on `PABCNETC`

It's launched as a separate process from IDE
This commit is contained in:
Sun Serega 2024-07-02 16:10:21 +03:00 committed by GitHub
parent aa43bfb128
commit 04e2a40dc6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 81 additions and 0 deletions

View file

@ -0,0 +1,56 @@
name: Build all C# projects separately
on:
push:
pull_request:
workflow_dispatch:
release:
types:
- created
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
prepare_matrix:
runs-on: windows-2019
outputs:
projects: ${{ steps.set_outputs.outputs.projects }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get all.csproj files
id: set_outputs
run: |
$projects = Get-ChildItem -Recurse '*.csproj' | ForEach-Object { $_.FullName }
$json = $projects | ConvertTo-Json -Compress
Write-Host $json
echo "::set-output name=projects::$json"
build-and-test:
runs-on: windows-2019
needs: prepare_matrix
strategy:
fail-fast: false
matrix:
project: ${{ fromJson(needs.prepare_matrix.outputs.projects) }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run tests for each project
run: |
$project = "${{ matrix.project }}"
.\Studio.bat $project
$pname = [IO.Path]::GetFileNameWithoutExtension($project)
if ($pname -eq 'PABCNETCclear') {
'##' | Set-Content 'a.pas'
&".\bin\$pname.exe" .\a.pas
}

View file

@ -161,6 +161,16 @@
<Project>{1C9C945A-586D-42A2-A06B-65D84FA7FF78}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
</ProjectReference>
<ProjectReference Include="..\Languages\Pascal\PascalLanguage\PascalLanguage.csproj">
<Name>PascalLanguage</Name>
<Project>{BD902586-E0D5-407A-904A-32249B8B709E}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\Languages\Pascal\PascalABCParserNewSaushkin\PascalABCSaushkinParser.csproj">
<Name>PascalABCSaushkinParser</Name>
<Project>{1443F539-DCC7-4491-B4FD-B716C739DB3C}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="Compiler.cs" />

View file

@ -856,6 +856,11 @@
<Project>{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}</Project>
<Name>ICSharpCode.Core.WinForms</Name>
</ProjectReference>
<ProjectReference Include="..\pabcnetc\PABCNETC.csproj">
<Name>PABCNETC</Name>
<Project>{2aef58a1-2bcf-4c4b-ab03-f44bbb2628e6}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">

View file

@ -850,6 +850,11 @@
<Project>{857CA1A3-FC88-4BE0-AB6A-D1EE772AB288}</Project>
<Name>ICSharpCode.Core.WinForms</Name>
</ProjectReference>
<ProjectReference Include="..\pabcnetc\PABCNETC.csproj">
<Name>PABCNETC</Name>
<Project>{2aef58a1-2bcf-4c4b-ab03-f44bbb2628e6}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">

View file

@ -958,6 +958,11 @@
<Project>{a9ab4282-83b4-41a7-86c3-e5bf6a45e7e2}</Project>
<Name>SyntaxVisitors</Name>
</ProjectReference>
<ProjectReference Include="..\pabcnetc\PABCNETC.csproj">
<Name>PABCNETC</Name>
<Project>{2aef58a1-2bcf-4c4b-ab03-f44bbb2628e6}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">