Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump uniffi-rs version to 0.28.0 and MSRV to 1.77.1 #624

Merged
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
12 changes: 3 additions & 9 deletions .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
strategy:
matrix:
rust:
- version: 1.71.0 # STABLE
- version: stable # STABLE
clippy: true
- version: 1.61.0 # MSRV
- version: 1.77.1 # MSRV
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -46,12 +46,6 @@ jobs:
- name: Update toolchain
run: rustup update

- name: Pin dependencies for MSRV
if: matrix.rust.version == '1.61.0'
run: |
cargo update -p hashlink --precise "0.8.1"
cargo update -p tokio --precise "1.29.1"
cargo update -p flate2 --precise "1.0.26"
- name: Build
run: cargo build

Expand All @@ -60,7 +54,7 @@ jobs:
run: cargo clippy --all-targets --features "uniffi/bindgen-tests" -- -D warnings

- name: Test
run: CLASSPATH=./tests/jna/jna-5.8.0.jar cargo test --features uniffi/bindgen-tests
run: CLASSPATH=./tests/jna/jna-5.14.0.jar cargo test --features uniffi/bindgen-tests

fmt:
name: Rust fmt
Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/publish-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,13 @@ name: Publish bdk-android to Maven Central
on: [workflow_dispatch]

# The default Android NDK on the ubuntu-22.04 image is 25.2.9519653
# We replace the default environment variable ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/25.2.9519653
# with an older version of the NDK (21.4.7075529) using the fix proposed here: https://github.com/actions/runner-images/issues/5930
# For information on why this is needed at the moment see issues #242 and #243, and PR #282
env:
ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/21.4.7075529
ANDROID_NDK_HOME: /usr/local/lib/android/sdk/ndk/25.2.9519653

jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: "Install Android NDK 21.4.7075529"
run: |
ANDROID_ROOT=/usr/local/lib/android
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
echo "y" | $SDKMANAGER "ndk;21.4.7075529"

- name: "Check out PR branch"
uses: actions/checkout@v3

Expand All @@ -37,8 +27,8 @@ jobs:
distribution: temurin
java-version: 11

- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0
- name: "Set default Rust version to 1.77.1"
run: rustup default 1.77.1

- name: "Install Rust Android targets"
run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/publish-jvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ jobs:
distribution: temurin
java-version: 11

- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0
- name: "Set default Rust version to 1.77.1"
run: rustup default 1.77.1

- name: "Install aarch64 Rust target"
run: rustup target add aarch64-apple-darwin
Expand Down Expand Up @@ -54,8 +54,8 @@ jobs:
distribution: temurin
java-version: 11

- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0
- name: "Set default Rust version to 1.77.1"
run: rustup default 1.77.1

- name: "Install x86_64-pc-windows-msvc Rust target"
run: rustup target add x86_64-pc-windows-msvc
Expand Down Expand Up @@ -94,8 +94,8 @@ jobs:
distribution: temurin
java-version: 11

- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0
- name: "Set default Rust version to 1.77.1"
run: rustup default 1.77.1

- name: "Build bdk-jvm library"
run: |
Expand Down
32 changes: 21 additions & 11 deletions .github/workflows/publish-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,47 @@ on: [workflow_dispatch]
# tries to load glibc and fails because it requires a more recent version.

jobs:
build-manylinux2014-x86_64-wheels:
name: "Build Manylinux 2014 x86_64 wheel"
runs-on: ubuntu-22.04
build-manylinux_2_28-x86_64-wheels:
name: "Build Manylinux 2.28 x86_64 wheel"
runs-on: ubuntu-20.04
defaults:
run:
working-directory: bdk-python
container:
image: quay.io/pypa/manylinux2014_x86_64
image: quay.io/pypa/manylinux_2_28_x86_64
env:
PLAT: manylinux2014_x86_64
PLAT: manylinux_2_28_x86_64
PYBIN: "/opt/python/${{ matrix.python }}/bin"
strategy:
matrix:
python: # Update this list whenever the docker image is updated (check /opt/python/)
- cp38-cp38
- cp39-cp39
- cp310-cp310
- cp311-cp311
- cp312-cp312
steps:
- name: "Checkout"
uses: actions/checkout@v3
with:
submodules: true
- uses: actions-rs/toolchain@v1

- name: "Install Rust 1.77.1"
uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: 1.77.1

- name: "Generate bdk.py and binaries"
run: bash ./scripts/generate-linux.sh

- name: "Build wheel"
# Specifying the plat-name argument is necessary to build a wheel with the correct name,
# see issue #350 for more information
run: ${PYBIN}/python setup.py bdist_wheel --plat-name manylinux_2_17_x86_64 --verbose
run: ${PYBIN}/python setup.py bdist_wheel --plat-name manylinux_2_28_x86_64 --verbose

