-
-
Notifications
You must be signed in to change notification settings - Fork 36
148 lines (139 loc) · 4.64 KB
/
CD.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# This workflow is where we publish the PSI library to the various CDNs such as
# PyPi, NPM, etc.
#
# We're making the decision to publish only if all tests for all supported
# platforms and runtime versions have passed. The accepted tradeoff is that we
# reduce the risk of publishing builds that are not compatable with each other
# but increase time to delivery. We're okay with a delay becasue of
# optimizations in CI testing that offset the turn-around testing bug fixes.
name: CD
on:
release:
types: [created]
jobs:
Core:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, macos-14]
steps:
- uses: actions/checkout@v4
- name: Run tests nix
timeout-minutes: 60
run: .github/workflows/scripts/run_tests_core.sh
- name: Linters
run: .github/workflows/scripts/lint_cpp.sh
if: ${{ matrix.os == 'ubuntu-24.04' }}
JS:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, macos-14]
steps:
- uses: actions/checkout@v4
- name: Run tests nix
timeout-minutes: 60
run: .github/workflows/scripts/run_tests_js.sh
Python:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, macos-14]
# Bazel uses hermetic python, these are just placeholders
python-version: ['3_8', '3_9', '3_10', '3_11']
steps:
- uses: actions/checkout@v4
# configuring python for bazel abi and platform repo rules
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Python deps
run: |
python -m pip install --upgrade pip
pip install --upgrade packaging
- name: Run tests nix
timeout-minutes: 30
run: bazel test --test_output=all //private_set_intersection/python:test_${{ matrix.python-version }}
Go:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, macos-14]
golang-version: ['1.23']
steps:
- name: Set up Golang ${{ matrix.golang-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.golang-version }}
id: go
- name: Install Go dependencies
run: go install golang.org/x/lint/golint@latest
- uses: actions/checkout@v4
- name: Run tests nix
timeout-minutes: 30
run: .github/workflows/scripts/run_tests_go.sh
- name: Go linters
run: .github/workflows/scripts/lint_go.sh
Rust:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04, macos-14]
steps:
- name: Install toolchains
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
- uses: actions/checkout@v4
- name: Run tests nix
timeout-minutes: 30
run: .github/workflows/scripts/run_tests_rust.sh
# Publish python releases only if all other tests have passed after creating a
# release.
Publish-python-legacy:
needs: [Core, JS, Go, Python, Rust]
if: ${{ github.event_name == 'release' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Handling boundary conditions of: https://github.com/pypa/manylinux
python-version: ['3.8.0', '3.8.4', '3.9.0']
os: [ubuntu-20.04, macos-12]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build and publish the python wheel
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.OM_PSI_PYPI_TOKEN }}
run: |
python -m pip install --upgrade pip
pip install --upgrade packaging
bazel run -c opt //private_set_intersection/python:wheel.publish -- --verbose --skip-existing
Publish-python:
needs: [Core, JS, Go, Python, Rust]
if: ${{ github.event_name == 'release' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, macos-14]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build and publish the python wheel
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.OM_PSI_PYPI_TOKEN }}
run: |
python -m pip install --upgrade pip
pip install --upgrade packaging
bazel run -c opt //private_set_intersection/python:wheel.publish -- --verbose --skip-existing