Skip to content

Commit e1f14c4

Browse files
committed
use if: with string comparisons to reduce CI noise
1 parent 6b859db commit e1f14c4

File tree

15 files changed

+166
-193
lines changed

15 files changed

+166
-193
lines changed

github-actions/install-dep-fftw3/action.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,23 @@ runs:
44
steps:
55
- name: Install FFTW3 (via apt-get)
66
shell: bash
7-
run: |
8-
if ${{ toJSON( runner.os == 'Linux' ) }}; then
9-
echo "::group::Install FFTW3 (via apt-get)"
10-
sudo apt-get -y update && sudo apt-get install --no-install-recommends -y libfftw3-dev
11-
echo "::endgroup::"
12-
fi
7+
if: runner.os == 'Linux'
8+
echo "::group::Install FFTW3 (via apt-get)"
9+
sudo apt-get -y update && sudo apt-get install --no-install-recommends -y libfftw3-dev
10+
echo "::endgroup::"
1311
- name: Install FFTW3 (via brew)
1412
shell: bash
13+
if: runner.os == 'macOS'
1514
run: |
16-
if ${{ toJSON( runner.os == 'macOS' ) }}; then
17-
echo "::group::Install FFTW3 (via brew)"
18-
brew install fftw
19-
echo "::endgroup::"
20-
fi
15+
echo "::group::Install FFTW3 (via brew)"
16+
brew install fftw
17+
echo "::endgroup::"
2118
- name: Install FFTW3 (via Alien::FFTW3)
2219
shell: bash
20+
if: runner.os == 'Windows'
2321
run: |
24-
if ${{ toJSON( runner.os == 'Windows' ) }}; then
25-
echo "::group::Install FFTW3 (via Alien::FFTW3 TODO)"
26-
# TODO Alien::FFTW3 does not have build support for MSWin32 yet
27-
#$MYPERL -S cpanm -n Module::Build || ( cat ~/.cpanm/build.log && false )
28-
#$MYPERL -S cpanm -n Alien::FFTW3 || ( cat ~/.cpanm/build.log && false )
29-
echo "::endgroup::"
30-
fi
22+
echo "::group::Install FFTW3 (via Alien::FFTW3 TODO)"
23+
# TODO Alien::FFTW3 does not have build support for MSWin32 yet
24+
#$MYPERL -S cpanm -n Module::Build || ( cat ~/.cpanm/build.log && false )
25+
#$MYPERL -S cpanm -n Alien::FFTW3 || ( cat ~/.cpanm/build.log && false )
26+
echo "::endgroup::"

github-actions/install-dep-gd/action.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,15 @@ runs:
44
steps:
55
- name: Install GD (via apt-get)
66
shell: bash
7+
if: runner.os == 'Linux'
78
run: |
8-
if ${{ toJSON( runner.os == 'Linux' ) }}; then
9-
echo "::group::Install GD (via apt-get)"
10-
sudo apt-get -y update && sudo apt-get install --no-install-recommends -y libgd-dev
11-
echo "::endgroup::"
12-
fi
9+
echo "::group::Install GD (via apt-get)"
10+
sudo apt-get -y update && sudo apt-get install --no-install-recommends -y libgd-dev
11+
echo "::endgroup::"
1312
- name: Install GD (via brew)
1413
shell: bash
14+
if: runner.os == 'macOS'
1515
run: |
16-
if ${{ toJSON( runner.os == 'macOS' ) }}; then
17-
echo "::group::Install GD (via brew)"
18-
brew install gd
19-
echo "::endgroup::"
20-
fi
16+
echo "::group::Install GD (via brew)"
17+
brew install gd
18+
echo "::endgroup::"

