-
Notifications
You must be signed in to change notification settings - Fork 0
Build the RockQL v0.1 compiler foundation #2
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
Open
SayanthRock
wants to merge
7
commits into
main
Choose a base branch
from
agent/compiler-foundation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ec04b01
Add RockQL AST and parser foundation
SayanthRock e0fcd9d
Add SQL generators formatter and CLI
SayanthRock 9205703
Document MVP and add project workflows
SayanthRock b86718b
Add temporary branch formatter
SayanthRock ad7e542
Format Rust sources
github-actions[bot] 75d8975
Remove temporary branch formatter
SayanthRock b9a2c16
Make dependency review bootstrap-safe
SayanthRock File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| name: Android build | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - "apps/android/**" | ||
| - "gradle/**" | ||
| - "gradlew" | ||
| - "gradlew.bat" | ||
| - "settings.gradle.kts" | ||
| - "build.gradle.kts" | ||
| - ".github/workflows/android-build.yml" | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "apps/android/**" | ||
| - "gradle/**" | ||
| - "gradlew" | ||
| - "gradlew.bat" | ||
| - "settings.gradle.kts" | ||
| - "build.gradle.kts" | ||
| - ".github/workflows/android-build.yml" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Detect Android application | ||
| id: android | ||
| run: | | ||
| if [ -f gradlew ] && [ -d apps/android ]; then | ||
| echo "enabled=true" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "enabled=false" >> "$GITHUB_OUTPUT" | ||
| echo "Android application is not implemented yet; build skipped." | ||
| fi | ||
| - uses: actions/setup-java@v4 | ||
| if: steps.android.outputs.enabled == 'true' | ||
| with: | ||
| distribution: temurin | ||
| java-version: 21 | ||
| cache: gradle | ||
| - uses: gradle/actions/setup-gradle@v4 | ||
| if: steps.android.outputs.enabled == 'true' | ||
| - run: ./gradlew :apps:android:lintDebug :apps:android:testDebugUnitTest :apps:android:assembleDebug | ||
| if: steps.android.outputs.enabled == 'true' | ||
| - uses: actions/upload-artifact@v4 | ||
| if: steps.android.outputs.enabled == 'true' | ||
| with: | ||
| name: rockql-android-debug | ||
| path: apps/android/build/outputs/apk/debug/*.apk |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| rust: | ||
| name: Rust quality | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| components: rustfmt, clippy | ||
| - name: Formatting | ||
| run: cargo fmt --all -- --check | ||
| - name: Clippy | ||
| run: cargo clippy --workspace --all-targets -- -D warnings |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| name: Documentation | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - "README.md" | ||
| - "docs/**" | ||
| - "CONTRIBUTING.md" | ||
| - "CODE_OF_CONDUCT.md" | ||
| - "SECURITY.md" | ||
| - ".github/workflows/docs.yml" | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "README.md" | ||
| - "docs/**" | ||
| - "CONTRIBUTING.md" | ||
| - "CODE_OF_CONDUCT.md" | ||
| - "SECURITY.md" | ||
| - ".github/workflows/docs.yml" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| quality: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Check Markdown whitespace | ||
| run: | | ||
| python - <<'PY' | ||
| from pathlib import Path | ||
| files = [Path("README.md"), Path("CONTRIBUTING.md"), Path("CODE_OF_CONDUCT.md"), Path("SECURITY.md")] | ||
| files.extend(Path("docs").rglob("*.md")) | ||
| failures = [] | ||
| for path in files: | ||
| for number, line in enumerate(path.read_text(encoding="utf-8").splitlines(), 1): | ||
| if line != line.rstrip(): | ||
| failures.append(f"{path}:{number}: trailing whitespace") | ||
| if "\t" in line: | ||
| failures.append(f"{path}:{number}: tab character") | ||
| if failures: | ||
| raise SystemExit("\n".join(failures)) | ||
| PY |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: ["v*"] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| build: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - os: ubuntu-latest | ||
| target: x86_64-unknown-linux-gnu | ||
| artifact: rockql-linux-x64 | ||
| binary: rockql | ||
| - os: ubuntu-24.04-arm | ||
| target: aarch64-unknown-linux-gnu | ||
| artifact: rockql-linux-arm64 | ||
| binary: rockql | ||
| - os: windows-latest | ||
| target: x86_64-pc-windows-msvc | ||
| artifact: rockql-windows-x64 | ||
| binary: rockql.exe | ||
| - os: macos-13 | ||
| target: x86_64-apple-darwin | ||
| artifact: rockql-macos-x64 | ||
| binary: rockql | ||
|
SayanthRock marked this conversation as resolved.
|
||
| - os: macos-14 | ||
| target: aarch64-apple-darwin | ||
| artifact: rockql-macos-arm64 | ||
| binary: rockql | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| targets: ${{ matrix.target }} | ||
| - run: cargo build --release --target ${{ matrix.target }} -p rockql-cli | ||
| - name: Stage binary | ||
| shell: python | ||
| run: | | ||
| import pathlib | ||
| import shutil | ||
| source = pathlib.Path("target") / "${{ matrix.target }}" / "release" / "${{ matrix.binary }}" | ||
| destination = pathlib.Path("dist") / "${{ matrix.artifact }}" / "${{ matrix.binary }}" | ||
| destination.parent.mkdir(parents=True, exist_ok=True) | ||
| shutil.copy2(source, destination) | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.artifact }} | ||
| path: dist/${{ matrix.artifact }} | ||
|
|
||
| publish: | ||
| if: startsWith(github.ref, 'refs/tags/') | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/download-artifact@v4 | ||
| with: | ||
| path: dist | ||
| - name: Generate checksums | ||
| run: find dist -type f -exec sha256sum {} + > dist/SHA256SUMS | ||
|
SayanthRock marked this conversation as resolved.
|
||
| - uses: softprops/action-gh-release@v2 | ||
| with: | ||
| generate_release_notes: true | ||
| files: | | ||
| dist/**/rockql | ||
| dist/**/rockql.exe | ||
| dist/SHA256SUMS | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| name: Rust tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - "Cargo.toml" | ||
| - "Cargo.lock" | ||
| - "compiler/**" | ||
| - "examples/**" | ||
| - ".github/workflows/rust-tests.yml" | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "Cargo.toml" | ||
| - "Cargo.lock" | ||
| - "compiler/**" | ||
| - "examples/**" | ||
| - ".github/workflows/rust-tests.yml" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| - run: cargo test --workspace --all-targets |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| name: Security | ||
|
|
||
| on: | ||
| pull_request: | ||
| schedule: | ||
| - cron: "17 3 * * 1" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| dependency-review: | ||
| if: github.event_name == 'pull_request' | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Review dependency changes | ||
| continue-on-error: true | ||
| uses: actions/dependency-review-action@v4 | ||
|
SayanthRock marked this conversation as resolved.
|
||
|
|
||
| audit: | ||
| if: github.event_name != 'pull_request' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| - uses: taiki-e/install-action@cargo-deny | ||
| - run: cargo deny check advisories | ||
|
|
||
| codeql: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| security-events: write | ||
| packages: read | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: github/codeql-action/init@v3 | ||
| with: | ||
| languages: rust | ||
| - uses: github/codeql-action/analyze@v3 | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| name: WebAssembly build | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - "bindings/rockql-js/**" | ||
| - "compiler/**" | ||
| - "Cargo.toml" | ||
| - "Cargo.lock" | ||
| - ".github/workflows/wasm-build.yml" | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "bindings/rockql-js/**" | ||
| - "compiler/**" | ||
| - "Cargo.toml" | ||
| - "Cargo.lock" | ||
| - ".github/workflows/wasm-build.yml" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Detect WebAssembly binding | ||
| id: wasm | ||
| run: | | ||
| if [ -f bindings/rockql-js/Cargo.toml ]; then | ||
| echo "enabled=true" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "enabled=false" >> "$GITHUB_OUTPUT" | ||
| echo "WebAssembly binding is not implemented yet; build skipped." | ||
| fi | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| if: steps.wasm.outputs.enabled == 'true' | ||
| with: | ||
| targets: wasm32-unknown-unknown | ||
| - uses: taiki-e/install-action@wasm-pack | ||
| if: steps.wasm.outputs.enabled == 'true' | ||
| - run: wasm-pack build bindings/rockql-js --target web --release | ||
| if: steps.wasm.outputs.enabled == 'true' | ||
| - uses: actions/upload-artifact@v4 | ||
| if: steps.wasm.outputs.enabled == 'true' | ||
| with: | ||
| name: rockql-wasm | ||
| path: bindings/rockql-js/pkg |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| name: Web build | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - "apps/playground/**" | ||
| - "bindings/rockql-js/**" | ||
| - "package.json" | ||
| - "package-lock.json" | ||
| - ".github/workflows/web-build.yml" | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "apps/playground/**" | ||
| - "bindings/rockql-js/**" | ||
| - "package.json" | ||
| - "package-lock.json" | ||
| - ".github/workflows/web-build.yml" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Detect playground | ||
| id: playground | ||
| run: | | ||
| if [ -f package.json ] && [ -d apps/playground ]; then | ||
| echo "enabled=true" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "enabled=false" >> "$GITHUB_OUTPUT" | ||
| echo "Playground is not implemented yet; build skipped." | ||
| fi | ||
| - uses: actions/setup-node@v4 | ||
| if: steps.playground.outputs.enabled == 'true' | ||
| with: | ||
| node-version: 22 | ||
| cache: npm | ||
| - run: npm ci | ||
| if: steps.playground.outputs.enabled == 'true' | ||
| - run: npm run typecheck --if-present | ||
| if: steps.playground.outputs.enabled == 'true' | ||
| - run: npm run build | ||
| if: steps.playground.outputs.enabled == 'true' |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| /target | ||
| **/*.rs.bk | ||
| .DS_Store | ||
| .idea/ | ||
| .vscode/ | ||
| node_modules/ | ||
| dist/ | ||
| .env |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.