mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-05 02:29:55 +02:00
build: unify project development commands
This commit is contained in:
28
.github/workflows/apple.yml
vendored
28
.github/workflows/apple.yml
vendored
@@ -8,6 +8,9 @@ on:
|
||||
- "crates/uniffi-bindgen/**"
|
||||
- "Cargo.toml"
|
||||
- "Cargo.lock"
|
||||
- "Makefile"
|
||||
- "config.mk"
|
||||
- "make/**"
|
||||
- ".github/workflows/apple.yml"
|
||||
push:
|
||||
branches:
|
||||
@@ -18,6 +21,9 @@ on:
|
||||
- "crates/uniffi-bindgen/**"
|
||||
- "Cargo.toml"
|
||||
- "Cargo.lock"
|
||||
- "Makefile"
|
||||
- "config.mk"
|
||||
- "make/**"
|
||||
- ".github/workflows/apple.yml"
|
||||
|
||||
permissions:
|
||||
@@ -57,23 +63,5 @@ jobs:
|
||||
- name: Install XcodeGen
|
||||
run: brew install xcodegen
|
||||
|
||||
- name: Build Rust core (xcframework + Swift bindings)
|
||||
working-directory: apple
|
||||
run: ./scripts/build-core.sh debug
|
||||
|
||||
- name: Generate Xcode project
|
||||
working-directory: apple
|
||||
run: xcodegen generate
|
||||
|
||||
- name: Run unit tests (iOS Simulator)
|
||||
working-directory: apple
|
||||
run: |
|
||||
set -euo pipefail
|
||||
DEVICE=$(xcrun simctl list devices available \
|
||||
| grep -oE 'iPhone [0-9]+( Pro)?' | head -1)
|
||||
echo "Testing on: ${DEVICE:-iPhone 16}"
|
||||
xcodebuild test \
|
||||
-project VniDrop.xcodeproj \
|
||||
-scheme VniDrop \
|
||||
-destination "platform=iOS Simulator,name=${DEVICE:-iPhone 16}" \
|
||||
CODE_SIGNING_ALLOWED=NO
|
||||
- name: Build and test Apple app
|
||||
run: make check-apple
|
||||
|
||||
25
.github/workflows/diagnostics-api.yml
vendored
25
.github/workflows/diagnostics-api.yml
vendored
@@ -4,12 +4,18 @@ on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "services/diagnostics-api/**"
|
||||
- "Makefile"
|
||||
- "config.mk"
|
||||
- "make/**"
|
||||
- ".github/workflows/diagnostics-api.yml"
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- "services/diagnostics-api/**"
|
||||
- "Makefile"
|
||||
- "config.mk"
|
||||
- "make/**"
|
||||
- ".github/workflows/diagnostics-api.yml"
|
||||
|
||||
permissions:
|
||||
@@ -23,9 +29,6 @@ jobs:
|
||||
quality:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
defaults:
|
||||
run:
|
||||
working-directory: services/diagnostics-api
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -37,17 +40,5 @@ jobs:
|
||||
cache: npm
|
||||
cache-dependency-path: services/diagnostics-api/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Verify generated Worker types
|
||||
run: npm run types:check
|
||||
|
||||
- name: Type-check
|
||||
run: npm run typecheck
|
||||
|
||||
- name: Test in the Workers runtime
|
||||
run: npm test
|
||||
|
||||
- name: Validate the deployment bundle
|
||||
run: npm run deploy:dry-run
|
||||
- name: Check diagnostics API
|
||||
run: make check-diagnostics
|
||||
|
||||
19
.github/workflows/docs.yml
vendored
19
.github/workflows/docs.yml
vendored
@@ -4,12 +4,18 @@ on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "docs/**"
|
||||
- "Makefile"
|
||||
- "config.mk"
|
||||
- "make/**"
|
||||
- ".github/workflows/docs.yml"
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- "docs/**"
|
||||
- "Makefile"
|
||||
- "config.mk"
|
||||
- "make/**"
|
||||
- ".github/workflows/docs.yml"
|
||||
|
||||
permissions:
|
||||
@@ -23,9 +29,6 @@ jobs:
|
||||
quality:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
defaults:
|
||||
run:
|
||||
working-directory: docs
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -37,11 +40,5 @@ jobs:
|
||||
cache: npm
|
||||
cache-dependency-path: docs/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Type-check
|
||||
run: npm run typecheck
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
- name: Check documentation website
|
||||
run: make check-docs
|
||||
|
||||
65
.github/workflows/linux-packages.yml
vendored
65
.github/workflows/linux-packages.yml
vendored
@@ -17,6 +17,9 @@ on:
|
||||
- "gradle.properties"
|
||||
- "gradle/**"
|
||||
- "gradlew"
|
||||
- "Makefile"
|
||||
- "config.mk"
|
||||
- "make/**"
|
||||
push:
|
||||
tags:
|
||||
- "v*.*.*"
|
||||
@@ -92,37 +95,7 @@ jobs:
|
||||
echo "app=$version" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Test and build Debian package
|
||||
run: |
|
||||
./gradlew \
|
||||
:shared:jvmTest \
|
||||
:desktopApp:packageReleaseDeb \
|
||||
-Pvnidrop.version=${{ steps.version.outputs.app }} \
|
||||
-Pvnidrop.desktop.rustVariant=release \
|
||||
-Pvnidrop.diagnostics.included=false \
|
||||
--no-daemon \
|
||||
--no-configuration-cache \
|
||||
--stacktrace
|
||||
|
||||
- name: Validate Debian package
|
||||
id: package
|
||||
env:
|
||||
VERSION: ${{ steps.version.outputs.app }}
|
||||
run: |
|
||||
mapfile -t packages < <(find desktopApp/build/compose/binaries/main-release/deb -maxdepth 1 -type f -name '*.deb')
|
||||
if (( ${#packages[@]} != 1 )); then
|
||||
echo "Expected exactly one Debian package, found ${#packages[@]}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
output_directory=build/release/linux/deb
|
||||
output_name="vnidrop_${VERSION}-1_amd64.deb"
|
||||
mkdir -p "$output_directory"
|
||||
cp "${packages[0]}" "$output_directory/$output_name"
|
||||
packaging/linux/verify-package.sh deb "$VERSION" "$output_directory/$output_name"
|
||||
(
|
||||
cd "$output_directory"
|
||||
sha256sum "$output_name" > "$output_name.sha256"
|
||||
)
|
||||
run: make package-deb VERSION=${{ steps.version.outputs.app }}
|
||||
|
||||
- name: Upload Debian artifact
|
||||
if: github.event_name != 'pull_request'
|
||||
@@ -225,35 +198,7 @@ jobs:
|
||||
echo "app=$version" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Build RPM package
|
||||
run: |
|
||||
./gradlew \
|
||||
:desktopApp:packageReleaseRpm \
|
||||
-Pvnidrop.version=${{ steps.version.outputs.app }} \
|
||||
-Pvnidrop.desktop.rustVariant=release \
|
||||
-Pvnidrop.diagnostics.included=false \
|
||||
--no-daemon \
|
||||
--no-configuration-cache \
|
||||
--stacktrace
|
||||
|
||||
- name: Validate RPM package
|
||||
env:
|
||||
VERSION: ${{ steps.version.outputs.app }}
|
||||
run: |
|
||||
mapfile -t packages < <(find desktopApp/build/compose/binaries/main-release/rpm -maxdepth 1 -type f -name '*.rpm')
|
||||
if (( ${#packages[@]} != 1 )); then
|
||||
echo "Expected exactly one RPM package, found ${#packages[@]}" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
output_directory=build/release/linux/rpm
|
||||
output_name="vnidrop-${VERSION}-1.x86_64.rpm"
|
||||
mkdir -p "$output_directory"
|
||||
cp "${packages[0]}" "$output_directory/$output_name"
|
||||
packaging/linux/verify-package.sh rpm "$VERSION" "$output_directory/$output_name"
|
||||
(
|
||||
cd "$output_directory"
|
||||
sha256sum "$output_name" > "$output_name.sha256"
|
||||
)
|
||||
run: make package-rpm VERSION=${{ steps.version.outputs.app }}
|
||||
|
||||
- name: Upload RPM artifact
|
||||
if: github.event_name != 'pull_request'
|
||||
|
||||
20
.github/workflows/rust-core.yml
vendored
20
.github/workflows/rust-core.yml
vendored
@@ -6,6 +6,9 @@ on:
|
||||
- "Cargo.toml"
|
||||
- "Cargo.lock"
|
||||
- "crates/vnidrop/**"
|
||||
- "Makefile"
|
||||
- "config.mk"
|
||||
- "make/**"
|
||||
- ".github/workflows/rust-core.yml"
|
||||
push:
|
||||
# Only after merge (or direct master pushes). Feature-branch work is covered
|
||||
@@ -16,6 +19,9 @@ on:
|
||||
- "Cargo.toml"
|
||||
- "Cargo.lock"
|
||||
- "crates/vnidrop/**"
|
||||
- "Makefile"
|
||||
- "config.mk"
|
||||
- "make/**"
|
||||
- ".github/workflows/rust-core.yml"
|
||||
|
||||
permissions:
|
||||
@@ -33,18 +39,10 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Rust quality components
|
||||
run: rustup component add clippy rustfmt
|
||||
- name: Check formatting
|
||||
run: cargo fmt --all -- --check
|
||||
- name: Run strict Clippy
|
||||
run: cargo clippy --workspace --all-targets -- -D warnings
|
||||
- name: Run unit and integration tests
|
||||
run: cargo test --workspace --all-targets
|
||||
- name: Check documentation
|
||||
env:
|
||||
RUSTDOCFLAGS: -D warnings
|
||||
run: cargo doc --workspace --no-deps
|
||||
- name: Check Rust core
|
||||
run: make check-rust
|
||||
- name: Install cargo-audit
|
||||
run: cargo install cargo-audit --locked
|
||||
- name: Audit Rust dependencies
|
||||
# Ignores are listed in .cargo/audit.toml for known transitive issues.
|
||||
run: cargo audit
|
||||
run: make audit-rust
|
||||
|
||||
10
.github/workflows/shared-kmp.yml
vendored
10
.github/workflows/shared-kmp.yml
vendored
@@ -15,6 +15,9 @@ on:
|
||||
- "gradle.properties"
|
||||
- "androidApp/**"
|
||||
- "desktopApp/**"
|
||||
- "Makefile"
|
||||
- "config.mk"
|
||||
- "make/**"
|
||||
- ".github/workflows/shared-kmp.yml"
|
||||
push:
|
||||
branches:
|
||||
@@ -32,6 +35,9 @@ on:
|
||||
- "gradle.properties"
|
||||
- "androidApp/**"
|
||||
- "desktopApp/**"
|
||||
- "Makefile"
|
||||
- "config.mk"
|
||||
- "make/**"
|
||||
- ".github/workflows/shared-kmp.yml"
|
||||
|
||||
permissions:
|
||||
@@ -94,7 +100,7 @@ jobs:
|
||||
echo "ANDROID_NDK_ROOT=${{ steps.setup-ndk.outputs.ndk-path }}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Run shared JVM tests
|
||||
run: ./gradlew :shared:jvmTest --no-daemon --stacktrace
|
||||
run: make check-shared
|
||||
|
||||
- name: Verify Android native libraries
|
||||
run: ./gradlew :androidApp:verifyDebugVnidropLibraries --no-daemon --stacktrace
|
||||
run: make verify-android-libs
|
||||
|
||||
Reference in New Issue
Block a user