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 .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ USER myuser
# Verify all components
RUN node -v
RUN npm -v
RUN rustup default nightly
RUN rustup default stable
RUN rustc --version
RUN cargo nextest --version
RUN sdkmanager --list
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/android-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,12 @@ jobs:
rustup default stable
cargo update -p zingolib -p regchest_utils --aggressive

- name: Cargo default nightly
- name: Cargo default stable
run: |
rustup toolchain install nightly --profile minimal --component rust-src
rustup default nightly
rustup update
rustup upgrade
rustup toolchain install stable --profile minimal --component rust-src
rustup default stable

- name: AWS libcrypto rust building
run: cargo install --force --locked bindgen-cli
Expand All @@ -135,27 +137,31 @@ jobs:
- name: Set envs for x86_64
if: ${{ env.ARCH == 'x86_64' }}
run: |
rustup target add x86_64-linux-android
echo "TARGET=x86_64-linux-android" >> $GITHUB_ENV
echo "CC=x86_64-linux-android" >> $GITHUB_ENV
echo "CARGO_FEATURE_STD=false" >> $GITHUB_ENV

- name: Set envs for x86
if: ${{ env.ARCH == 'x86' }}
run: |
rustup target add i686-linux-android
echo "TARGET=i686-linux-android" >> $GITHUB_ENV
echo "CC=i686-linux-android" >> $GITHUB_ENV
echo "CARGO_FEATURE_STD=false" >> $GITHUB_ENV

- name: Set envs for arm64-v8a
if: ${{ env.ARCH == 'arm64-v8a' }}
run: |
rustup target add aarch64-linux-android
echo "TARGET=aarch64-linux-android" >> $GITHUB_ENV
echo "CC=aarch64-linux-android" >> $GITHUB_ENV
echo "CARGO_FEATURE_STD=true" >> $GITHUB_ENV

- name: Set envs for armeabi-v7a
if: ${{ env.ARCH == 'armeabi-v7a' }}
run: |
rustup target add armv7-linux-androideabi
echo "TARGET=armv7-linux-androideabi" >> $GITHUB_ENV
echo "CC=armv7a-linux-androideabi" >> $GITHUB_ENV
echo "CARGO_FEATURE_STD=false" >> $GITHUB_ENV
Expand All @@ -168,7 +174,7 @@ jobs:
run: |
cargo ndk \
--target ${{ env.TARGET }} build \
--release -Z build-std
--release
env:
AR: llvm-ar
LD: ld
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ios-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ jobs:
sudo rustup default stable
sudo cargo update -p zingolib -p regchest_utils --aggressive

- name: Cargo default nightly
- name: Cargo default stable
run: |
sudo rustup update
sudo rustup upgrade
sudo rustup default nightly
sudo rustup default stable

- name: AWS libcrypto rust building
run: sudo cargo install --force --locked bindgen-cli
Expand Down
10 changes: 5 additions & 5 deletions rust/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ COPY Cargo.lock /opt/zingo/rust/Cargo.lock
COPY Cargo.toml /opt/zingo/rust/Cargo.toml
COPY zingomobile_utils/ /opt/zingo/rust/zingomobile_utils/

RUN rustup default nightly
RUN rustup default stable

RUN cargo install --force --locked bindgen-cli

Expand All @@ -46,7 +46,7 @@ ENV CC=aarch64-linux-android24-clang

ENV CFLAGS_aarch64_linux_android="-mno-outline-atomics"
ENV CXXFLAGS_aarch64_linux_android="-mno-outline-atomics"
RUN cargo ndk --target aarch64-linux-android build --release -Z build-std
RUN cargo ndk --target aarch64-linux-android build --release
RUN llvm-strip --strip-all ../target/aarch64-linux-android/release/libzingo.so
RUN llvm-objcopy \
--remove-section .comment \
Expand All @@ -57,7 +57,7 @@ RUN sha256sum ../target/aarch64-linux-android/release/libzingo.so
ENV CARGO_FEATURE_STD=false
ENV CC=armv7a-linux-androideabi24-clang

RUN cargo ndk --target armv7-linux-androideabi build --release -Z build-std
RUN cargo ndk --target armv7-linux-androideabi build --release
RUN llvm-strip --strip-all ../target/armv7-linux-androideabi/release/libzingo.so
RUN llvm-objcopy \
--remove-section .comment \
Expand All @@ -69,7 +69,7 @@ ENV CARGO_FEATURE_STD=false
ENV CC=i686-linux-android24-clang

#-DBROKEN_CLANG_ATOMICS
RUN cargo ndk --target i686-linux-android build --release -Z build-std
RUN cargo ndk --target i686-linux-android build --release
RUN llvm-strip --strip-all ../target/i686-linux-android/release/libzingo.so
RUN llvm-objcopy \
--remove-section .comment \
Expand All @@ -80,7 +80,7 @@ RUN sha256sum ../target/i686-linux-android/release/libzingo.so
ENV CARGO_FEATURE_STD=false
ENV CC=x86_64-linux-android24-clang

