CI on mac #114
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI on mac | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '38 5 * * 6' | |
| jobs: | |
| test_mac: | |
| name: Built BBBike on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| #- os: macos-13 | |
| - os: macos-14 | |
| - os: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| show-progress: false | |
| - name: network check | |
| shell: bash | |
| run: | | |
| set -ex | |
| echo "My IP address: $(curl -s ipinfo.io/ip)"; true | |
| { set -o pipefail; curl -s -I http://bbbike.de/robots.txt | head -1; } || { echo "::warning::network check on bbbike.de port 80 failed"; echo "BBBIKE_TEST_SKIP_BBBIKE_DE=1" >> "$GITHUB_ENV"; } | |
| { set -o pipefail; curl -s -I https://download.bbbike.org | head -1; } || { echo "::warning::network check on download.bbbike.org port 443 failed"; echo "BBBIKE_TEST_SKIP_BBBIKE_ORG=1" >> "$GITHUB_ENV"; } | |
| { set -o pipefail; curl -s -I http://mydebs.bbbike.de:8000/dists/jessie/InRelease | head -1; true; } || { echo "::warning::network check on port 8000 failed"; } | |
| - name: Install prerequisites (brew) | |
| run: | | |
| set -ex | |
| brew install --cask xquartz | |
| brew install \ | |
| perl \ | |
| libxml2 \ | |
| libpng jpeg-turbo \ | |
| gd \ | |
| cairo \ | |
| bmake | |
| - name: Start Xvfb | |
| run: | | |
| /opt/X11/bin/Xvfb :123 & | |
| (sleep 10; twm) & | |
| echo "DISPLAY=:123" >> $GITHUB_ENV | |
| - name: Install cpanminus | |
| run: | | |
| brew install cpanminus | |
| - name: Install Tk | |
| # special treatment necessary: env vars need to be set so JPEG/Makefile.PL works | |
| env: | |
| CPATH: /opt/homebrew/include | |
| LIBRARY_PATH: /opt/homebrew/lib | |
| run: | | |
| cpanm --quiet --notest Tk | |
| - name: Install CPAN dependencies | |
| run: | | |
| set -ex | |
| PATH="/usr/local/opt/libxml2/bin:$PATH" LDFLAGS="-L/usr/local/opt/libxml2/lib" CPPFLAGS="-I/usr/local/opt/libxml2/include" PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig" cpanm --quiet --notest XML::LibXML || ( cat ~/.cpanm/work/*/build.log; false ) | |
| # https://rt.cpan.org/Ticket/Display.html?id=153923 | |
| cpanm --quiet 'GD~<=2.78' | |
| cpanm --quiet --notest \ | |
| Archive::Zip \ | |
| CDB_File MLDBM \ | |
| Class::Accessor \ | |
| CGI \ | |
| Cairo \ | |
| DateTime DateTime::Format::ISO8601 Date::Calc \ | |
| DB_File::Lock \ | |
| DBI DBD::XBase \ | |
| Geo::METAR \ | |
| HTML::Form HTML::FormatText \ | |
| Image::ExifTool Image::Info \ | |
| Inline::MakeMaker Inline::C \ | |
| IPC::Run \ | |
| JSON::XS \ | |
| LWP::Protocol::https LWP::UserAgent \ | |
| PDF::Create \ | |
| Object::Iterate Object::Realize::Later \ | |
| String::Approx \ | |
| Template \ | |
| Text::Unidecode \ | |
| Tie::IxHash \ | |
| YAML::XS \ | |
| XML::Twig \ | |
| || ( cat ~/.cpanm/work/*/build.log; false ) | |
| - name: Remove known failing tests | |
| run: | | |
| mkdir -p xt | |
| mv t/plz.t xt/ | |
| mv t/plz-expected xt/ | |
| - name: Build and test | |
| env: | |
| BBBIKE_TEST_NO_CGI_TESTS: 1 | |
| BBBIKE_TEST_SKIP_MODPERL: 1 | |
| BBBIKE_TEST_SKIP_MAPSERVER: 1 | |
| BBBIKE_TEST_GUI: 1 | |
| BBBIKE_LONG_TESTS: 0 | |
| run: | | |
| set -e | |
| perl Makefile.PL | |
| make | |
| make test HARNESS_OPTIONS=j4 HARNESS_TIMER=1 | |
| - name: Run known failing tests | |
| continue-on-error: true | |
| run: | | |
| prove -It -j4 -r xt |