-
-
Notifications
You must be signed in to change notification settings - Fork 5
84 lines (80 loc) · 2.71 KB
/
build.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
name: build
on:
pull_request:
push:
branches: [main, test-me-*]
concurrency:
# serialize runs on the default branch
group: ${{ github.event_name == 'push' && github.workflow || github.sha }}${{ github.workflow }}
jobs:
linux:
runs-on: ubuntu-latest
container: ghcr.io/getsentry/pypi-manylinux-amd64-ci
steps:
- uses: actions/checkout@v3
- run: python3 -um build --pypi-url https://pypi.devinfra.sentry.io
- run: python3 -um validate --index-url https://pypi.devinfra.sentry.io/simple
- uses: actions/upload-artifact@v4
with:
name: dist-linux
path: dist/*
macos:
strategy:
matrix:
runs-on: [macos-14, macos-13]
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v3
- run: |
# work around https://github.com/indygreg/python-build-standalone/issues/208
HOMEBREW_NO_AUTO_UPDATE=1 brew install gnu-tar
echo "$(brew --prefix gnu-tar)/libexec/gnubin" >> "$GITHUB_PATH"
- run: python3 -u docker/install-pythons --dest pythons
- run: |
echo "$PWD/pythons/cp311-cp311/bin" >> "$GITHUB_PATH"
echo "$PWD/pythons/cp312-cp312/bin" >> "$GITHUB_PATH"
echo "$PWD/pythons/cp313-cp313/bin" >> "$GITHUB_PATH"
echo "$PWD/venv/bin" >> "$GITHUB_PATH"
- run: python3 -um venv venv && pip install -r docker/requirements.txt
- run: python3 -um build --pypi-url https://pypi.devinfra.sentry.io
- run: python3 -um validate --index-url https://pypi.devinfra.sentry.io/simple
- uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.runs-on }}
path: dist/*
cirrus:
if: github.event_name != 'pull_request'
strategy:
matrix:
task: [linux-arm64]
runs-on: ubuntu-latest
permissions:
checks: read
steps:
- uses: getsentry/[email protected]
with:
task: ${{ matrix.task }}
timeout-minutes: 60
- uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.task }}
path: dist/*
collect-and-deploy:
needs: [linux, macos, cirrus]
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: pip install -r docker/requirements.txt
- uses: actions/download-artifact@v4
with:
path: dist
- run: python3 -um make_index --pypi-url https://pypi.devinfra.sentry.io --dest index
- uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.PYPI_DEVINFRA_SENTRY_IO }}
- run: yes | gcloud auth login --cred-file="$GOOGLE_APPLICATION_CREDENTIALS"
- run: python3 -uS bin/upload-artifacts