File: ci.yml

package info (click to toggle)
psutils 3.3.14-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,280 kB
  • sloc: python: 2,984; makefile: 28
file content (37 lines) | stat: -rw-r--r-- 1,319 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: CI

on: [ push, pull_request ]

jobs:
  build:
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v4
    - name: Install dependencies (Ubuntu)
      if: ${{ matrix.os == 'ubuntu-latest' }}
      run: sudo apt-get -y install python3 help2man imagemagick
    - name: Install dependencies (macOS)
      if: ${{ matrix.os == 'macos-latest' }}
      run: |
        brew install libpaper tox imagemagick
        # Prepend optional brew binary directories to PATH
        echo "$(brew --prefix)/opt/imagemagick/bin:$(brew --prefix)/opt/python/libexec/bin" >> $GITHUB_PATH
    - name: Install libpaper from source
      if: ${{ matrix.os == 'ubuntu-latest' }}
      run: |
        git clone https://github.com/rrthomas/libpaper.git ~/libpaper
        cd ~/libpaper && ./bootstrap && ./configure --quiet --enable-silent-rules && sudo make install
        if test ${{ matrix.os }} = ubuntu-latest; then sudo ldconfig; fi
        paper --version
    - name: Build
      run: |
        if [ "$RUNNER_OS" = "macOS" ]; then
          export MAGICK_HOME="$(brew --prefix)/opt/imagemagick/"
          tox --skip-missing-interpreters -e py312,py313
        else
          pip install tox
          tox --skip-missing-interpreters
        fi