Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/noah-build-release-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
id: set_outputs
run: |
mkdir ios-release-build
mv client/ios/build/Build/Products/Release-iphonesimulator/Noah-Signet.app ios-release-build/ios-release.app
mv client/ios/build/Build/Products/Release-iphonesimulator/Noah-Regtest.app ios-release-build/ios-release.app
echo "artifact_name=ios-release-app" >> $GITHUB_OUTPUT
echo "app_filename=ios-release.app" >> $GITHUB_OUTPUT

Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/noah-maestro-test-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ on:
paths:
- "client/**"
- "scripts/**"
- ".github/workflows/**"
- ".github/workflows/noah-maestro-test-ios.yml"
- ".github/workflows/noah-build-release-ios.yml"
- "package.json"
- "bun.lock"

Expand Down Expand Up @@ -41,6 +42,9 @@ jobs:
curl -fsSL "https://get.maestro.mobile.dev" | bash
echo "$HOME/.maestro/bin" >> $GITHUB_PATH

- name: 🔧 Setup Regtest Environment
run: ./scripts/ark-dev.sh setup-everything

- name: 📱 Boot iOS Simulator (iPhone 16)
run: |
DEVICE_ID=$(xcrun simctl list devices available | grep "iPhone 16" | head -n 1 | awk -F "[()]" '{print $2}')
Expand Down Expand Up @@ -83,8 +87,12 @@ jobs:
- name: 🧹 Uninstall iOS app from simulator
if: always()
run: |
echo "Uninstalling Noah-Signet app with bundle ID: com.anonymous.noah.signet"
xcrun simctl uninstall booted "com.anonymous.noah.signet" || true
echo "Uninstalling Noah-Regtest app with bundle ID: com.anonymous.noah.regtest"
xcrun simctl uninstall booted "com.anonymous.noah.regtest" || true

- name: 🧹 Teardown Regtest Environment
if: always()
run: ./scripts/ark-dev.sh down

- name: 📤 Store debug output if failed
if: failure()
Expand Down
41 changes: 34 additions & 7 deletions .github/workflows/server-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,31 @@ jobs:
- uses: actions/checkout@v4
- name: ✨ Check formatting
run: nix develop .#server --command bash -c "cargo fmt --check"

test:
runs-on: self-hosted
needs: fmt-check
steps:
- uses: actions/checkout@v4
- name: 🧪 Run tests
run: nix develop .#server --command bash -c "cargo test"

build-and-push:
runs-on: ubuntu-latest
needs: test
strategy:
matrix:
include:
- runner: ubuntu-latest
platform: linux/amd64
arch: amd64
- runner: ubuntu-24.04-arm
platform: linux/arm64
arch: arm64
runs-on: ${{ matrix.runner }}
steps:
- name: 🏗 Checkout code
uses: actions/checkout@v4

- name: ⚙️ Set up QEMU
uses: docker/setup-qemu-action@v3

- name: 🐋 Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand All @@ -44,10 +52,29 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: 🚀 Build and push
- name: 🚀 Build and push ${{ matrix.arch }}
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
platforms: ${{ matrix.platform }}
push: true
tags: ghcr.io/blixtwallet/noah-server:latest
tags: ghcr.io/blixtwallet/noah-server:latest-${{ matrix.arch }}
cache-from: type=gha,scope=${{ matrix.arch }}
cache-to: type=gha,mode=max,scope=${{ matrix.arch }}

create-manifest:
needs: build-and-push
runs-on: ubuntu-latest
steps:
- name: 🔐 Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: 🎯 Create and push multi-arch manifest
run: |
docker buildx imagetools create -t ghcr.io/blixtwallet/noah-server:latest \
ghcr.io/blixtwallet/noah-server:latest-amd64 \
ghcr.io/blixtwallet/noah-server:latest-arm64
34 changes: 19 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
# Stage 1: Build the application
FROM rust:1.88 AS builder

# Stage 1: Install cargo-chef
FROM rust:1.88 AS chef
RUN cargo install cargo-chef
WORKDIR /app

RUN apt-get update && apt-get install -y protobuf-compiler

# Copy the workspace and server Cargo files to plan the build
# Stage 2: Analyze dependencies
FROM chef AS planner
COPY ./Cargo.toml ./Cargo.toml
COPY ./server/Cargo.toml ./server/Cargo.toml

# Copy the lock file and build the dependencies
COPY ./Cargo.lock ./Cargo.lock
COPY ./server/src/ ./server/src
RUN cargo chef prepare --recipe-path recipe.json

