Skip to content

Commit

Permalink
build binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
kylegalbraith committed Nov 2, 2024
1 parent f7845be commit 444ffa3
Show file tree
Hide file tree
Showing 2 changed files with 114 additions and 1 deletion.
113 changes: 113 additions & 0 deletions .github/workflows/rust-build-benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: cli (benchmark Depot)

on:
workflow_dispatch:
pull_request:
push:
branches:
- "main"

env:
GRAFBASE_SKIP_ASSET_VERSION_CHECK: "true"
CARGO_TERM_COLOR: "always"
CARGO_PROFILE_DEV_DEBUG: 0
CARGO_PROFILE_TEST_DEBUG: 0
DO_NOT_TRACK: 1
GRAFBASE_RUDDERSTACK_WRITE_KEY: ${{ secrets.GRAFBASE_RUDDERSTACK_WRITE_KEY }}
GRAFBASE_RUDDERSTACK_DATAPLANE_URL: ${{ secrets.GRAFBASE_RUDDERSTACK_DATAPLANE_URL }}
CLI_RELEASE_CLOUDFLARE_R2_ENDPOINT_URL: https://d267a8ab95268b272f5147e8939c9d38.r2.cloudflarestorage.com
CLI_RELEASE_CLOUDFLARE_R2_PUBLIC_URL: https://pub-b0013effd6614b32a4fb9bf338b90658.r2.dev
CLI_RELEASE_CLOUDFLARE_R2_BUCKET_NAME: cli-releases

jobs:
individual-builds-without-depot:
strategy:
fail-fast: false
matrix:
package:
[
grafbase-local-common,
grafbase-local-server,
grafbase-local-backend,
grafbase,
grafbase-gateway,
federated-server,
]
runs-on: ubuntu-latest
steps:
- name: Get sources
uses: actions/checkout@v4

- name: Rust job init
uses: ./.github/actions/init_rust_job
with:
platform: linux
cache-key: ${{ runner.os }}-${{ runner.arch }}-cargo-build-${{ matrix.package }}-${{ hashFiles('Cargo.lock') }}
restore-key: ${{ runner.os }}-${{ runner.arch }}-cargo-build

- name: Build assets
if: ${{ matrix.package != 'grafbase-gateway' }}
uses: ./.github/actions/cli_assets

- name: Individual package build
shell: bash
run: |
set -euo pipefail
# The actual features used for each dependency depends on what is being built simultaneously.
# However, each package is published individually, so we're checking that all packages compile
# with only their defined features.
# See: https://github.com/rust-lang/cargo/issues/4463
cargo check --all-features --package ${{ matrix.package }}
- name: Individual package without lambda
if: ${{ matrix.package == 'grafbase-gateway' }}
shell: bash
run: |
set -euo pipefail
cargo check --package ${{ matrix.package }}
individual-builds-with-depot:
strategy:
fail-fast: false
matrix:
package:
[
grafbase-local-common,
grafbase-local-server,
grafbase-local-backend,
grafbase,
grafbase-gateway,
federated-server,
]
runs-on: depot-ubuntu-latest
steps:
- name: Get sources
uses: actions/checkout@v4

- name: Rust job init
uses: ./.github/actions/init_rust_job
with:
platform: linux
cache-key: ${{ runner.os }}-${{ runner.arch }}-cargo-build-${{ matrix.package }}-${{ hashFiles('Cargo.lock') }}
restore-key: ${{ runner.os }}-${{ runner.arch }}-cargo-build

- name: Build assets
if: ${{ matrix.package != 'grafbase-gateway' }}
uses: ./.github/actions/cli_assets

- name: Individual package build
shell: bash
run: |
set -euo pipefail
# The actual features used for each dependency depends on what is being built simultaneously.
# However, each package is published individually, so we're checking that all packages compile
# with only their defined features.
# See: https://github.com/rust-lang/cargo/issues/4463
cargo check --all-features --package ${{ matrix.package }}
- name: Individual package without lambda
if: ${{ matrix.package == 'grafbase-gateway' }}
shell: bash
run: |
set -euo pipefail
cargo check --package ${{ matrix.package }}
2 changes: 1 addition & 1 deletion upstream

0 comments on commit 444ffa3

Please sign in to comment.