Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add check build #92

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/labels.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,11 @@
"color": "F9D0C4",
"description": "Runs benchmarks",
"aliases": ["ci:benchmark"]
},
{
"name": "ci: build matrix",
"color": "FFFF00",
"description": "Build pr on all platforms",
"aliases": ["ci: build matrix"]
}
]
48 changes: 35 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,12 @@ jobs:
create_release_name: ${{ steps.set_output.outputs.create_release_name }}
create_release_id: ${{ steps.set_output.outputs.create_release_id }}

# TODO: move to separate file to separate responsibilities
release:
name: Release
needs: [test, draft_release, check_if_build, test_cf]
# TODO: put a condition to separate job that other will depend on to remove duplication?
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && (needs.check_if_build.outputs.check_if_build == 'true')
build_all:
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/main') || contains(github.event.pull_request.labels.*.name, 'ci: build matrix')
runs-on: ${{ matrix.os }}
outputs:
build_all: ${{ steps.build_all.outputs.build_all }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -265,13 +264,6 @@ jobs:
cross: true
libc: glibc
ext: ".exe"
permissions:
contents: write
pull-requests: write
env:
GITHUB_TOKEN: ${{secrets.GITHUBTOKEN}}
APP_VERSION: ${{ needs.draft_release.outputs.create_release_name }}

steps:
- name: Checkout Current Branch (Fast)
uses: actions/checkout@v4
Expand All @@ -290,6 +282,36 @@ jobs:
use-cross: ${{ matrix.cross }}
command: build
args: ${{matrix.features}} --release --target ${{ matrix.target }}
permissions:
contents: write
pull-requests: write
env:
GITHUB_TOKEN: ${{secrets.GITHUBTOKEN}}

# TODO: move to separate file to separate responsibilities
release:
name: Release
needs: [test, draft_release, check_if_build, test_cf, build_all]
# TODO: put a condition to separate job that other will depend on to remove duplication?
if: (github.event_name == 'push' && github.ref == 'refs/heads/main' && (needs.check_if_build.outputs.check_if_build == 'true') && (needs.build_all.outputs.build_all == 'true'))
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
permissions:
contents: write
pull-requests: write
env:
GITHUB_TOKEN: ${{secrets.GITHUBTOKEN}}
APP_VERSION: ${{ needs.draft_release.outputs.create_release_name }}

steps:
- name: Checkout Current Branch (Fast)
uses: actions/checkout@v4

- name: Install Correct Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: ${{ matrix.target }}

- name: Install Node.js
if: (startsWith(github.event.head_commit.message, 'feat') || startsWith(github.event.head_commit.message, 'fix')) && (github.event_name == 'push' && github.ref == 'refs/heads/main')
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ reqwest = { version = "0.11", features = [
], default-features = false }
# TODO: Modification with the ability to set a parsed GraphQL operation.
# Remove this once https://github.com/async-graphql/async-graphql/pull/1483/files is merged
async-graphql = { git = "https://github.com/tusharmath/async-graphql.git", branch = "add-setter", features = [
async-graphql = { git = "https://github.com/tailcallhq/async-graphql.git", branch = "add-setter", features = [
"dynamic-schema",
"dataloader",
"apollo_tracing",
"opentelemetry",
] }
# TODO: Modification with the ability to set a parsed GraphQL operation.
# Remove this once https://github.com/async-graphql/async-graphql/pull/1483/files is merged
async-graphql-value = { git = "https://github.com/tusharmath/async-graphql.git", branch = "add-setter" }
async-graphql-value = { git = "https://github.com/tailcallhq/async-graphql.git", branch = "add-setter" }
indexmap = "2.2"
once_cell = "1.19.0"
clap = { version = "4.5.2", features = ["derive"] }
Expand Down Expand Up @@ -127,8 +127,8 @@ async-graphql-extension-apollo-tracing = { git = "https://github.com/tailcallhq/

[patch.crates-io]
# TODO: update this once https://github.com/haixuanTao/opentelemetry-system-metrics/pull/2 gets merged
async-graphql-value = {git ="https://github.com/tusharmath/async-graphql.git", branch = "add-setter"}
async-graphql = {git ="https://github.com/tusharmath/async-graphql.git", branch = "add-setter"}
async-graphql-value = {git ="https://github.com/tailcallhq/async-graphql.git", branch = "add-setter"}
async-graphql = {git ="https://github.com/tailcallhq/async-graphql.git", branch = "add-setter"}

[dev-dependencies]
criterion = "0.5.1"
Expand Down
2 changes: 1 addition & 1 deletion cloudflare/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async-std = "1.12.0"
tracing = "0.1.40"
tracing-subscriber = "0.3.18"
tracing-subscriber-wasm = "0.1.0"
async-graphql-value = {git ="https://github.com/tusharmath/async-graphql.git", branch = "add-setter"}
async-graphql-value = {git ="https://github.com/tailcallhq/async-graphql.git", branch = "add-setter"}
serde_json = "1.0.114"
serde_qs = "0.12.0"
console_error_panic_hook = "0.1.7"
Expand Down
Loading