summaryrefslogtreecommitdiff
path: root/.github/workflows/nightly.yml
blob: 850699fc5e540368f22faf262d5f458e8786b7c6 (plain)
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
100
101
102
103
104
105
106
107
108
109
110
111
name: Nightly builds

on:
  workflow_dispatch:
  schedule:
    # Every day at 04:05 UTC
    # https://crontab.guru/#05_04_*_*_*
    - cron: '05 04 * * *'

jobs:
  pyinstaller:
    if: "github.repository == 'qutebrowser/qutebrowser'"
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: macos-10.15
            branch: master
          - os: windows-2019
            args: --64bit
            branch: master
          - os: windows-2019
            args: --32bit
            branch: master
          - os: macos-10.15
            args: --debug
            branch: master
          - os: windows-2019
            args: --64bit --debug
            branch: master
          - os: windows-2019
            args: --32bit --debug
            branch: master

          - os: macos-10.15
            branch: qt6-v2
          - os: windows-2019
            args: --64bit
            branch: qt6-v2
          - os: macos-10.15
            args: --debug
            branch: qt6-v2
          - os: windows-2019
            args: --64bit --debug
            branch: qt6-v2
    runs-on: "${{ matrix.os }}"
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v2
        with:
          ref: "${{ matrix.branch }}"
          persist-credentials: false
      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: "3.10"
      - name: Get asciidoc
        uses: actions/checkout@v2
        with:
          repository: asciidoc-py/asciidoc-py
          ref: '9.x'
          path: asciidoc
          persist-credentials: false
      - name: Move asciidoc out of the repo
        run: mv asciidoc ..
      - name: Install dependencies
        run: |
            python -m pip install -U pip
            python -m pip install -U -r misc/requirements/requirements-tox.txt
      - name: Patch qutebrowser for debugging
        if: "contains(matrix.args, '--debug')"
        run: |
          sed -i '' '/.-d., .--debug.,/s/$/ default=True,/' qutebrowser/qutebrowser.py
      - name: Run tox
        run: "tox -e build-release -- --asciidoc ../asciidoc/asciidoc.py --gh-token ${{ secrets.GITHUB_TOKEN }} ${{ matrix.args }}"
      - name: Wait 90s to avoid upload errors
        if: "contains(matrix.args, '--32bit')"
        run: "sleep 90"
      - name: Upload artifacts
        uses: actions/upload-artifact@v2
        with:
          name: "qutebrowser-nightly-${{ github.sha }}"
          path: |
            dist/qutebrowser-*.dmg
            dist/qutebrowser-*-windows-standalone-*.zip
            dist/qutebrowser-*-*.exe

  irc:
    timeout-minutes: 2
    continue-on-error: true
    runs-on: ubuntu-20.04
    needs: [pyinstaller]
    if: "always() && github.repository == 'qutebrowser/qutebrowser'"
    steps:
      - name: Send success IRC notification
        uses: Gottox/irc-message-action@v1
        if: "needs.pyinstaller.result == 'success'"
        with:
          server: irc.libera.chat
          channel: '#qutebrowser-bots'
          nickname: qutebrowser-bot
          message: "[${{ github.workflow }}] \u00033Success:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})"
      - name: Send non-success IRC notification
        uses: Gottox/irc-message-action@v1
        if: "needs.pyinstaller.result != 'success'"
        with:
          server: irc.libera.chat
          channel: '#qutebrowser-bots'
          nickname: qutebrowser-bot
          message: "[${{ github.workflow }}] \u00034FAIL:\u0003 ${{ github.ref }} https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (@${{ github.actor }})\n
            pyinstaller: ${{ needs.pyinstaller.result }}"