github-actions/install-dep-gnuplot/action.yml

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,34 @@ runs:
44
steps:
55
- name: Install gnuplot (via apt-get)
66
shell: bash
7+
if: runner.os == 'Linux'
78
run: |
8-
if ${{ toJSON( runner.os == 'Linux' ) }}; then
9-
echo "::group::Install gnuplot (via apt-get)"
10-
sudo apt-get -y update && sudo apt-get install --no-install-recommends -y gnuplot gnuplot-qt
11-
echo "::endgroup::"
12-
fi
9+
echo "::group::Install gnuplot (via apt-get)"
10+
sudo apt-get -y update && sudo apt-get install --no-install-recommends -y gnuplot gnuplot-qt
11+
echo "::endgroup::"
1312
- name: Install gnuplot (via brew)
1413
shell: bash
14+
if: runner.os == 'macOS'
1515
run: |
16-
if ${{ toJSON( runner.os == 'macOS' ) }}; then
17-
echo "::group::Install gnuplot (via brew)"
18-
brew update
19-
brew upgrade python || true # currently (2024-03-25) 3.12 link fails
20-
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install gnuplot
21-
echo "::endgroup::"
22-
fi
16+
echo "::group::Install gnuplot (via brew)"
17+
brew update
18+
brew upgrade python || true # currently (2024-03-25) 3.12 link fails
19+
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install gnuplot
20+
echo "::endgroup::"
2321
- name: Install gnuplot (extract from archive)
2422
shell: bash
23+
if: runner.os == 'Windows'
2524
env:
2625
GNUPLOT_URI: "https://sourceforge.net/projects/gnuplot/files/gnuplot/5.4.6/gp546-win64-mingw-2.7z/download"
2726
GNUPLOT_FILE: "gp546-win64-mingw-2.7z"
2827
run: |
29-
if ${{ toJSON( runner.os == 'Windows' ) }}; then
30-
echo "::group::Install gnuplot (extract from archive)"
31-
num_attempts=1
32-
until \
33-
pwsh -c ' [Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"; $request = Invoke-WebRequest -MaximumRetryCount 3 -UserAgent Curl -Uri $Env:GNUPLOT_URI -OutFile $Env:GNUPLOT_FILE' \
34-
|| [[ $num_attempts -gt 3 ]]; do
35-
echo $((num_attempts++));
36-
done
37-
7z x $GNUPLOT_FILE -o..
38-
pwsh -c 'echo "'$( cygpath -w $( realpath ../gnuplot/bin ) )'" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append'
39-
echo "::endgroup::"
40-
fi
28+
echo "::group::Install gnuplot (extract from archive)"
29+
num_attempts=1
30+
until \
31+
pwsh -c ' [Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"; $request = Invoke-WebRequest -MaximumRetryCount 3 -UserAgent Curl -Uri $Env:GNUPLOT_URI -OutFile $Env:GNUPLOT_FILE' \
32+
|| [[ $num_attempts -gt 3 ]]; do
33+
echo $((num_attempts++));
34+
done
35+
7z x $GNUPLOT_FILE -o..
36+
pwsh -c 'echo "'$( cygpath -w $( realpath ../gnuplot/bin ) )'" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append'
37+
echo "::endgroup::"

github-actions/install-dep-gsl/action.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,15 @@ runs:
44
steps:
55
- name: Install GSL (via apt-get)
66
shell: bash
7+
if: runner.os == 'Linux'
78
run: |
8-
if ${{ toJSON( runner.os == 'Linux' ) }}; then
9-
echo "::group::Install GSL (via apt-get)"
10-
sudo apt-get -y update && sudo apt-get install --no-install-recommends -y libgsl0-dev
11-
echo "::endgroup::"
12-
fi
9+
echo "::group::Install GSL (via apt-get)"
10+
sudo apt-get -y update && sudo apt-get install --no-install-recommends -y libgsl0-dev
11+
echo "::endgroup::"
1312
- name: Install GSL (via brew)
1413
shell: bash
14+
if: runner.os == 'macOS'
1515
run: |
16-
if ${{ toJSON( runner.os == 'macOS' ) }}; then
17-
echo "::group::Install GSL (via brew)"
18-
brew install gsl
19-
echo "::endgroup::"
20-
fi
16+
echo "::group::Install GSL (via brew)"
17+
brew install gsl
18+
echo "::endgroup::"

