djvu: implement text interface #196
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 Build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| inputs: | |
| CLEAN_CCACHE: | |
| description: 'Clean ccache before build' | |
| required: false | |
| default: 'false' | |
| # cancel already running builds of the same branch or pull request | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref || github.sha }} | |
| cancel-in-progress: true | |
| env: | |
| MATE_DESKTOP_VERSION: 1.28.2 | |
| CACHE_PATH: /tmp/.cache | |
| jobs: | |
| build: | |
| name: ${{matrix.container}} (${{matrix.cc}} ${{matrix.build-system}}) | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ${{matrix.container}} | |
| volumes: | |
| - /tmp/.cache | |
| strategy: | |
| fail-fast: false # don't cancel other jobs in the matrix if one fails | |
| matrix: | |
| container: | |
| [ | |
| "debian:testing", | |
| "fedora:latest", | |
| "ubuntu:rolling", | |
| "archlinux:latest", | |
| ] | |
| cc: ["gcc"] | |
| cxx: ["g++"] | |
| build-system: ["autotools", "meson"] | |
| include: | |
| - container: "archlinux:latest" | |
| build-system: "autotools" | |
| cc: "clang" | |
| cxx: "clang++" | |
| - container: "archlinux:latest" | |
| build-system: "meson" | |
| cc: "clang" | |
| cxx: "clang++" | |
| env: | |
| # Speed up build with ccache | |
| CC: ccache ${{ matrix.cc }} | |
| CXX: ccache ${{ matrix.cxx }} | |
| CONTAINER: ${{ matrix.container }} | |
| steps: | |
| - name: Setup environment variables | |
| id: distro-name | |
| shell: bash | |
| run: | | |
| split=(${CONTAINER//:/ }) | |
| distro=${split[0]} | |
| short_sha=${SHA:0:8} | |
| echo "DISTRO=$distro" | tee -a $GITHUB_ENV | |
| - name: Install git command | |
| shell: bash | |
| run: | | |
| echo "::group::Install git ..." | |
| apt-get update -qq && apt-get install --assume-yes git || true | |
| dnf update -y && dnf install -y git || true | |
| pacman --noconfirm -Sy git || true | |
| echo "::endgroup::" | |
| - name: Repository checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| submodules: "true" | |
| - name: Install dependency packages | |
| run: .github/workflows/${{ env.DISTRO }}.sh | |
| - name: Enable ccache to speed up builds | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: ${{ env.DISTRO }}-${{ matrix.cc }} | |
| # INFO: M-C-C depends mate-desktop 1.27.1+, so we should install it from source. | |
| - name: Cache mate-desktop binary packages | |
| uses: actions/cache@v6 | |
| id: cache-mate-desktop | |
| with: | |
| path: ${{ env.CACHE_PATH }} | |
| key: ${{ env.DISTRO }}-build-mate-desktop-${{env.MATE_DESKTOP_VERSION}} | |
| - name: Optionally force ccache cleanup | |
| if: ${{ github.event.inputs.CLEAN_CCACHE == 'true' }} | |
| run: | | |
| ccache -C | |
| - name: Build and install mate-desktop from source | |
| run: .github/workflows/mate-desktop.sh ${{env.MATE_DESKTOP_VERSION}} ${{ env.CACHE_PATH }} | |
| # INFO: M-C-C depends mate-desktop 1.27.1+, install finished. | |
| - name: Build the source code | |
| run: .github/workflows/builds.sh ${{ matrix.build-system }} |