Skip to content
Snippets Groups Projects
Verified Commit 2b723217 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Added CI configuration to build CLI for linux

parent 6fa0ffc8
No related branches found
No related tags found
1 merge request!5Resolve "Provide precompiled binaries for easier install"
Pipeline #4199 passed
stages: stages:
- test - test
- build
variables: variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
...@@ -17,3 +18,47 @@ test: ...@@ -17,3 +18,47 @@ test:
- pytest - pytest
tags: tags:
- docker - docker
build-linux:
stage: build
image: python:3.6
before_script:
- pip install .[dev]
script:
- pyinstaller --clean -y cli.spec --distpath .
- echo "Testing the generated CLI works…" && ./funkwhale --help && echo "funkwhale CLI working \o/"
artifacts:
name: "linux_${CI_COMMIT_REF_NAME}"
paths:
- funkwhale
only:
- tags@funkwhale/cli
- master@funkwhale/cli
tags:
- docker
build-windows:
# there is a weird Gitlab / windows interaction
# cf https://github.com/cdrx/docker-pyinstaller/issues/38
# so we cannot use the regular docker executor
stage: build
image: docker:stable
tags:
- docker-build
variables:
# CI_DEBUG_TRACE: "true"
script:
- docker run --rm -v "$(pwd):/src/" cdrx/pyinstaller-windows:python3 "pip install -r requirements-dev.txt && pyinstaller --clean -y cli.spec --distpath ."
- docker run --rm -v "$(pwd):/src/" cdrx/pyinstaller-windows:python3 "echo 'Testing the generated CLI works…' && wine ./funkwhale.exe --help && echo 'funkwhale CLI working \o/'"
artifacts:
name: "linux_${CI_COMMIT_REF_NAME}"
paths:
- funkwhale.exe
only:
- tags@funkwhale/cli
- master@funkwhale/cli
tags:
- docker-build
...@@ -2,15 +2,33 @@ A command line interface to interact with Funkwhale servers. ...@@ -2,15 +2,33 @@ A command line interface to interact with Funkwhale servers.
# Installation # Installation
We provide some prebuilt binaries for Windows and Linux.
On Linux:
```
curl -L "https://dev.funkwhale.audio/funkwhale/cli/-/jobs/artifacts/master/raw/funkwhale?job=build-linux" -o /usr/local/bin/funkwhale
chmod +x /usr/local/bin/funkwhale
```
On Windows:
```
curl -L "https://dev.funkwhale.audio/funkwhale/cli/-/jobs/artifacts/master/raw/funkwhale.exe?job=build-windows" -o funkwhale.exe
```
# Usage
``funkwhale --help``
# Installation (from source)
This cli requires python 3.6 or greater: This cli requires python 3.6 or greater:
git clone https://dev.funkwhale.audio/funkwhale/cli.git git clone https://dev.funkwhale.audio/funkwhale/cli.git
cd cli cd cli
pip install . pip install .
# Usage
``funkwhale --help``
# Build the binary # Build the binary
......
aiofiles
aiohttp
appdirs
click
click-log
keyring
marshmallow
python-dotenv
semver
tabulate
tqdm
pathvalidate
aioresponses
asynctest
ipdb
pytest
pytest-mock
pytest-env
pyinstaller
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment