-
Notifications
You must be signed in to change notification settings - Fork 4
135 lines (113 loc) · 3.81 KB
/
Copy pathmain.yml
File metadata and controls
135 lines (113 loc) · 3.81 KB
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
name: main
on:
push:
branches:
- main
# Main only publishes the latest commit; cancel any in-flight run when a newer
# push lands so we don't waste an hour racing against ourselves.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_and_test:
runs-on:
- benchmark
steps:
- uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
project_id: ${{ secrets.GCP_SERVICE_ACCOUNT_PROJECT_ID }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Build and Run Tests
env:
# Single job runs both protocols in parallel via run_test_container.sh
# rather than spinning up two matrix runners that each rebuild every
# docker image.
TEST_PROTOCOL: both
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GCP_SERVICE_ACCOUNT_KEY: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
RUNNER_NAME: ${{ runner.name }}_main
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
ADB_REPO: aperturedata/aperturedb
ADB_TAG: dev
LENZ_REPO: aperturedata/lenz
LENZ_TAG: dev
run: RUN_TESTS=true ./ci.sh
shell: bash
build_notebooks_and_publish_pypi:
needs:
- build_and_test
runs-on:
- benchmark
steps:
- uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Build Notebook
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
RUNNER_NAME: ${{ runner.name }}
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1
ADB_REPO: aperturedata/aperturedb
ADB_TAG: dev
LENZ_REPO: aperturedata/lenz
LENZ_TAG: dev
run: BUILD_COMPLETE=true ./ci.sh
shell: bash
- name: Publish to PyPi
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
bash publish.sh
- name: Tag release version
run: './tag.sh'
shell: bash
- name: GitHub Release
run: 'TOKEN=${{ secrets.GITHUBPAT }} ./github-release.sh'
shell: bash
trigger_demos_buils:
runs-on: ubuntu-latest
needs:
- build_notebooks_and_publish_pypi
steps:
- uses: actions/checkout@v3
- name: repository dispatch
run: |
curl -X POST https://api.github.com/repos/aperture-data/demos/actions/workflows/13727133/dispatches \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUBPAT }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-d '{"ref":"master","inputs":{}}'
shell: bash
trigger_docs_deploy:
runs-on: ubuntu-latest
needs:
- build_notebooks_and_publish_pypi
steps:
- uses: actions/checkout@v3
- name: repository dispatch
run: |
curl -X POST https://api.github.com/repos/aperture-data/docs/actions/workflows/64451786/dispatches \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUBPAT }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-d '{"ref":"main","inputs":{}}'
shell: bash