-
Notifications
You must be signed in to change notification settings - Fork 1
115 lines (104 loc) · 2.91 KB
/
kubernator.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: kubernator
on:
pull_request:
branches:
- master
- develop
push:
branches:
- master
- develop
jobs:
build:
runs-on: ${{ matrix.os }}
permissions:
packages: write
contents: read
continue-on-error: false
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
python-version:
- '3.12'
- '3.11'
- '3.10'
- '3.9'
#include:
# - os: macos-12
# python-version: '3.11'
env:
DEPLOY_PYTHONS: "3.11"
DEPLOY_OSES: "Linux"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
steps:
# - name: Install Podman on MacOS
# if: |
# runner.os == 'macOS'
#
# shell: bash
# run: |
# set -x
# brew update
# brew install podman
# podman machine init
# podman machine start
# podman info
# - name: Install HyperKit on MacOS
# if: |
# runner.os == 'macOS'
#
# shell: bash
# run: |
# set -x
# brew update
# brew install hyperkit
# hyperkit -v
- name: Install Docker on MacOS
if: |
runner.os == 'macOS'
shell: bash
run: |
set -x
brew update
brew install docker colima
colima version
colima start --cpu 3 --memory 8 --disk 7
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
while ! docker info > /dev/null 2>&1; do sleep 1 ; done
docker info
- name: Should Upload
if: |
github.event_name == 'push' &&
contains(env.DEPLOY_OSES, runner.os) &&
contains(env.DEPLOY_PYTHONS, matrix.python-version)
shell: bash
run: echo "PYB_EXTRA_ARGS=+upload" >> "$GITHUB_ENV"
- name: Login to GitHub Container Registry for Upload
if: |
github.event_name == 'push' &&
contains(env.DEPLOY_OSES, runner.os) &&
contains(env.DEPLOY_PYTHONS, matrix.python-version)
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build with PyBuilder
uses: pybuilder/build@master
with:
homebrew-python: true
python-version: ${{ matrix.python-version }}
pyb-extra-args: ${{ env.PYB_EXTRA_ARGS }}
build-summary:
if: success() || failure()
runs-on: ubuntu-latest
name: Build Stable Summary
needs: build
steps:
- name: Check build matrix status
if: needs.build.result != 'success'
run: exit 1