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: cli rust build benchmark 1 | |
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 | |
with: | |
submodules: recursive | |
- name: Rust job init | |
uses: ./upstream/.github/actions/init_rust_job | |
with: | |
platform: linux | |
- name: Build assets | |
if: ${{ matrix.package != 'grafbase-gateway' }} | |
uses: ./upstream/.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 | |
with: | |
submodules: recursive | |
- name: Rust job init | |
uses: ./upstream/.github/actions/init_rust_job | |
with: | |
platform: linux | |
- name: Build assets | |
if: ${{ matrix.package != 'grafbase-gateway' }} | |
uses: ./upstream/.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 }} |