github-actions/install-dep-hdf4/action.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@ runs:
44
steps:
55
- name: Install HDF4 (via apt-get)
66
shell: bash
7+
if: runner.os == 'Linux'
78
run: |
8-
if ${{ toJSON( runner.os == 'Linux' ) }}; then
9-
echo "::group::Install HDF4 (via apt-get)"
10-
sudo apt-get -y update && sudo apt-get install --no-install-recommends -y libhdf4-alt-dev
11-
echo "::endgroup::"
12-
fi
9+
echo "::group::Install HDF4 (via apt-get)"
10+
sudo apt-get -y update && sudo apt-get install --no-install-recommends -y libhdf4-alt-dev
11+
echo "::endgroup::"
1312
# formula is broken as of 2024-12-03 "no formula szip"
1413
# - name: Install HDF4 (via brew)
1514
# shell: bash
15+
# if: runner.os == 'macOS'
1616
# run: |
17-
# if ${{ toJSON( runner.os == 'macOS' ) }}; then
18-
# echo "::group::Install HDF4 (via brew)"
19-
# brew install brewsci/science/hdf4
20-
# echo "::endgroup::"
21-
# fi
17+
# echo "::group::Install HDF4 (via brew)"
18+
# brew install brewsci/science/hdf4
19+
# echo "::endgroup::"

github-actions/install-dep-hdf5/action.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,15 @@ runs:
44
steps:
55
- name: Install HDF5 (via apt-get)
66
shell: bash
7+
if: runner.os == 'Linux'
78
run: |
8-
if ${{ toJSON( runner.os == 'Linux' ) }}; then
9-
echo "::group::Install HDF5 (via apt-get)"
10-
sudo apt-get -y update && sudo apt-get install --no-install-recommends -y libhdf5-dev
11-
echo "::endgroup::"
12-
fi
9+
echo "::group::Install HDF5 (via apt-get)"
10+
sudo apt-get -y update && sudo apt-get install --no-install-recommends -y libhdf5-dev
11+
echo "::endgroup::"
1312
- name: Install HDF5 (via brew)
1413
shell: bash
14+
if: runner.os == 'macOS'
1515
run: |
16-
if ${{ toJSON( runner.os == 'macOS' ) }}; then
17-
echo "::group::Install HDF5 (via brew)"
18-
brew install hdf5
19-
echo "::endgroup::"
20-
fi
16+
echo "::group::Install HDF5 (via brew)"
17+
brew install hdf5
18+
echo "::endgroup::"

github-actions/install-dep-lapack/action.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,15 @@ runs:
55
- uses: PDLPorters/devops/github-actions/install-dep-gfortran@master
66
- name: Install LAPACK (via apt-get)
77
shell: bash
8+
if: runner.os == 'Linux'
89
run: |
9-
if ${{ toJSON( runner.os == 'Linux' ) }}; then
1010
echo "::group::Install LAPACK (via apt-get)"
1111
sudo apt-get -y update && sudo apt-get install --no-install-recommends -y liblapack-dev
1212
echo "::endgroup::"
13-
fi
1413
- name: Install LAPACK (via brew)
1514
shell: bash
15+
if: runner.os == 'macOS'
1616
run: |
17-
if ${{ toJSON( runner.os == 'macOS' ) }}; then
18-
echo "::group::Install LAPACK (via brew)"
19-
brew install lapack
20-
echo "::endgroup::"
21-
fi
17+
echo "::group::Install LAPACK (via brew)"
18+
brew install lapack
19+
echo "::endgroup::"

github-actions/install-dep-netcdf/action.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,14 @@ runs:
44
steps:
55
- name: Install NetCDF (via apt-get)
66
shell: bash
7+
if: runner.os == 'Linux'
78
run: |
8-
if ${{ toJSON( runner.os == 'Linux' ) }}; then
9-
echo "::group::Install NetCDF (via apt-get)"
10-
sudo apt-get -y update && sudo apt-get install --no-install-recommends -y libnetcdf-dev
11-
echo "::endgroup::"
12-
fi
9+
echo "::group::Install NetCDF (via apt-get)"
10+
sudo apt-get -y update && sudo apt-get install --no-install-recommends -y libnetcdf-dev
11+
echo "::endgroup::"
1312
- name: Install NetCDF (via brew)
1413
shell: bash
15-
run: |
16-
if ${{ toJSON( runner.os == 'macOS' ) }}; then
17-
echo "::group::Install NetCDF (via brew)"
18-
brew install netcdf
19-
echo "::endgroup::"
20-
fi
14+
if: runner.os == 'macOS'
15+
echo "::group::Install NetCDF (via brew)"
16+
brew install netcdf
17+
echo "::endgroup::"