# Stage 3: Build dependencies (cached layer)
FROM chef AS builder
RUN apt-get update && apt-get install -y protobuf-compiler && rm -rf /var/lib/apt/lists/*

COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json --manifest-path ./server/Cargo.toml

# Copy the application source code and build the application
# Stage 4: Build application
COPY ./Cargo.toml ./Cargo.toml
COPY ./server/Cargo.toml ./server/Cargo.toml
COPY ./Cargo.lock ./Cargo.lock
COPY ./server/src/ ./server/src
RUN cargo build --release --manifest-path ./server/Cargo.toml

# Stage 2: Create the runtime image
# Stage 5: Runtime image
FROM debian:bookworm-slim AS runtime

# Install CA certificates for TLS
RUN apt-get update && apt-get install -y ca-certificates curl pkg-config libssl-dev && rm -rf /var/lib/apt/lists/*

# Copy the compiled binary from the builder stage
COPY --from=builder /app/target/release/server /usr/local/bin/
RUN mkdir -p /etc/server

EXPOSE 3000

# Set the startup command
CMD ["server", "--config-path", "/etc/server/config.toml"]
2 changes: 1 addition & 1 deletion client/.maestro/setup-wallet.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# setup-wallet.yml

appId: com.anonymous.noah.signet
appId: com.anonymous.noah.regtest
---
- launchApp
- tapOn: "Create Wallet"
Expand Down
4 changes: 2 additions & 2 deletions client/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ android {
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion

namespace 'com.anonymous.noah'
namespace 'com.noahwallet'
defaultConfig {
applicationId 'com.anonymous.noah'
applicationId 'com.noahwallet'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.anonymous.noah
package com.noahwallet

import android.os.Build
import android.os.Bundle
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.anonymous.noah
package com.noahwallet

import android.app.Application
import android.content.res.Configuration
Expand Down
42 changes: 40 additions & 2 deletions client/android/app/src/mainnet/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,47 @@
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:798188805132:android:ea5f01a437fb8764c5a229",
"mobilesdk_app_id": "1:798188805132:android:f1f15d689f21f534c5a229",
"android_client_info": {
"package_name": "com.anonymous.noah"
"package_name": "com.noahwallet"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyAqUfhVtqS9piBZGjhKfB1x-UeAcVi8FoU"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:798188805132:android:d9e34e3fa9af010ec5a229",
"android_client_info": {
"package_name": "com.noahwallet.regtest"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyAqUfhVtqS9piBZGjhKfB1x-UeAcVi8FoU"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:798188805132:android:5a0ecd3d3dca8137c5a229",
"android_client_info": {
"package_name": "com.noahwallet.signet"
}
},
"oauth_client": [],
Expand Down
12 changes: 6 additions & 6 deletions client/android/app/src/regtest/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:798188805132:android:ea5f01a437fb8764c5a229",
"mobilesdk_app_id": "1:798188805132:android:f1f15d689f21f534c5a229",
"android_client_info": {
"package_name": "com.anonymous.noah"
"package_name": "com.noahwallet"
}
},
"oauth_client": [],
Expand All @@ -26,9 +26,9 @@
},
{
"client_info": {
"mobilesdk_app_id": "1:798188805132:android:21b6dd5ed7c62855c5a229",
"mobilesdk_app_id": "1:798188805132:android:d9e34e3fa9af010ec5a229",
"android_client_info": {
"package_name": "com.anonymous.noah.regtest"
"package_name": "com.noahwallet.regtest"
}
},
"oauth_client": [],
Expand All @@ -45,9 +45,9 @@
},
{
"client_info": {
"mobilesdk_app_id": "1:798188805132:android:10d1d8c4cfcb806cc5a229",
"mobilesdk_app_id": "1:798188805132:android:5a0ecd3d3dca8137c5a229",
"android_client_info": {
"package_name": "com.anonymous.noah.signet"
"package_name": "com.noahwallet.signet"
}
},
"oauth_client": [],
Expand Down
12 changes: 6 additions & 6 deletions client/android/app/src/signet/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:798188805132:android:ea5f01a437fb8764c5a229",
"mobilesdk_app_id": "1:798188805132:android:f1f15d689f21f534c5a229",
"android_client_info": {
"package_name": "com.anonymous.noah"
"package_name": "com.noahwallet"
}
},
"oauth_client": [],
Expand All @@ -26,9 +26,9 @@
},
{
"client_info": {
"mobilesdk_app_id": "1:798188805132:android:21b6dd5ed7c62855c5a229",
"mobilesdk_app_id": "1:798188805132:android:d9e34e3fa9af010ec5a229",
"android_client_info": {
"package_name": "com.anonymous.noah.regtest"
"package_name": "com.noahwallet.regtest"
}
},
"oauth_client": [],
Expand All @@ -45,9 +45,9 @@
},
{
"client_info": {
"mobilesdk_app_id": "1:798188805132:android:10d1d8c4cfcb806cc5a229",
"mobilesdk_app_id": "1:798188805132:android:5a0ecd3d3dca8137c5a229",
"android_client_info": {
"package_name": "com.anonymous.noah.signet"
"package_name": "com.noahwallet.signet"
}
},
"oauth_client": [],
Expand Down
2 changes: 1 addition & 1 deletion client/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const config: { expo: ExpoConfig } = {
backgroundColor: "#000000",
},
edgeToEdgeEnabled: true,
package: "com.anonymous.noah",
package: "com.noahwallet",
splash: {
image: "./assets/All_Files/splash_screens/splash_screen_android.png",
resizeMode: "contain",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ object NoahToolsLogging {

fun performGetAppVariant(): String {
try {
val buildConfigClass = Class.forName("com.anonymous.noah.BuildConfig")
val buildConfigClass = Class.forName("com.noahwallet.BuildConfig")
val field = buildConfigClass.getField("APP_VARIANT")
val appVariant = field.get(null) as? String
if (appVariant != null) {
Expand Down
14 changes: 7 additions & 7 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"android:clean": "rm -rf android/.gradle android/app/build android/build android/.cxx android/app/.cxx android/app/.idea",
"ios:clean": "rm -rf ios/Pods ios/Podfile.lock ios/build/",
"clean:all": "bun android:clean && bun ios:clean",
"android:mainnet:debug": "expo run:android --variant mainnetDebug --app-id=com.anonymous.noah",
"android:mainnet:release": "expo run:android --variant mainnetRelease --app-id=com.anonymous.noah",
"android:signet:debug": "expo run:android --variant signetDebug --app-id=com.anonymous.noah.signet",
"android:signet:release": "expo run:android --variant signetRelease --app-id=com.anonymous.noah.signet",
"android:regtest:debug": "expo run:android --variant regtestDebug --app-id=com.anonymous.noah.regtest",
"android:regtest:release": "expo run:android --variant regtestRelease --app-id=com.anonymous.noah.regtest",
"android:mainnet:debug": "expo run:android --variant mainnetDebug --app-id=com.noahwallet",
"android:mainnet:release": "expo run:android --variant mainnetRelease --app-id=com.noahwallet",
"android:signet:debug": "expo run:android --variant signetDebug --app-id=com.noahwallet.signet",
"android:signet:release": "expo run:android --variant signetRelease --app-id=com.noahwallet.signet",
"android:regtest:debug": "expo run:android --variant regtestDebug --app-id=com.noahwallet.regtest",
"android:regtest:release": "expo run:android --variant regtestRelease --app-id=com.noahwallet.regtest",
"ios:mainnet:debug": "expo run:ios --scheme Noah --configuration Debug",
"ios:mainnet:release": "expo run:ios --scheme Noah --configuration Release",
"ios:signet:debug": "expo run:ios --scheme Noah-Signet --configuration Debug",
Expand All @@ -35,7 +35,7 @@
"build:ios:signet:release": "xcodebuild build -workspace ios/noah.xcworkspace -scheme Noah-Signet -configuration Release -sdk iphonesimulator -quiet ARCHS=arm64",
"build:ios:regtest:debug": "xcodebuild build -workspace ios/noah.xcworkspace -scheme Noah-Regtest -configuration Debug -sdk iphonesimulator -quiet ARCHS=arm64",
"build:ios:regtest:release": "xcodebuild build -workspace ios/noah.xcworkspace -scheme Noah-Regtest -configuration Release -sdk iphonesimulator -quiet ARCHS=arm64",
"build:ios:ci": "xcrun xcodebuild -scheme 'Noah-Signet' -workspace 'ios/noah.xcworkspace' -configuration Release -sdk 'iphonesimulator' -destination 'generic/platform=iOS Simulator' -derivedDataPath ios/build -quiet ARCHS=arm64",
"build:ios:ci": "xcrun xcodebuild -scheme 'Noah-Regtest' -workspace 'ios/noah.xcworkspace' -configuration Release -sdk 'iphonesimulator' -destination 'generic/platform=iOS Simulator' -derivedDataPath ios/build -quiet ARCHS=arm64",
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
"typecheck": "tsc --noEmit",
"check": "bun run lint && bun run typecheck",
Expand Down
Loading