From 674ebfde08a98b1b83cb14c55be3a1d085d91a5c Mon Sep 17 00:00:00 2001 From: Serg2DFX Date: Tue, 12 Aug 2025 02:59:40 +0300 Subject: [PATCH 1/5] install graphviz --- .github/workflows/dotnet.yml | 4 ++- .github/workflows/install_graphviz.yaml | 30 ++++++++++++++++++++++ ExtensibleParaser/ExtensibleParaser.csproj | 3 --- Regex/Regex/Dot.cs | 2 +- Tests/RegexTests/RegexTests.cs | 2 +- 5 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/install_graphviz.yaml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 3e2e893..a1c109b 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -25,6 +25,8 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ matrix.dotnet-version }} + - name: Install GraphViz ${{ matrix.dotnet-version }} + uses: ./install_graphviz.yaml - name: Restore dependencies run: dotnet restore - name: Test @@ -34,4 +36,4 @@ jobs: with: name: dotnet-results-${{ matrix.dotnet-version }}-${{ matrix.os }} path: TestResults-${{ matrix.dotnet-version }}-${{ matrix.os }} - if: ${{ always() }} \ No newline at end of file + if: ${{ always() }} diff --git a/.github/workflows/install_graphviz.yaml b/.github/workflows/install_graphviz.yaml new file mode 100644 index 0000000..57fc522 --- /dev/null +++ b/.github/workflows/install_graphviz.yaml @@ -0,0 +1,30 @@ +name: InstallGraphviz + +runs: + using: "composite" + steps: + - name: Install Graphviz on Windows + if: runner.os == 'Windows' + run: | + choco install graphviz -y + echo "C:\Program Files\Graphviz\bin" | Out-File -FilePath $env:GITHUB_PATH -Append + shell: bash + + - name: Install Graphviz on Linux + if: runner.os == 'Linux' + run: | + sudo apt-get install graphviz + echo "$HOME/.local/bin" >> $GITHUB_PATH + shell: bash + + - name: Install Graphviz on macOS + if: runner.os == 'macOS' + run: | + brew install graphviz + echo "$HOME/.local/bin" >> $GITHUB_PATH + shell: bash + + - name: SelfTest run dot + run: | + dot -V + shell: bash diff --git a/ExtensibleParaser/ExtensibleParaser.csproj b/ExtensibleParaser/ExtensibleParaser.csproj index 098146f..f0c1f16 100644 --- a/ExtensibleParaser/ExtensibleParaser.csproj +++ b/ExtensibleParaser/ExtensibleParaser.csproj @@ -22,7 +22,4 @@ - - - diff --git a/Regex/Regex/Dot.cs b/Regex/Regex/Dot.cs index 0ab7a8d..3cc21af 100644 --- a/Regex/Regex/Dot.cs +++ b/Regex/Regex/Dot.cs @@ -19,7 +19,7 @@ public static void GenerateSvg(string dotFilePath, string outputSvgPath) { var processStartInfo = new ProcessStartInfo { - FileName = "dot.exe", + FileName = "dot", Arguments = $"-Tsvg \"{dotFilePath}\" -o \"{outputSvgPath}\"", RedirectStandardOutput = true, RedirectStandardError = true, diff --git a/Tests/RegexTests/RegexTests.cs b/Tests/RegexTests/RegexTests.cs index d507d9f..ef943cc 100644 --- a/Tests/RegexTests/RegexTests.cs +++ b/Tests/RegexTests/RegexTests.cs @@ -14,7 +14,7 @@ public void Setup() Trace.AutoFlush = true; } - [TestMethod, Ignore] + [TestMethod] public void DfaConstruction_3() { var pattern = @"(//[^\n]*(\n|$)|\s)*"; From 6383719b3e0be5e6ee4e424bd99f7f2a986c668d Mon Sep 17 00:00:00 2001 From: Serg2DFX Date: Tue, 12 Aug 2025 03:13:25 +0300 Subject: [PATCH 2/5] fix path --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index a1c109b..f0ee523 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -26,7 +26,7 @@ jobs: with: dotnet-version: ${{ matrix.dotnet-version }} - name: Install GraphViz ${{ matrix.dotnet-version }} - uses: ./install_graphviz.yaml + uses: ./.github/workflows/install_graphviz.yaml - name: Restore dependencies run: dotnet restore - name: Test From 4320da08a483a8570e8587af991dccad73ec3feb Mon Sep 17 00:00:00 2001 From: Serg2DFX Date: Tue, 12 Aug 2025 03:22:15 +0300 Subject: [PATCH 3/5] call actions --- .../install-graphviz/action.yaml} | 0 .github/workflows/dotnet.yml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/{workflows/install_graphviz.yaml => actions/install-graphviz/action.yaml} (100%) diff --git a/.github/workflows/install_graphviz.yaml b/.github/actions/install-graphviz/action.yaml similarity index 100% rename from .github/workflows/install_graphviz.yaml rename to .github/actions/install-graphviz/action.yaml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index f0ee523..5f524f9 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -26,7 +26,7 @@ jobs: with: dotnet-version: ${{ matrix.dotnet-version }} - name: Install GraphViz ${{ matrix.dotnet-version }} - uses: ./.github/workflows/install_graphviz.yaml + uses: ./.github/actions/install-graphviz - name: Restore dependencies run: dotnet restore - name: Test From 13f5f7139f5fd2a8374d18e6fbdffbd711e60309 Mon Sep 17 00:00:00 2001 From: Serg2DFX Date: Tue, 12 Aug 2025 03:30:10 +0300 Subject: [PATCH 4/5] fix Out-File: command not found --- .github/actions/install-graphviz/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/install-graphviz/action.yaml b/.github/actions/install-graphviz/action.yaml index 57fc522..1f5371f 100644 --- a/.github/actions/install-graphviz/action.yaml +++ b/.github/actions/install-graphviz/action.yaml @@ -7,7 +7,7 @@ runs: if: runner.os == 'Windows' run: | choco install graphviz -y - echo "C:\Program Files\Graphviz\bin" | Out-File -FilePath $env:GITHUB_PATH -Append + echo "C:\\Program Files\\Graphviz\\bin" >> "$GITHUB_PATH" shell: bash - name: Install Graphviz on Linux From 1b91755a6d311da39abf2b6e9edc8bc4aa291251 Mon Sep 17 00:00:00 2001 From: Serg2DFX Date: Tue, 12 Aug 2025 03:38:45 +0300 Subject: [PATCH 5/5] del unused Folder declaration in csproj files --- Parsers/Dot/DotParser/DotParser.csproj | 5 ----- Regex/Regex/Regex.csproj | 4 ---- Tests/ParaserTests/ParaserTests.csproj | 4 ---- Tests/RegexTests/RegexTests.csproj | 4 ---- 4 files changed, 17 deletions(-) diff --git a/Parsers/Dot/DotParser/DotParser.csproj b/Parsers/Dot/DotParser/DotParser.csproj index 385e11e..57a3383 100644 --- a/Parsers/Dot/DotParser/DotParser.csproj +++ b/Parsers/Dot/DotParser/DotParser.csproj @@ -18,9 +18,4 @@ - - - - - diff --git a/Regex/Regex/Regex.csproj b/Regex/Regex/Regex.csproj index 2be4451..83430c4 100644 --- a/Regex/Regex/Regex.csproj +++ b/Regex/Regex/Regex.csproj @@ -19,8 +19,4 @@ --> - - - - diff --git a/Tests/ParaserTests/ParaserTests.csproj b/Tests/ParaserTests/ParaserTests.csproj index 4b2d56b..a970dc8 100644 --- a/Tests/ParaserTests/ParaserTests.csproj +++ b/Tests/ParaserTests/ParaserTests.csproj @@ -32,8 +32,4 @@ - - - - diff --git a/Tests/RegexTests/RegexTests.csproj b/Tests/RegexTests/RegexTests.csproj index c076953..4ee3950 100644 --- a/Tests/RegexTests/RegexTests.csproj +++ b/Tests/RegexTests/RegexTests.csproj @@ -19,8 +19,4 @@ - - - -