.cirrus.yml (poetry-1.1.15) | : | .cirrus.yml (poetry-1.2.0) | ||
---|---|---|---|---|
freebsd_instance: | freebsd_instance: | |||
image_family: freebsd-12-2 | image_family: freebsd-13-0 | |||
cpu: 1 | ||||
memory: 4G | ||||
test_task: | test_task: | |||
name: "Tests / FreeBSD / " | name: "Tests / FreeBSD / " | |||
only_if: $CIRRUS_TAG == '' | only_if: $CIRRUS_TAG == '' | |||
skip: "!changesInclude('.cirrus.yml', 'poetry.lock', 'pyproject.toml', '**.jso n','**.py')" | skip: "!changesInclude('.cirrus.yml', 'poetry.lock', 'pyproject.toml', '**.jso n','**.py')" | |||
env: | env: | |||
# `SHELL` environment variable is not set by default, so we explicitly set i | ||||
t to | ||||
# avoid failures on tests that depend on it. | ||||
SHELL: sh | ||||
matrix: | matrix: | |||
- PYTHON: python2.7 | ||||
- PYTHON: python3.7 | - PYTHON: python3.7 | |||
python_script: | - PYTHON: python3.8 | |||
- PYTHON: python3.9 | ||||
- PYTHON: python3.10 | ||||
pkg_script: | ||||
- PYPACKAGE=$(printf '%s' $PYTHON | tr -d '.') | - PYPACKAGE=$(printf '%s' $PYTHON | tr -d '.') | |||
- SQLPACKAGE=$(printf '%s-sqlite3' $PYPACKAGE | sed 's/thon//') | - SQLPACKAGE=$(printf '%s-sqlite3' $PYPACKAGE | sed 's/thon//') | |||
- pkg install -y git-lite $PYPACKAGE $SQLPACKAGE | - pkg install -y git-lite curl $PYPACKAGE $SQLPACKAGE | |||
pip_script: | pip_script: | |||
- $PYTHON -m ensurepip | - $PYTHON -m ensurepip | |||
- $PYTHON -m pip install -U pip tox | - $PYTHON -m pip --disable-pip-version-check install -U pip | |||
- $PYTHON -m pip install -U --pre poetry | env_script: | |||
- echo "PATH=/.local/bin:${PATH}" >> $CIRRUS_ENV | ||||
poetry_script: | ||||
- curl -sL https://install.python-poetry.org | $PYTHON - -y | ||||
- poetry config virtualenvs.in-project true | - poetry config virtualenvs.in-project true | |||
tox_script: $PYTHON -m tox -e py -- -q --junitxml=junit.xml tests | test_script: | |||
- poetry install | ||||
- poetry run pytest -n auto -q --junitxml=junit.xml tests | ||||
on_failure: | on_failure: | |||
annotate_failure_artifacts: | annotate_failure_artifacts: | |||
path: junit.xml | path: junit.xml | |||
format: junit | format: junit | |||
type: text/xml | type: text/xml | |||
release_task: | ||||
name: "Release / FreeBSD" | ||||
only_if: $CIRRUS_TAG != '' | ||||
env: | ||||
GITHUB_TOKEN: ENCRYPTED[2b573a2d28a03523ac6fb5b3c2f513a41c0a98db81e40e50e1d1 | ||||
03b171f85c57e58ae38d957499dbf7fd7635cfcfd7be] | ||||
PYTHON: python3.8 | ||||
PYTHON27: python2.7 | ||||
PYTHON36: python3.6 | ||||
PYTHON37: python3.7 | ||||
PYTHON38: python3.8 | ||||
freebsd_instance: | ||||
matrix: | ||||
- image_family: freebsd-12-2 | ||||
- image_family: freebsd-13-0-snap | ||||
- image_family: freebsd-11-4-snap | ||||
python_script: pkg install -y curl bash jq python3 python27 python36 python37 | ||||
python38 | ||||
pip_script: | ||||
- python2.7 -m ensurepip | ||||
- python3.6 -m ensurepip | ||||
- python3.7 -m ensurepip | ||||
- python3.8 -m ensurepip | ||||
build_script: bash ./make-nix-release.sh | ||||
upload_script: | | ||||
#!/usr/bin/env bash | ||||
if [[ "$CIRRUS_RELEASE" == "" ]]; then | ||||
CIRRUS_RELEASE=$(curl -sL https://api.github.com/repos/$CIRRUS_REPO_FULL_N | ||||
AME/releases/tags/$CIRRUS_TAG | jq -r '.id') | ||||
if [[ "$CIRRUS_RELEASE" == "null" ]]; then | ||||
echo "Failed to find a release associated with this tag!" | ||||
exit 0 | ||||
fi | ||||
fi | ||||
if [[ "$GITHUB_TOKEN" == "" ]]; then | ||||
echo "Please provide GitHub access token via GITHUB_TOKEN environment vari | ||||
able!" | ||||
exit 1 | ||||
fi | ||||
for fpath in releases/* | ||||
do | ||||
echo "Uploading $fpath..." | ||||
name=$(basename "$fpath") | ||||
url_to_upload="https://uploads.github.com/repos/$CIRRUS_REPO_FULL_NAME/rel | ||||
eases/$CIRRUS_RELEASE/assets?name=$name" | ||||
echo "Uploading to $url_to_upload" | ||||
curl -X POST \ | ||||
--data-binary @$fpath \ | ||||
--header "Authorization: token $GITHUB_TOKEN" \ | ||||
--header "Content-Type: application/octet-stream" \ | ||||
$url_to_upload | ||||
done | ||||
archive_artifacts: | ||||
path: "releases/*" | ||||
End of changes. 8 change blocks. | ||||
7 lines changed or deleted | 20 lines changed or added |