-
Notifications
You must be signed in to change notification settings - Fork 11
151 lines (147 loc) · 5.5 KB
/
nightly.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
149
150
151
name: Runner Releases
on:
workflow_dispatch:
# schedule:
# - cron: '0 9 * * *'
env:
CARGO_TERM_COLOR: always
jobs:
nightly_release_x86_mac:
name: Native Build x86_64-apple-darwin
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- run: rustup default stable
- uses: Swatinem/rust-cache@v2
- run: pip3 install toml maturin==0.14.13
- run: python3 ci/build.py --target x86_64-apple-darwin --release --nightly --runner_release_dir /tmp/runner_releases --c_cpp_bindings_release_dir /tmp/bindings_releases
- name: Upload runners
uses: actions/upload-artifact@v3
with:
name: runners-x86_64-apple-darwin
path: /tmp/runner_releases
- name: Upload python wheels
uses: actions/upload-artifact@v3
with:
name: py-wheels-macos-x86
path: target/wheels/
- name: Upload C/C++ bindings
uses: actions/upload-artifact@v3
with:
name: c-cpp-bindings-x86_64-apple-darwin
path: /tmp/bindings_releases
nightly_release_mac_aarch64:
name: "Native Build macOS aarch64"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- run: pip3 install gql[requests]
- name: Wait for Cirrus CI builds to finish
run: python3 ci/trigger_cirrus_build.py
env:
CIRRUS_AUTH: ${{ secrets.CIRRUS_AUTH }}
- name: Upload runners
uses: actions/upload-artifact@v3
with:
name: runners-macos-aarch64
path: /tmp/runner_releases
- name: Upload python wheels
uses: actions/upload-artifact@v3
with:
name: py-wheels-macos-aarch64
path: /tmp/target/wheels/
- name: Upload C/C++ bindings
uses: actions/upload-artifact@v3
with:
name: c-cpp-bindings-macos-aarch64
path: /tmp/bindings_releases
nightly_release_buildkite:
name: "Native Builds Linux (x86_64 and aarch64)"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- run: pip3 install requests
- name: Wait for Buildkite builds to finish
run: python3 ci/trigger_buildkite_build.py
env:
BUILDKITE_TOKEN: ${{ secrets.BUILDKITE_TOKEN }}
- name: Upload runners
uses: actions/upload-artifact@v3
with:
name: runners-linux
path: /tmp/target/runner_releases
- name: Upload python wheels
uses: actions/upload-artifact@v3
with:
name: py-wheels-linux
path: /tmp/target/wheels/
- name: Upload C/C++ bindings
uses: actions/upload-artifact@v3
with:
name: c-cpp-bindings-linux
path: /tmp/target/bindings_releases
upload_nightly_builds:
name: "Upload nightly builds"
needs: [nightly_release_mac_aarch64, nightly_release_x86_mac, nightly_release_buildkite]
runs-on: ubuntu-latest
environment: nightly
steps:
- name: Checkout
uses: actions/checkout@v3
- run: mkdir /tmp/artifacts
- uses: actions/download-artifact@v3
with:
path: /tmp/artifacts
- name: Upload artifacts and generate config
run: cargo run --package carton-runner-packager --bin ci_upload_releases
env:
NIGHTLY_REPO_TOKEN: ${{ secrets.NIGHTLY_REPO_TOKEN }}
CARTON_NIGHTLY_S3_BUCKET: ${{ vars.CARTON_NIGHTLY_S3_BUCKET }}
CARTON_NIGHTLY_S3_REGION: ${{ vars.CARTON_NIGHTLY_S3_REGION }}
CARTON_NIGHTLY_S3_ENDPOINT: ${{ secrets.CARTON_NIGHTLY_S3_ENDPOINT }}
CARTON_NIGHTLY_ACCESS_KEY_ID: ${{ secrets.CARTON_NIGHTLY_ACCESS_KEY_ID }}
CARTON_NIGHTLY_SECRET_ACCESS_KEY: ${{ secrets.CARTON_NIGHTLY_SECRET_ACCESS_KEY }}
- name: Upload wheels to PyPi
run: >
pip3 install twine &&
twine upload /tmp/artifacts/py-wheels-linux/* /tmp/artifacts/py-wheels-macos-aarch64/* /tmp/artifacts/py-wheels-macos-x86/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_NIGHTLY_TOKEN }}
TWINE_NON_INTERACTIVE: true
- name: Upload C and C++ bindings
run: cargo run --package build-utils --bin upload_c_cpp_bindings
env:
CARTON_NIGHTLY_S3_BUCKET: ${{ vars.CARTON_NIGHTLY_S3_BUCKET }}
CARTON_NIGHTLY_S3_REGION: ${{ vars.CARTON_NIGHTLY_S3_REGION }}
CARTON_NIGHTLY_S3_ENDPOINT: ${{ secrets.CARTON_NIGHTLY_S3_ENDPOINT }}
CARTON_NIGHTLY_ACCESS_KEY_ID: ${{ secrets.CARTON_NIGHTLY_ACCESS_KEY_ID }}
CARTON_NIGHTLY_SECRET_ACCESS_KEY: ${{ secrets.CARTON_NIGHTLY_SECRET_ACCESS_KEY }}
build_wasm:
name: WASM Build wasm32-unknown-unknown
runs-on: ubuntu-latest
environment: nightly
steps:
- name: Checkout
uses: actions/checkout@v3
- run: rustup target add wasm32-unknown-unknown
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- run: npm install -g wasm-pack yarn@1.22.19
- name: Update version
run: >
cd source/carton-bindings-wasm &&
cat package.json | jq '.version += (now | strftime("-dev%Y%m%d"))' | tee package.json
- run: >
cd source/carton-bindings-wasm && ./build.sh &&
cd tests && yarn install && node basic.js
- name: Publish to NPM
run: >
cd source/carton-bindings-wasm/dist && npm publish --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}