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
21 changes: 11 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-*'
workflow_dispatch:

jobs:
Expand All @@ -25,7 +26,7 @@ jobs:
- name: Run tests
run: |
cd src/serai
cargo +1.71.0 test --workspace --exclude bitcoin-serai
cargo +1.89.0 test --workspace --exclude bitcoin-serai

build-linux:
needs: test
Expand All @@ -45,7 +46,7 @@ jobs:
submodules: recursive

- name: Add Rust target
run: rustup +1.71.0 target add ${{ matrix.target }}
run: rustup +1.89.0 target add ${{ matrix.target }}

- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -57,7 +58,7 @@ jobs:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
run: |
cd src/serai/hrf
cargo +1.71.0 build --target ${{ matrix.target }} --release --lib
cargo +1.89.0 build --target ${{ matrix.target }} --release --lib
cp ../target/${{ matrix.target }}/release/libhrf_api.so \
../../../${{ matrix.asset }}

Expand Down Expand Up @@ -86,7 +87,7 @@ jobs:
submodules: recursive

- name: Add Rust target
run: rustup +1.71.0 target add ${{ matrix.target }}
run: rustup +1.89.0 target add ${{ matrix.target }}

- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -98,8 +99,8 @@ jobs:
ANDROID_NDK_ROOT: /opt/android-ndk-r28
run: |
cd src/serai/hrf
sed -i 's/\[dependencies\]/[dependencies]\nopenssl = { version = "<=0.10.78", features = ["vendored"] }\nopenssl-sys = "<=0.9.114"/' Cargo.toml
cargo +1.71.0 ndk --target ${{ matrix.target }} --platform 21 build --release
sed -i 's/\[dependencies\]/[dependencies]\nopenssl = { version = "0.10", features = ["vendored"] }/' Cargo.toml
cargo +1.89.0 ndk --target ${{ matrix.target }} --platform 21 build --release
cp ../target/${{ matrix.target }}/release/libhrf_api.so \
../../../frostdart-android-${{ matrix.abi }}.so

Expand All @@ -119,7 +120,7 @@ jobs:
submodules: recursive

- name: Add Rust target
run: rustup +1.71.0 target add x86_64-pc-windows-gnu
run: rustup +1.89.0 target add x86_64-pc-windows-gnu

- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -128,7 +129,7 @@ jobs:
- name: Build
run: |
cd src/serai/hrf
cargo +1.71.0 build --target x86_64-pc-windows-gnu --release --lib
cargo +1.89.0 build --target x86_64-pc-windows-gnu --release --lib
cp ../target/x86_64-pc-windows-gnu/release/hrf_api.dll \
../../../frostdart-windows-x86_64.dll

Expand All @@ -147,7 +148,7 @@ jobs:

- uses: dtolnay/rust-toolchain@master
with:
toolchain: '1.71.0'
toolchain: '1.89.0'
targets: aarch64-apple-ios

- uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -179,7 +180,7 @@ jobs:

- uses: dtolnay/rust-toolchain@master
with:
toolchain: '1.71.0'
toolchain: '1.89.0'
targets: aarch64-apple-darwin

- uses: Swatinem/rust-cache@v2
Expand Down
3 changes: 1 addition & 2 deletions scripts/android/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ cd build/serai/hrf || exit

