Skip to content
Open
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
56 changes: 56 additions & 0 deletions .github/workflows/android-build.yml
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
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
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
45 changes: 45 additions & 0 deletions .github/workflows/docs.yml
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
74 changes: 74 additions & 0 deletions .github/workflows/release.yml
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
Comment thread
SayanthRock marked this conversation as resolved.

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
Comment thread
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
Comment thread
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
29 changes: 29 additions & 0 deletions .github/workflows/rust-tests.yml
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
45 changes: 45 additions & 0 deletions .github/workflows/security.yml
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
Comment thread
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
50 changes: 50 additions & 0 deletions .github/workflows/wasm-build.yml
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
48 changes: 48 additions & 0 deletions .github/workflows/web-build.yml
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'
8 changes: 8 additions & 0 deletions .gitignore
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
Loading
Loading