File: ci.yml

package info (click to toggle)
git-cola 4.17.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 6,928 kB
  • sloc: python: 38,433; sh: 298; makefile: 223; xml: 110; tcl: 62
file content (99 lines) | stat: -rw-r--r-- 3,118 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: CI

on: [push, pull_request]

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    steps:
      - uses: styfle/cancel-workflow-action@0.12.1
      - uses: actions/checkout@v6
      - name: Get current date for caching
        id: get-date
        shell: bash
        run: |
          echo date=$(date -u +%Y-%m-%d) >> $GITHUB_OUTPUT
      - uses: actions/cache@v4
        id: cache
        with:
          path: |
            ~/.cargo/bin
            ~/.cargo/registry
          key: ${{ runner.os }}-cargo-${{ steps.get-date.outputs.date }}
      - name: Install Rust and Garden
        if: steps.cache.outputs.cache-hit != 'true'
        run: |
          rustup toolchain install stable --profile minimal --no-self-update
          cargo install garden-tools
      - name: Install system-provided test dependencies
        run: sudo apt-get update
      - run: |
          sudo apt-get install -y \
            nsis \
            python3-qtpy \
            python3-pyqt6 \
            python3-pyqt6.qtsvg \
            python3-pyqt6.qtwebengine \
            python3-send2trash
      - name: Install pip-provided test dependencies
        run: |
          set -x
          garden dev/virtualenv -vv -D pip_upgrade=true
          garden dev -vv
      - name: Configure tests
        run: |
          git config --global user.name "Git Cola"
          git config --global user.email git-cola@localhost
      - name: Run tests and checks
        run: garden check -vv
      - name: Run doc build
        run: garden doc/html -vv
      - name: Build Windows git-cola.exe installer
        run: |
          set -x
          rm -fr build
          garden pynsist -vv
          mv build/nsis/git-cola*.exe git-cola.exe
      - name: Upload git-cola.win.zip
        uses: actions/upload-artifact@v5
        with:
          name: git-cola.win
          path: git-cola.exe
      - name: Code formatting
        run: garden fmt -vv -- --check
      - name: Test the garden installation method
        run: garden install -vv -D prefix=dist

  macos:
    name: macOS
    runs-on: macos-latest
    steps:
      - uses: styfle/cancel-workflow-action@0.12.1
      - uses: actions/checkout@v6
      - name: Get current date for caching
        id: get-date
        shell: bash
        run: |
          echo date=$(date -u +%Y-%m-%d) >> $GITHUB_OUTPUT
      - uses: actions/cache@v4
        id: cache
        with:
          path: |
            ~/.cargo/bin
            ~/.cargo/registry
          key: ${{ runner.os }}-cargo-${{ steps.get-date.outputs.date }}
      - name: Install Rust and Garden
        if: steps.cache.outputs.cache-hit != 'true'
        run: |
          rustup toolchain install stable --profile minimal --no-self-update
          cargo install garden-tools
      - name: Install dependencies
        run: brew install git-cola
      - name: Build macOS git-cola.app bundle
        run: garden macos/app -vv -D cola_app='${TREE_PATH}/local/git-cola.app'
      - name: Upload git-cola.app.zip
        uses: actions/upload-artifact@v5
        with:
          name: git-cola.app
          path: local