perf(buffer): Move system check to precondition #15953
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: | |
- master | |
# Run actions on PRs, but only deploy on master | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
RELAY_CARGO_ARGS: "--locked" | |
jobs: | |
cargo_docs: | |
name: Cargo Docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install libcurl-dev | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libcurl4-openssl-dev | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Rust Toolchain | |
run: rustup toolchain install stable --profile minimal --component rust-docs --no-self-update | |
- uses: swatinem/rust-cache@v2 | |
with: | |
key: ${{ github.job }} | |
- name: Build Docs | |
run: cargo doc --workspace --all-features --no-deps | |
env: | |
RUSTDOCFLAGS: -Dwarnings | |
- run: echo '<meta http-equiv="refresh" content="0; url=relay/" />Redirecting to <a href="relay/">relay</a>' > target/doc/index.html | |
- name: Deploy | |
if: github.ref == 'refs/heads/master' | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: target/doc | |
metrics_docs: | |
name: Metrics Docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust Toolchain | |
run: rustup toolchain install stable --profile minimal --no-self-update | |
- uses: swatinem/rust-cache@v2 | |
with: | |
key: ${{ github.job }} | |
- name: Document Metrics | |
run: cargo run -p document-metrics -- -o relay_metrics.json | |
relay-kafka/src/statsd.rs | |
relay-metrics/src/statsd.rs | |
relay-server/src/statsd.rs | |
relay-system/src/statsd.rs | |
- name: Deploy | |
if: github.ref == 'refs/heads/master' | |
env: | |
GITHUB_TOKEN: ${{ secrets.DATA_SCHEMAS_GITHUB_TOKEN }} | |
run: | | |
git config --global user.name "$(git log -1 --pretty=format:%an $GITHUB_SHA)" | |
git config --global user.email "$(git log -1 --pretty=format:%ae $GITHUB_SHA)" | |
git clone https://getsentry-bot:[email protected]/getsentry/sentry-docs | |
cd sentry-docs/ | |
mv ../relay_metrics.json src/data/relay_metrics.json | |
git add src/data/relay_metrics.json | |
echo "attempting commit" | |
if ! git commit -m "getsentry/relay@$GITHUB_SHA" ; then | |
echo "Stopping, no changes" | |
exit 0 | |
fi | |
for i in 1 2 3 4 5; do | |
echo "git push; Attempt $i" | |
if git push; then | |
exit 0 | |
fi | |
git pull --rebase | |
done | |
echo "Failed to push" | |
exit 1 |