Skip to content
Draft
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
167 changes: 90 additions & 77 deletions .github/workflows/build.yaml

Large diffs are not rendered by default.

29 changes: 27 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
name: Test
on: [pull_request]
jobs:
windows-build-scripts:
runs-on: windows-2022
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- name: Test Windows prebuild paths and stubs
shell: powershell
run: powershell -NoProfile -ExecutionPolicy Bypass -File scripts/tests/prebuild_windows_test.ps1

linux-release-bundle:
runs-on: ubuntu-24.04
permissions:
Expand Down Expand Up @@ -33,7 +43,7 @@ jobs:
fetch-depth: 0
submodules: recursive

# -d enables the pinned Epic/MWC native-assets prebuilts for flutter test.
# -d selects verified dnix prebuilts for Frost, Tor, Epic and MWC.
- name: Configure app (prebuilt native assets)
run: |
cd scripts
Expand All @@ -56,7 +66,9 @@ jobs:
dart format --output=none --set-exit-if-changed $FILES

- name: Get dependencies
run: flutter pub get
run: |
flutter pub get
dart tool/check_native_overrides.dart stack_wallet

- name: Decode secrets
env:
Expand Down Expand Up @@ -95,6 +107,19 @@ jobs:
# run: flutter analyze
- name: Test build scripts
run: dart scripts/tests/build_input_test.dart
- name: Test native build configuration
run: dart scripts/tests/native_build_config_test.dart
- name: Test native settings and dependency contracts
run: |
dart scripts/tests/configure_native_assets_test.dart
dart scripts/tests/native_dependency_contract_test.dart
dart scripts/tests/windows_native_overrides_test.dart
- name: Test build prerequisites
run: dart scripts/tests/build_environment_test.dart
- name: Test Windows secp256k1 helper
run: dart scripts/tests/windows_secp_build_test.dart
- name: Test Xcode setup helper
run: dart scripts/tests/xcode_setup_test.dart
- name: Test wallet creation launcher
run: dart scripts/tests/wallet_creation_runner_test.dart
- name: Test
Expand Down
47 changes: 20 additions & 27 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,13 @@ RUN curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*

ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
# Keep Rustup on PATH. Hooks install pinned toolchains in the runtime HOME;
# hooks_runner does not forward custom RUSTUP_HOME/CARGO_HOME settings.
ENV PATH=/usr/local/cargo/bin:$PATH

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| sh -s -- -y --default-toolchain 1.99.1 --profile minimal --no-modify-path \
&& rustup install 1.85.1 1.71.0 stable --profile minimal \
&& rustup target add x86_64-unknown-linux-gnu --toolchain 1.99.1 \
&& cargo install cargo-ndk \
&& chmod -R a+rwX "$CARGO_HOME" "$RUSTUP_HOME"
| env RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo \
sh -s -- -y --default-toolchain none --profile minimal --no-modify-path

ENV JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64

Expand Down Expand Up @@ -93,10 +90,11 @@ RUN git clone --depth 1 --branch 3.47.2 https://github.com/flutter/flutter.git "

RUN git config --system --add safe.directory '*'

RUN flutter --version && rustc --version && cargo --version && node --version && go version
RUN flutter --version && rustup --version && node --version && go version


# Android-only image: no Linux/Windows cross-compilers, no OpenCV/OpenCL, single Rust toolchain with android targets
# Android-only image: no Linux/Windows cross-compilers or OpenCV/OpenCL;
# Rust toolchains and targets are installed by hooks at runtime.
FROM ubuntu:24.04 AS android

ENV DEBIAN_FRONTEND=noninteractive \
Expand All @@ -113,17 +111,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
openjdk-21-jdk-headless \
&& rm -rf /var/lib/apt/lists/*

ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
# Keep Rustup on PATH. Hooks install pinned toolchains in the runtime HOME;
# hooks_runner does not forward custom RUSTUP_HOME/CARGO_HOME settings.
ENV PATH=/usr/local/cargo/bin:$PATH

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| sh -s -- -y --default-toolchain 1.99.1 --profile minimal --no-modify-path \
&& rustup target add \
aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android \
--toolchain 1.99.1 \
&& cargo install cargo-ndk \
&& chmod -R a+rwX "$CARGO_HOME" "$RUSTUP_HOME"
| env RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo \
sh -s -- -y --default-toolchain none --profile minimal --no-modify-path

ENV JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64

Expand Down Expand Up @@ -181,7 +175,7 @@ RUN git clone --depth 1 --branch 3.47.2 https://github.com/flutter/flutter.git "

RUN git config --system --add safe.directory '*'

RUN flutter --version && rustc --version && cargo --version && go version
RUN flutter --version && rustup --version && go version


# Image for flutter test (no Android SDK or cross-compilers)
Expand All @@ -202,14 +196,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libjsoncpp-dev liblzma-dev libsecret-1-dev libssl-dev \
&& rm -rf /var/lib/apt/lists/*

# Epic/MWC use prebuilts; frostdart still compiles through its native-assets hook.
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH
# Keep Rustup on PATH. Hooks install pinned toolchains in the runtime HOME;
# hooks_runner does not forward custom RUSTUP_HOME/CARGO_HOME settings.
ENV PATH=/usr/local/cargo/bin:$PATH

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| sh -s -- -y --default-toolchain 1.99.1 --profile minimal --no-modify-path \
&& chmod -R a+rwX "$CARGO_HOME" "$RUSTUP_HOME"
| env RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo \
sh -s -- -y --default-toolchain none --profile minimal --no-modify-path

ENV PATH=/usr/local/go/bin:$PATH

Expand All @@ -229,4 +222,4 @@ RUN git clone --depth 1 --branch 3.47.2 https://github.com/flutter/flutter.git "

RUN git config --system --add safe.directory '*'

RUN flutter --version && go version
RUN flutter --version && rustup --version && go version
Loading
Loading