2020-02-17 20:35:56 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2020-04-13 16:19:41 +00:00
|
|
|
branches:
|
|
|
|
- "master"
|
2020-02-17 20:35:56 +00:00
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
2020-02-26 04:02:02 +00:00
|
|
|
|
|
|
|
coverage:
|
2020-02-17 20:35:56 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- macos-latest
|
|
|
|
- windows-latest
|
|
|
|
python-version:
|
|
|
|
- 2.7
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
2020-11-25 13:16:37 +00:00
|
|
|
# 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
|
|
|
|
|
2021-01-18 22:54:17 +00:00
|
|
|
# See https://github.com/actions/checkout. A fetch-depth of 0
|
|
|
|
# fetches all tags and branches.
|
2020-02-17 20:35:56 +00:00
|
|
|
- name: Check out Tahoe-LAFS sources
|
|
|
|
uses: actions/checkout@v2
|
2021-01-18 22:54:17 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2020-02-17 20:35:56 +00:00
|
|
|
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
|
2021-01-18 18:34:25 +00:00
|
|
|
# We need "pip cache dir", which became a thing in pip v20.1+.
|
|
|
|
# At the time of writing this, GitHub Actions offers pip v20.3.3
|
|
|
|
# for both ubuntu-latest and windows-latest, and pip v20.3.1 for
|
|
|
|
# macos-latest. Those are sufficiently recent pip versions that
|
|
|
|
# have "cache dir" sub-command.
|
2021-01-18 16:02:55 +00:00
|
|
|
- name: Get pip cache directory
|
|
|
|
id: pip-cache
|
|
|
|
run: |
|
|
|
|
echo "::set-output name=dir::$(pip cache dir)"
|
|
|
|
|
2021-01-18 16:08:56 +00:00
|
|
|
- name: Use pip cache
|
2021-01-18 16:02:55 +00:00
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ${{ steps.pip-cache.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-pip-
|
|
|
|
|
2021-01-18 18:13:32 +00:00
|
|
|
- name: Install Python packages
|
|
|
|
run: |
|
2021-01-18 18:38:09 +00:00
|
|
|
pip install --upgrade codecov tox setuptools
|
2021-01-18 18:13:32 +00:00
|
|
|
pip list
|
|
|
|
|
2020-02-17 20:35:56 +00:00
|
|
|
- name: Display tool versions
|
|
|
|
run: python misc/build_helpers/show-tool-versions.py
|
|
|
|
|
2020-08-27 14:37:37 +00:00
|
|
|
- name: Run "tox -e py27-coverage"
|
|
|
|
run: tox -e py27-coverage
|
2020-02-17 20:35:56 +00:00
|
|
|
|
|
|
|
- name: Upload eliot.log in case of failure
|
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: eliot.log
|
|
|
|
path: eliot.log
|
|
|
|
|
|
|
|
- name: Upload coverage report
|
|
|
|
uses: codecov/codecov-action@v1
|
|
|
|
with:
|
2020-02-28 04:15:51 +00:00
|
|
|
token: abf679b6-e2e6-4b33-b7b5-6cfbd41ee691
|
2020-02-17 20:35:56 +00:00
|
|
|
file: coverage.xml
|
2020-02-26 04:05:03 +00:00
|
|
|
|
|
|
|
integration:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- macos-latest
|
2020-06-22 20:27:18 +00:00
|
|
|
- windows-latest
|
2020-02-26 04:05:03 +00:00
|
|
|
python-version:
|
|
|
|
- 2.7
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
2020-11-25 13:16:37 +00:00
|
|
|
# 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
|
|
|
|
|
2020-02-26 04:17:45 +00:00
|
|
|
- name: Install Tor [Ubuntu]
|
2020-02-26 04:05:03 +00:00
|
|
|
if: matrix.os == 'ubuntu-latest'
|
|
|
|
run: sudo apt install tor
|
|
|
|
|
2020-02-26 04:17:45 +00:00
|
|
|
- name: Install Tor [macOS]
|
2020-02-26 04:05:03 +00:00
|
|
|
if: matrix.os == 'macos-latest'
|
|
|
|
run: brew install tor
|
|
|
|
|
2020-02-26 04:17:45 +00:00
|
|
|
- name: Install Tor [Windows]
|
2020-02-26 04:05:03 +00:00
|
|
|
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
|
2021-01-18 22:54:17 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2020-02-26 04:05:03 +00:00
|
|
|
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
|
2021-01-18 16:02:55 +00:00
|
|
|
- name: Get pip cache directory
|
|
|
|
id: pip-cache
|
|
|
|
run: |
|
|
|
|
echo "::set-output name=dir::$(pip cache dir)"
|
|
|
|
|
2021-01-18 16:08:56 +00:00
|
|
|
- name: Use pip cache
|
2021-01-18 16:02:55 +00:00
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ${{ steps.pip-cache.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-pip-
|
|
|
|
|
2021-01-18 18:13:32 +00:00
|
|
|
- name: Install Python packages
|
|
|
|
run: |
|
2021-01-18 18:38:09 +00:00
|
|
|
pip install --upgrade tox
|
2021-01-18 18:13:32 +00:00
|
|
|
pip list
|
|
|
|
|
2020-02-26 04:05:03 +00:00
|
|
|
- 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:
|
2020-02-26 14:11:23 +00:00
|
|
|
name: integration.eliot.json
|
|
|
|
path: integration.eliot.json
|
2020-02-26 04:05:03 +00:00
|
|
|
|
2020-02-26 04:10:26 +00:00
|
|
|
packaging:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- macos-latest
|
|
|
|
- windows-latest
|
|
|
|
- ubuntu-latest
|
|
|
|
python-version:
|
|
|
|
- 2.7
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
2020-11-25 13:16:37 +00:00
|
|
|
# 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
|
|
|
|
|
2020-02-26 04:10:26 +00:00
|
|
|
- name: Check out Tahoe-LAFS sources
|
|
|
|
uses: actions/checkout@v2
|
2021-01-18 22:54:17 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2020-02-26 04:10:26 +00:00
|
|
|
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
|
|
uses: actions/setup-python@v1
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
|
2021-01-18 16:02:55 +00:00
|
|
|
- name: Get pip cache directory
|
|
|
|
id: pip-cache
|
|
|
|
run: |
|
|
|
|
echo "::set-output name=dir::$(pip cache dir)"
|
|
|
|
|
2021-01-18 16:08:56 +00:00
|
|
|
- name: Use pip cache
|
2021-01-18 16:02:55 +00:00
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ${{ steps.pip-cache.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-pip-
|
|
|
|
|
2021-01-18 18:13:32 +00:00
|
|
|
- name: Install Python packages
|
|
|
|
run: |
|
2021-01-18 18:38:09 +00:00
|
|
|
pip install --upgrade tox
|
2021-01-18 18:13:32 +00:00
|
|
|
pip list
|
|
|
|
|
2020-02-26 04:10:26 +00:00
|
|
|
- name: Display tool versions
|
|
|
|
run: python misc/build_helpers/show-tool-versions.py
|
|
|
|
|
|
|
|
- name: Run "tox -e pyinstaller"
|
|
|
|
run: tox -e pyinstaller
|
2020-05-12 22:15:17 +00:00
|
|
|
|
|
|
|
# This step is to ensure there are no packaging/import errors.
|
|
|
|
- name: Test PyInstaller executable
|
|
|
|
run: dist/Tahoe-LAFS/tahoe --version
|
2020-05-12 22:37:50 +00:00
|
|
|
|
|
|
|
- name: Upload PyInstaller package
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: Tahoe-LAFS-${{ matrix.os }}-Python-${{ matrix.python-version }}
|
|
|
|
path: dist/Tahoe-LAFS-*-*.*
|