RUN cargo ndk --target x86_64-linux-android build --release -Z build-std
RUN cargo ndk --target x86_64-linux-android build --release
RUN llvm-strip --strip-all ../target/x86_64-linux-android/release/libzingo.so
RUN llvm-objcopy \
--remove-section .comment \
Expand Down
2 changes: 1 addition & 1 deletion rust/android/builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ENV CARGO_HOME=$HOME/.cargo
ENV RUSTUP_HOME=$HOME/.rustup
ENV PATH=$PATH:$CARGO_HOME/bin
RUN rustup toolchain install stable --profile minimal
RUN rustup toolchain install nightly --component rust-src
RUN rustup toolchain install stable --component rust-src
RUN rustup update \
&& rustup default stable
RUN rustup target add \
Expand Down
12 changes: 6 additions & 6 deletions rust/build_fdroid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export CARGO_HOME="$HOME/.cargo"
export RUSTUP_HOME="$HOME/.rustup"
export PATH="$PATH:$CARGO_HOME/bin"
rustup toolchain install stable --profile minimal
rustup toolchain install nightly --component rust-src
rustup toolchain install stable --component rust-src
rustup update
rustup default stable
rustup target add \
Expand Down Expand Up @@ -130,7 +130,7 @@ mkdir -p /opt/openssl-3.3.2/x86 \
&& make clean > /dev/null \
&& make distclean > /dev/null

rustup default nightly
rustup default stable

cargo install --force --locked bindgen-cli

Expand All @@ -146,7 +146,7 @@ export CARGO_NDK_ANDROID_PLATFORM=24

export CARGO_FEATURE_STD="true"
export OPENSSL_DIR=/opt/openssl-3.3.2/aarch64
cargo ndk --target arm64-v8a build --release -Z build-std > /dev/null
cargo ndk --target arm64-v8a build --release > /dev/null
llvm-strip --strip-all ../target/aarch64-linux-android/release/libzingo.so
llvm-objcopy \
--remove-section .comment \
Expand All @@ -155,23 +155,23 @@ sha256sum ../target/aarch64-linux-android/release/libzingo.so
export CARGO_FEATURE_STD="false"

export OPENSSL_DIR=/opt/openssl-3.3.2/armv7
cargo ndk --target armeabi-v7a build --release -Z build-std > /dev/null
cargo ndk --target armeabi-v7a build --release > /dev/null
llvm-strip --strip-all ../target/armv7-linux-androideabi/release/libzingo.so
llvm-objcopy \
--remove-section .comment \
../target/armv7-linux-androideabi/release/libzingo.so
sha256sum ../target/armv7-linux-androideabi/release/libzingo.so

export OPENSSL_DIR=/opt/openssl-3.3.2/x86
cargo ndk --target x86 build --release -Z build-std > /dev/null
cargo ndk --target x86 build --release > /dev/null
llvm-strip --strip-all ../target/i686-linux-android/release/libzingo.so
llvm-objcopy \
--remove-section .comment \
../target/i686-linux-android/release/libzingo.so
sha256sum ../target/i686-linux-android/release/libzingo.so

export OPENSSL_DIR=/opt/openssl-3.3.2/x86_64
cargo ndk --target x86_64 build --release -Z build-std > /dev/null
cargo ndk --target x86_64 build --release > /dev/null
llvm-strip --strip-all ../target/x86_64-linux-android/release/libzingo.so
llvm-objcopy \
--remove-section .comment \
Expand Down
6 changes: 4 additions & 2 deletions rust/ios/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@

ln -s $(which node) /usr/local/bin/node

rustup default stable

cargo install --force --locked bindgen-cli

cd ../lib
cargo run --release --bin uniffi-bindgen generate ./src/zingo.udl --language swift --out-dir ./Generated
cargo build --release --target aarch64-apple-ios -Z build-std
cargo build --release --target x86_64-apple-ios -Z build-std
cargo build --release --target aarch64-apple-ios
cargo build --release --target x86_64-apple-ios
cargo lipo --release --targets aarch64-apple-ios x86_64-apple-ios

cp ./Generated/zingo.swift ../../ios
Expand Down
6 changes: 4 additions & 2 deletions rust/ios/buildsimulator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

ln -s $(which node) /usr/local/bin/node

rustup default stable

cargo install --force --locked bindgen-cli

cd ../lib
cargo run --release --bin uniffi-bindgen generate ./src/zingo.udl --language swift --out-dir ./Generated
cargo build --release --target aarch64-apple-ios-sim -Z build-std
cargo build --release --target x86_64-apple-ios -Z build-std
cargo build --release --target aarch64-apple-ios-sim
cargo build --release --target x86_64-apple-ios
cargo lipo --release --targets aarch64-apple-ios-sim x86_64-apple-ios

cp ./Generated/zingo.swift ../../ios
Expand Down
4 changes: 2 additions & 2 deletions rust/local.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ COPY Cargo.lock /opt/zingo/rust/Cargo.lock
COPY Cargo.toml /opt/zingo/rust/Cargo.toml
COPY zingomobile_utils/ /opt/zingo/rust/zingomobile_utils/

RUN rustup default nightly
RUN rustup default stable

RUN cargo install --force --locked bindgen-cli

Expand All @@ -35,7 +35,7 @@ ENV LIBCLANG_PATH=/usr/lib/llvm-18/lib
ENV CARGO_NDK_PLATFORM=24
ENV CARGO_NDK_ANDROID_PLATFORM=24

RUN cargo ndk --target x86_64-linux-android build --release -Z build-std
RUN cargo ndk --target x86_64-linux-android build --release
RUN llvm-strip --strip-all ../target/x86_64-linux-android/release/libzingo.so
RUN llvm-objcopy \
--remove-section .comment \
Expand Down
Loading