# inject vendored openssl required for android cross compilation
sed -i "s/\[dependencies\]/\[dependencies\]\\
openssl = { version = \"<=0.10.78\", features = [\"vendored\"] }\\
openssl-sys = \"<=0.9.114\"/" Cargo.toml
openssl = { version = \"0.10\", features = [\"vendored\"] }/" Cargo.toml

rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android
cargo ndk \
Expand Down
2 changes: 1 addition & 1 deletion scripts/ios/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sed -i '' 's/^name = "hrf-api"$/name = "frostdart"/' Cargo.toml

export IPHONEOS_DEPLOYMENT_TARGET=15.0
export RUSTFLAGS="-C link-arg=-mios-version-min=15.0"
cargo build --target aarch64-apple-ios --release --lib
cargo +1.89.0 build --target aarch64-apple-ios --release --lib

cp ../target/aarch64-apple-ios/release/libfrostdart.a \
"$LIB_ROOT/../ios/libfrostdart.a"
4 changes: 2 additions & 2 deletions scripts/linux/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ rm -rf "$ROOT_DIR"/src/serai/target
cd "$ROOT_DIR"/src/serai/hrf || exit
if [ "$IS_ARM" = true ] ; then
echo "Building arm frostdart"
cargo +1.71.0 build --target aarch64-unknown-linux-gnu --release --lib
cargo +1.89.0 build --target aarch64-unknown-linux-gnu --release --lib
cp ../target/aarch64-unknown-linux-gnu/release/libhrf_api.so "$ROOT_DIR"/scripts/linux/build/frostdart.so
else
echo "Building x86_64 frostdart"
cargo +1.71.0 build --target x86_64-unknown-linux-gnu --release --lib
cargo +1.89.0 build --target x86_64-unknown-linux-gnu --release --lib
cp ../target/x86_64-unknown-linux-gnu/release/libhrf_api.so "$ROOT_DIR"/scripts/linux/build/frostdart.so
fi
1 change: 1 addition & 0 deletions scripts/macos/build_macos.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Future<void> main(List<String> args) async {
await _run("sed", ["-i", ".bak", "s/frostdart/hrf-api/", "cargo.toml"]);

await _run("cargo", [
"+1.89.0",
"lipo",
"--release",
"--targets",
Expand Down
8 changes: 4 additions & 4 deletions scripts/windows/build_all.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@echo on

rem Rust 1.71.0 Windows toolchain required,
rem `rustup toolchain install 1.71.0-x86_64-pc-windows-msvc`.
rem Rust 1.89.0 Windows toolchain required,
rem `rustup toolchain install 1.89.0-x86_64-pc-windows-msvc`.

set ROOT_DIR=%cd%\..\..

Expand All @@ -12,10 +12,10 @@ rmdir /s /q "%ROOT_DIR%\src\serai\target" 2>nul
cd "%ROOT_DIR%\src\serai\hrf" || exit
if "%IS_ARM%"=="true" (
echo Building arm frostdart
cargo +1.71.0 build --target aarch64-pc-windows-msvc --release --lib
cargo +1.89.0 build --target aarch64-pc-windows-msvc --release --lib
copy "..\target\x86_64-pc-windows-msvc\release\hrf_api.dll" "%ROOT_DIR%\scripts\windows\build\frostdart.dll"
) else (
echo Building x86_64 frostdart
cargo +1.71.0 build --target x86_64-pc-windows-msvc --release --lib
cargo +1.89.0 build --target x86_64-pc-windows-msvc --release --lib
copy "..\target\x86_64-pc-windows-msvc\release\hrf_api.dll" "%ROOT_DIR%\scripts\windows\build\frostdart.dll"
)
8 changes: 4 additions & 4 deletions scripts/windows/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ cd "$ROOT_DIR"/src/serai/hrf || exit
if [ "$IS_ARM" = true ] ; then
echo "Building arm frostdart with GNU toolchain."
echo "WARNING: aarch64-pc-windows-gnu may not be fully supported."
rustup +1.71.0 target add aarch64-pc-windows-gnu
cargo +1.71.0 build --target aarch64-pc-windows-gnu --release --lib
rustup +1.89.0 target add aarch64-pc-windows-gnu
cargo +1.89.0 build --target aarch64-pc-windows-gnu --release --lib
cp ../target/aarch64-pc-windows-gnu/release/hrf_api.dll "$ROOT_DIR"/scripts/windows/build/frostdart.dll
else
echo "Adding x86_64-pc-windows-gnu target."
rustup +1.71.0 target add x86_64-pc-windows-gnu
rustup +1.89.0 target add x86_64-pc-windows-gnu
echo "Building x86_64 frostdart with GNU toolchain."
cargo +1.71.0 build --target x86_64-pc-windows-gnu --release --lib
cargo +1.89.0 build --target x86_64-pc-windows-gnu --release --lib
cp ../target/x86_64-pc-windows-gnu/release/hrf_api.dll "$ROOT_DIR"/scripts/windows/build/frostdart.dll
fi
Loading