macos ci
This commit is contained in:
parent
526e7d3fa9
commit
81ca1e2c25
3 changed files with 34 additions and 2 deletions
5
.github/workflows/main.yml
vendored
5
.github/workflows/main.yml
vendored
|
@ -9,12 +9,13 @@ env:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
platform: [ubuntu-latest, macos-latest] # TODO windows-latest??
|
||||||
python-version: [3.6, 3.7, 3.8]
|
python-version: [3.6, 3.7, 3.8]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# fuck me. https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
|
# fuck me. https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
|
||||||
- run: echo "::add-path::$HOME/.local/bin"
|
- run: echo "::add-path::$HOME/.local/bin"
|
||||||
|
|
|
@ -3,5 +3,22 @@
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
|
if ! command -v sudo; then
|
||||||
|
# CI or Docker sometimes doesn't have it, so useful to have a dummy
|
||||||
|
function sudo {
|
||||||
|
"$@"
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [ -z "$CI" ]; then
|
||||||
|
# install OS specific stuff here
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
# macos
|
||||||
|
:
|
||||||
|
else
|
||||||
|
:
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
pip3 install --user tox
|
pip3 install --user tox
|
||||||
tox
|
tox
|
||||||
|
|
|
@ -1,4 +1,18 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
'''
|
||||||
|
Run [[file:scripts/release][scripts/release]] to deploy Python package onto [[https://pypi.org][PyPi]] and [[https://test.pypi.org][test PyPi]].
|
||||||
|
|
||||||
|
The script expects =TWINE_PASSWORD= environment variable to contain the [[https://pypi.org/help/#apitoken][PyPi token]] (not the password!).
|
||||||
|
|
||||||
|
The script can be run manually.
|
||||||
|
It's also running as =pypi= job in [[file:.github/workflows/main.yml][Github Actions config]]. Packages are deployed on:
|
||||||
|
- every master commit, onto test pypi
|
||||||
|
- every new tag, onto production pypi
|
||||||
|
|
||||||
|
You'll need to set =TWINE_PASSWORD= and =TWINE_PASSWORD_TEST= in [[https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets][secrets]]
|
||||||
|
for Github Actions deployment to work.
|
||||||
|
'''
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
Loading…
Add table
Reference in a new issue