@@ -73,51 +73,11 @@ jobs:
7373 - name : Install Python virtualenv
7474 run : pip install virtualenv
7575
76- - name : Install Doxygen and Graphviz on macOS
77- if : matrix.os == 'macos-latest'
78- run : brew install --formula doxygen && brew install --formula graphviz && echo "Doxygen version $(doxygen --version)"
76+ - name : Install Graphviz
77+ uses : ts-graphviz/setup-graphviz@v2
7978
80- - name : Install Doxygen and Graphviz on Ubuntu
81- if : matrix.os == 'ubuntu-latest'
82- run : sudo apt-get install -y doxygen graphviz && echo "Doxygen version $(doxygen --version)"
83-
84- - name : Install Doxygen and Graphviz on Windows
85- if : matrix.os == 'windows-latest'
86- # run: choco install doxygen.install
87- # run: choco install graphviz
88- # Note these suffer frequent failures due to Chocolatey attempts
89- # to blackmail you into purchasing a license. Hence we retry a
90- # few times. If this still fails, re-run the build.
91- run : |
92- function Install-WithChoco {
93- param ( $Package )
94- $retryCount = 4
95- $success = $false
96- for ($i = 1; $i -le $retryCount; $i++) {
97- Write-Host "Attempt no $i for $Package"
98- # Without | Out-Host the choco output becomes output of this
99- # function because it is called from within `if`.
100- choco install $Package --no-progress --yes | Out-Host
101- if ($LASTEXITCODE -eq 0) {
102- $success = $true
103- Write-Host "$Package installation successful."
104- break
105- } else {
106- Write-Host "$Package installation failed. Retrying..."
107- Start-Sleep -Seconds (2*$i)
108- }
109- }
110- if (-not $success) {
111- Write-Host "$Package installation failed after $retryCount attempts."
112- }
113- return $success
114- }
115- if (-not ((Install-WithChoco doxygen.install) -and (Install-WithChoco graphviz))) {
116- exit 1
117- }
118- Import-Module "$env:ChocolateyInstall/helpers/chocolateyInstaller.psm1"
119- refreshenv
120- echo "Doxygen version $(doxygen --version)"
79+ - name : Install Doxygen
80+ uses : ssciwr/doxygen-install@v1
12181
12282 - name : Smudge dates (macOS and Ubuntu)
12383 if : matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'
0 commit comments