Use whatever version of go is available on CI
This commit is contained in:
parent
bab914c497
commit
f90753c69b
25
.github/workflows/ci.yml
vendored
25
.github/workflows/ci.yml
vendored
@ -53,11 +53,6 @@ jobs:
|
||||
with:
|
||||
python-version: ${{ matrix.pyver }}
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '>=1.19.0'
|
||||
|
||||
- name: Build kitty
|
||||
run: python .github/workflows/ci.py build
|
||||
|
||||
@ -83,19 +78,14 @@ jobs:
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '>=1.19.0'
|
||||
|
||||
- name: Install build-only deps
|
||||
run: pip install -r docs/requirements.txt flake8 mypy types-requests types-docutils
|
||||
run: python -m pip install -r docs/requirements.txt flake8 mypy types-requests types-docutils
|
||||
|
||||
- name: Run pyflakes
|
||||
run: python -m flake8 --count .
|
||||
|
||||
- name: Run gofmt
|
||||
run: python .github/workflows/ci.py gofmt
|
||||
run: go version && python .github/workflows/ci.py gofmt
|
||||
|
||||
- name: Build kitty package
|
||||
run: python .github/workflows/ci.py package
|
||||
@ -104,7 +94,7 @@ jobs:
|
||||
run: python setup.py build --debug
|
||||
|
||||
- name: Run mypy
|
||||
run: ./test.py mypy
|
||||
run: which python && python -m mypy --version && ./test.py mypy
|
||||
|
||||
- name: Build man page
|
||||
run: make FAIL_WARN=1 man
|
||||
@ -126,11 +116,6 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 10
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '>=1.19.0'
|
||||
|
||||
- name: Build kitty
|
||||
run: which python3 && python3 .github/workflows/ci.py build
|
||||
|
||||
@ -150,10 +135,6 @@ jobs:
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '>=1.19.0'
|
||||
|
||||
- name: Build kitty
|
||||
run: python3 .github/workflows/ci.py build
|
||||
|
||||
@ -46,7 +46,7 @@ Run-time dependencies:
|
||||
Build-time dependencies:
|
||||
|
||||
* ``gcc`` or ``clang``
|
||||
* ``go >= 1.19``
|
||||
* ``go >= 1.17``
|
||||
* ``pkg-config``
|
||||
* For building on Linux in addition to the above dependencies you might also
|
||||
need to install the following packages, if they are not already installed by
|
||||
|
||||
7
test.py
7
test.py
@ -28,15 +28,20 @@ def main() -> None:
|
||||
warnings.simplefilter('error')
|
||||
gohome = os.path.expanduser('~/go')
|
||||
go = shutil.which('go')
|
||||
python = shutil.which('python') or shutil.which('python3')
|
||||
current_home = os.path.expanduser('~') + os.sep
|
||||
paths = os.environ.get('PATH', '/usr/local/sbin:/usr/local/bin:/usr/bin').split(os.pathsep)
|
||||
path = os.pathsep.join(x for x in paths if not x.startswith(current_home))
|
||||
launcher_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'kitty', 'launcher')
|
||||
if go:
|
||||
if go and go.startswith(current_home):
|
||||
path = f'{os.path.dirname(go)}{os.pathsep}{path}'
|
||||
if python and python.startswith(current_home):
|
||||
path = f'{os.path.dirname(python)}{os.pathsep}{path}'
|
||||
path = f'{launcher_dir}{os.pathsep}{path}'
|
||||
PYTHON_FOR_TYPE_CHECK = shutil.which('python') or shutil.which('python3') or ''
|
||||
gohome = os.path.expanduser('~/go')
|
||||
if os.environ.get('CI') == 'true':
|
||||
print('Using PATH in test environment:', path, flush=True)
|
||||
with TemporaryDirectory() as tdir, env_vars(
|
||||
PYTHONWARNINGS='error', HOME=tdir, USERPROFILE=tdir, PATH=path,
|
||||
XDG_CONFIG_HOME=os.path.join(tdir, '.config'),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user