Use Giza to draw to Cairo canvas #165
Workflow file for this run
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: build | |
| # Controls when the action will run. Triggers the workflow on push or pull request | |
| # events but only for the master branch | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| include: | |
| - os: macos-latest | |
| use-homebrew: true | |
| steps: | |
| # make sure we have gfortran installed and linked | |
| - name: Install gfortran compiler | |
| uses: fortran-lang/setup-fortran@v1 | |
| with: | |
| compiler: gcc | |
| - name: Install dependencies (Ubuntu) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libcairo2-dev libx11-dev | |
| # Install cairo via Homebrew on macOS (configure/Makefile.in are in the repo) | |
| - name: Install dependencies (macOS/Homebrew) | |
| if: matrix.use-homebrew | |
| run: brew install cairo | |
| # check out the repository | |
| - uses: actions/checkout@v4 | |
| - name: compile and install giza | |
| run: | | |
| ./configure | |
| make | |
| sudo make install | |
| # Run all non-interactive tests (test/C/auto_ctests + test/F90/auto_ftests). | |
| # Interactive /xw tests are built but excluded from TESTS in the Makefiles. | |
| - name: Run non-interactive tests | |
| run: | | |
| make check || { | |
| echo "Tests failed. Printing test-suite logs..." | |
| for log in test/C/test-suite.log test/F90/test-suite.log; do | |
| if [ -f "$log" ]; then | |
| echo "=== $log ===" | |
| cat "$log" | |
| fi | |
| done | |
| exit 1 | |
| } |