github-actions/install-dep-opencv/action.yml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,20 @@ runs:
44
steps:
55
- name: Install OpenCV (via apt-get)
66
shell: bash
7+
if: runner.os == 'Linux'
78
run: |
8-
if ${{ toJSON( runner.os == 'Linux' ) }}; then
9-
echo "::group::Install OpenCV (via apt-get)"
10-
sudo apt-get -y update && sudo apt-get install --no-install-recommends -y libopencv-dev
11-
echo "::endgroup::"
12-
fi
9+
echo "::group::Install OpenCV (via apt-get)"
10+
sudo apt-get -y update && sudo apt-get install --no-install-recommends -y libopencv-dev
11+
echo "::endgroup::"
1312
- name: Install OpenCV (via brew)
1413
shell: bash
15-
run: |
16-
if ${{ toJSON( runner.os == 'macOS' ) }}; then
17-
echo "::group::Install OpenCV (via brew)"
18-
brew install opencv
19-
echo "::endgroup::"
20-
fi
14+
if: runner.os == 'macOS'
15+
run: brew install opencv
2116
- name: Install OpenCV (via Alien::OpenCV)
2217
shell: bash
18+
if: runner.os == 'Windows'
2319
run: |
24-
if ${{ toJSON( runner.os == 'Windows' ) }}; then
25-
echo "::group::Install OpenCV (via Alien::OpenCV TODO)"
26-
# TODO Alien::OpenCV does not have build support for MSWin32 yet
27-
#$MYPERL -S cpanm -n Alien::OpenCV || ( cat ~/.cpanm/build.log && false )
28-
echo "::endgroup::"
29-
fi
30-
20+
echo "::group::Install OpenCV (via Alien::OpenCV TODO)"
21+
# TODO Alien::OpenCV does not have build support for MSWin32 yet
22+
#$MYPERL -S cpanm -n Alien::OpenCV || ( cat ~/.cpanm/build.log && false )
23+
echo "::endgroup::"

github-actions/install-dep-pdl-dep/action.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,24 @@ runs:
44
steps:
55
- name: Install main PDL deps
66
shell: bash
7+
if: runner.os == 'Linux'
78
run: |
8-
if ${{ toJSON( runner.os == 'Linux' ) }}; then
9-
echo "::group::Install main PDL deps (via apt-get)"
10-
sudo apt-get -y update && \
11-
sudo apt-get install --no-install-recommends -y build-essential libcfitsio-dev libreadline-dev libvpx-dev netpbm libnetpbm10-dev
12-
echo "::endgroup::"
13-
elif ${{ toJSON( runner.os == 'macOS' ) }}; then
14-
echo "::group::Install main PDL deps (via brew)"
15-
brew update
16-
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install netpbm
17-
echo "::endgroup::"
18-
fi
9+
echo "::group::Install main PDL deps (via apt-get)"
10+
sudo apt-get -y update && \
11+
sudo apt-get install --no-install-recommends -y build-essential libcfitsio-dev libreadline-dev libvpx-dev netpbm libnetpbm10-dev
12+
echo "::endgroup::"
13+
- name: Install main PDL deps (via brew)
14+
shell: bash
15+
if: runner.os == 'macOS'
16+
run: |
17+
echo "::group::Install main PDL deps (via brew)"
18+
brew update
19+
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install netpbm
20+
echo "::endgroup::"
1921
- name: Install extra optional main PDL deps
2022
shell: bash
23+
if: runner.os == 'Linux' || runner.os == 'macOS'
2124
run: |
22-
if ${{ toJSON( runner.os == 'Linux' || runner.os == 'macOS' ) }}; then
23-
echo "::group::Install extra optional main PDL deps (via cpanm)"
24-
cpanm -n Term::ReadLine::Gnu Inline::C || cat ~/.cpanm/build.log
25-
echo "::endgroup::"
26-
fi
25+
echo "::group::Install extra optional main PDL deps (via cpanm)"
26+
cpanm -n Term::ReadLine::Gnu Inline::C || cat ~/.cpanm/build.log
27+
echo "::endgroup::"

0 commit comments

Comments
 (0)