- uses: actions/upload-artifact@v3
with:
name: bdkpython-manylinux2014-x86_64-${{ matrix.python }}
name: bdkpython-manylinux_2_28_x86_64-${{ matrix.python }}
path: /home/runner/work/bdk-ffi/bdk-ffi/bdk-python/dist/*.whl

build-macos-arm64-wheels:
Expand All @@ -58,6 +62,8 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- name: "Checkout"
uses: actions/checkout@v3
Expand Down Expand Up @@ -95,6 +101,8 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- name: "Checkout"
uses: actions/checkout@v3
Expand Down Expand Up @@ -131,6 +139,8 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- name: "Checkout"
uses: actions/checkout@v3
Expand All @@ -154,11 +164,11 @@ jobs:

publish-pypi:
name: "Publish on PyPI"
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
defaults:
run:
working-directory: bdk-python
needs: [build-manylinux2014-x86_64-wheels, build-macos-arm64-wheels, build-macos-x86_64-wheels, build-windows-wheels]
needs: [build-manylinux_2_28-x86_64-wheels, build-macos-arm64-wheels, build-macos-x86_64-wheels, build-windows-wheels]
steps:
- name: "Checkout"
uses: actions/checkout@v3
Expand Down
18 changes: 3 additions & 15 deletions .github/workflows/test-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,12 @@ on:
- "bdk-ffi/**"
- "bdk-android/**"

# The default Android NDK on the ubuntu-22.04 image is 25.2.9519653
# We replace the default environment variable ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/25.2.9519653
# with an older version of the NDK (21.4.7075529) using the fix proposed here: https://github.com/actions/runner-images/issues/5930
# For information on why this is needed at the moment see issues #242 and #243, and PR #282
env:
ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk/21.4.7075529
# Use the default ANDROID_NDK_ROOT on the ubuntu-20.04 image

jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: "Install Android NDK 21.4.7075529"
run: |
ANDROID_ROOT=/usr/local/lib/android
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
echo "y" | $SDKMANAGER "ndk;21.4.7075529"

- name: "Check out PR branch"
uses: actions/checkout@v3

Expand All @@ -46,8 +34,8 @@ jobs:
distribution: temurin
java-version: 11

- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0
- name: "Set default Rust version to 1.77.1"
run: rustup default 1.77.1

- name: "Install Rust Android targets"
run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-jvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
distribution: temurin
java-version: 11

- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0
- name: "Set default Rust version to 1.77.1"
run: rustup default 1.77.1

- name: "Run JVM tests"
run: |
Expand Down
44 changes: 15 additions & 29 deletions .github/workflows/test-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,50 +9,42 @@ on:
paths:
- "bdk-ffi/**"
- "bdk-python/**"

# We use manylinux2014 because older CentOS versions used by 2010 and 1 have a very old glibc version, which
# makes it very hard to use GitHub's javascript actions (checkout, upload-artifact, etc).
# They mount their own nodejs interpreter inside your container, but since that's not statically linked it
# tries to load glibc and fails because it requires a more recent version.

jobs:
build-manylinux2014-x86_64-wheels:
name: "Build and test Manylinux 2014 x86_64 wheels"
runs-on: ubuntu-22.04
build-manylinux_2_28-x86_64-wheels:
name: "Build and test Manylinux 2.28 x86_64 wheels"
runs-on: ubuntu-20.04
defaults:
run:
working-directory: bdk-python
container:
image: quay.io/pypa/manylinux_2_28_x86_64
env:
PLAT: manylinux2014_x86_64
PLAT: manylinux_2_28_x86_64
PYBIN: "/opt/python/${{ matrix.python }}/bin"
strategy:
matrix:
python:
- cp38-cp38
- cp39-cp39
- cp310-cp310
- cp311-cp311
- cp312-cp312
steps:
- name: "Setup Node.js"
uses: actions/setup-node@v3
with:
node-version: '18'
- name: "Checkout"
uses: actions/checkout@v3
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: 1.77.1

- name: "Generate bdk.py and binaries"
run: bash ./scripts/generate-linux.sh

- name: "Build wheel"
# Specifying the plat-name argument is necessary to build a wheel with the correct name,
# see issue #350 for more information
run: ${PYBIN}/python setup.py bdist_wheel --plat-name manylinux_2_17_x86_64 --verbose
run: ${PYBIN}/python setup.py bdist_wheel --plat-name manylinux_2_28_x86_64 --verbose

- name: "Install wheel"
run: ${PYBIN}/pip install ./dist/*.whl
Expand All @@ -63,7 +55,7 @@ jobs:
- name: "Upload artifact test"
uses: actions/upload-artifact@v3
with:
name: bdkpython-manylinux2014-x86_64-${{ matrix.python }}
name: bdkpython-manylinux_2_28_x86_64-${{ matrix.python }}
path: /home/runner/work/bdk-ffi/bdk-ffi/bdk-python/dist/*.whl

build-macos-arm64-wheels:
Expand All @@ -78,11 +70,9 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- name: "Setup Node.js"
uses: actions/setup-node@v3
with:
node-version: '18'
- name: "Checkout"
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -125,11 +115,9 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- name: "Setup Node.js"
uses: actions/setup-node@v3
with:
node-version: '18'
- name: "Checkout"
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -170,11 +158,9 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- name: "Setup Node.js"
uses: actions/setup-node@v3
with:
node-version: '18'
- name: "Checkout"
uses: actions/checkout@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-swift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: "Set default Rust version to 1.67.0"
run: rustup default 1.67.0
- name: "Set default Rust version to 1.77.1"
run: rustup default 1.77.1

- name: Install Rust targets
run: |
Expand Down
Loading
Loading