summaryrefslogtreecommitdiff
path: root/.github/workflows/nightly-test.yml
blob: 9a512bad467727ac9474eb9cff7b37c7914c3a63 (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
name: Nightly builds - pyinstaller develop

on:
  workflow_dispatch:
  push:
    branches:
      - 'feat/test_pre_release_pyinstaller'

jobs:
  pyinstaller:
    if: "github.repository == 'qutebrowser/qutebrowser'"
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: macos-11
            args:
            toxenv: build-release
            name: macos
          - os: windows-2019
            args: --64bit
            toxenv: build-release
            name: windows-64bit
    runs-on: "${{ matrix.os }}"
    timeout-minutes: 45
    steps:
      - uses: actions/checkout@v3
        with:
          persist-credentials: false
      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: "3.10"
      - 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 ${{ matrix.toxenv }} -- --gh-token ${{ secrets.GITHUB_TOKEN }} ${{ matrix.args }}"
      - name: Gather info
        id: info
        run: |
            echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"
            echo "sha_short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
        shell: bash
      - name: Upload artifacts
        uses: actions/upload-artifact@v3
        with:
          name: "qutebrowser-nightly-pyinstaller-test-${{ steps.info.outputs.date }}-${{ steps.info.outputs.sha_short }}-${{ matrix.name }}"
          path: |
            dist/qutebrowser-*.dmg
            dist/qutebrowser-*-windows-standalone-*.zip
            dist/qutebrowser-*-*.exe
          if-no-files-found: error
      #- name: Upload dist on failure
      #  uses: actions/upload-artifact@v3
      #  if: "failure()"
      #  with:
      #    name: "qutebrowser-nightly-pyinstaller-test-failure-${{ steps.info.outputs.date }}-${{ steps.info.outputs.sha_short }}-${{ matrix.name }}"
      #    path: |
      #      dist/
      #      !dist/qutebrowser.app/Contents/Frameworks # duplicate of Resources
      #      !dist/qutebrowser/_internal/ # intermediate? seems to be the same as in Resources too
      #    if-no-files-found: error