name: CI on: push: branches: - "master" pull_request: jobs: coverage: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: - macos-latest - windows-latest python-version: - 2.7 steps: # Get vcpython27 on Windows + Python 2.7, to build netifaces # extension. See https://chocolatey.org/packages/vcpython27 and # https://github.com/crazy-max/ghaction-chocolatey - name: Install MSVC 9.0 for Python 2.7 [Windows] if: matrix.os == 'windows-latest' && matrix.python-version == '2.7' uses: crazy-max/ghaction-chocolatey@v1 with: args: install vcpython27 - name: Check out Tahoe-LAFS sources uses: actions/checkout@v2 - name: Fetch all history for all tags and branches run: git fetch --prune --unshallow - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - name: Install Python packages run: | pip install --upgrade codecov tox setuptools pip list - name: Display tool versions run: python misc/build_helpers/show-tool-versions.py - name: Run "tox -e py27-coverage" run: tox -e py27-coverage - name: Upload eliot.log in case of failure uses: actions/upload-artifact@v1 if: failure() with: name: eliot.log path: eliot.log # Upload this job's coverage data to Coveralls. - name: "Report Coverage to Coveralls" uses: "coverallsapp/github-action@v1.1.2" with: github-token: "${{ secrets.GITHUB_TOKEN }}" # Every source of coverage reports needs a unique "flag name". # Construct one by smashing a few variables from the matrix together # here. flag-name: "run-${{ matrix.os }}-${{ matrix.python-version }}" # Mark the data as just one piece of many because we have more than # one instance of this job (Windows, macOS) which collects and # reports coverage. This is necessary to cause Coveralls to merge # multiple coverage results into a single report. parallel: true # Tell Coveralls that we're done reporting coverage data. Since we're using # the "parallel" mode where more than one coverage data file is merged into # a single report, we have to tell Coveralls when we've uploaded all of the # data files. This does it. We make sure it runs last by making it depend # on *all* of the coverage-collecting jobs. finish-coverage-report: # There happens to just be one coverage-collecting job at the moment. If # the coverage reports are broken and someone added more # coverage-collecting jobs to this workflow but didn't update this, that's # why. needs: - "coverage" runs-on: "ubuntu-latest" steps: - name: "Finish Coveralls Reporting" uses: "coverallsapp/github-action@v1.1.2" with: github-token: "${{ secrets.GITHUB_TOKEN }}" # Here's the magic that tells Coveralls we're done. parallel-finished: true integration: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: - macos-latest - windows-latest python-version: - 2.7 steps: # Get vcpython27 for Windows + Python 2.7, to build netifaces # extension. See https://chocolatey.org/packages/vcpython27 and # https://github.com/crazy-max/ghaction-chocolatey - name: Install MSVC 9.0 for Python 2.7 [Windows] if: matrix.os == 'windows-latest' && matrix.python-version == '2.7' uses: crazy-max/ghaction-chocolatey@v1 with: args: install vcpython27 - name: Install Tor [Ubuntu] if: matrix.os == 'ubuntu-latest' run: sudo apt install tor - name: Install Tor [macOS] if: matrix.os == 'macos-latest' run: brew install tor - name: Install Tor [Windows] if: matrix.os == 'windows-latest' uses: crazy-max/ghaction-chocolatey@v1 with: args: install tor - name: Check out Tahoe-LAFS sources uses: actions/checkout@v2 - name: Fetch all history for all tags and branches run: git fetch --prune --unshallow - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - name: Install Python packages run: | pip install --upgrade tox pip list - name: Display tool versions run: python misc/build_helpers/show-tool-versions.py - name: Run "tox -e integration" run: tox -e integration - name: Upload eliot.log in case of failure uses: actions/upload-artifact@v1 if: failure() with: name: integration.eliot.json path: integration.eliot.json packaging: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: - macos-latest - windows-latest - ubuntu-latest python-version: - 2.7 steps: # Get vcpython27 for Windows + Python 2.7, to build netifaces # extension. See https://chocolatey.org/packages/vcpython27 and # https://github.com/crazy-max/ghaction-chocolatey - name: Install MSVC 9.0 for Python 2.7 [Windows] if: matrix.os == 'windows-latest' && matrix.python-version == '2.7' uses: crazy-max/ghaction-chocolatey@v1 with: args: install vcpython27 - name: Check out Tahoe-LAFS sources uses: actions/checkout@v2 - name: Fetch all history for all tags and branches run: git fetch --prune --unshallow - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - name: Install Python packages run: | pip install --upgrade tox pip list - name: Display tool versions run: python misc/build_helpers/show-tool-versions.py - name: Run "tox -e pyinstaller" run: tox -e pyinstaller # This step is to ensure there are no packaging/import errors. - name: Test PyInstaller executable run: dist/Tahoe-LAFS/tahoe --version - name: Upload PyInstaller package uses: actions/upload-artifact@v2 with: name: Tahoe-LAFS-${{ matrix.os }}-Python-${{ matrix.python-version }} path: dist/Tahoe-LAFS-*-*.*