Skip to content

Fix Android build in CI #345

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

Merged
merged 5 commits into from
Apr 24, 2023
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
5 changes: 4 additions & 1 deletion .github/workflows/publish-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
steps:
- name: "Install Android NDK 21.4.7075529"
run: |
Expand All @@ -37,6 +37,9 @@ jobs:
distribution: temurin
java-version: 11

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

- name: "Install Rust Android targets"
run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi

Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/publish-jvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
distribution: temurin
java-version: 11

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

- name: Install aarch64 Rust target
run: rustup target add aarch64-apple-darwin

Expand All @@ -43,7 +46,7 @@ jobs:
build-jvm-full-library:
name: Create full bdk-jvm library
needs: [build-jvm-macOS-M1-native-lib]
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the publish-android, publish-python and test-python or any other places with ubuntu-22.04 also be changed to ubuntu-20.04?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah let's do it. I'll add this to the agenda for the next dev call.

steps:
- name: Checkout publishing branch
uses: actions/checkout@v2
Expand All @@ -68,6 +71,9 @@ jobs:
distribution: temurin
java-version: 11

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

- name: Build bdk-jvm library
run: |
cd bdk-jvm
Expand Down
27 changes: 12 additions & 15 deletions .github/workflows/publish-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on: [workflow_dispatch]
jobs:
build-manylinux2014-x86_64-wheel:
name: "Build Manylinux 2014 x86_64 wheel"
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
defaults:
run:
working-directory: bdk-python
Expand All @@ -21,13 +21,9 @@ jobs:
strategy:
matrix:
python: # Update this list whenever the docker image is updated (check /opt/python/)
- cp36-cp36m
- cp37-cp37m
- cp38-cp38
- cp39-cp39
- cp310-cp310
- pp37-pypy37_pp73
- pp38-pypy38_pp73
steps:
- name: "Checkout"
uses: actions/checkout@v2
Expand All @@ -37,6 +33,9 @@ jobs:
with:
toolchain: stable

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

- name: "Install requirements"
run: ${PYBIN}/pip install -r requirements.txt

Expand All @@ -60,10 +59,9 @@ jobs:
strategy:
matrix:
python:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- "3.8"
- "3.9"
- "3.10"
steps:
- name: "Checkout"
uses: actions/checkout@v2
Expand Down Expand Up @@ -91,18 +89,17 @@ jobs:
path: /Users/runner/work/bdk-ffi/bdk-ffi/bdk-python/dist/*.whl

build-windows-wheel:
name: "Build windows wheel"
name: "Build Windows wheel"
runs-on: windows-2022
defaults:
run:
working-directory: bdk-python
strategy:
matrix:
python:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- "3.8"
- "3.9"
- "3.10"
steps:
- name: "Checkout"
uses: actions/checkout@v2
Expand All @@ -128,7 +125,7 @@ jobs:

publish-pypi:
name: "Publish on PyPI"
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
defaults:
run:
working-directory: bdk-python
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/test-android.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Test Android
on:
workflow_dispatch:
push:
paths:
- "bdk-ffi/**"
Expand All @@ -18,7 +19,7 @@ env:

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
steps:
- name: "Install Android NDK 21.4.7075529"
run: |
Expand All @@ -45,9 +46,17 @@ jobs:
distribution: temurin
java-version: 11

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

- name: "Install Rust Android targets"
run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi

- name: "Build Android library"
run: |
cd bdk-android
./gradlew buildAndroidLib

# There are currently no unit tests for bdk-android and the integration tests require the macOS image
# which is not working with the older NDK version we are using, so for now we just make sure that the library builds.
# - name: "Run Android unit tests"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-jvm.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Test Kotlin/JVM
on:
workflow_dispatch:
push:
paths:
- "bdk-ffi/**"
Expand Down Expand Up @@ -31,6 +32,9 @@ jobs:
distribution: temurin
java-version: 11

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

- name: Run JVM tests
run: |
cd bdk-jvm
Expand Down
37 changes: 18 additions & 19 deletions .github/workflows/test-python.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Test Python
on:
workflow_dispatch:
push:
paths:
- "bdk-ffi/**"
Expand All @@ -17,7 +18,7 @@ on:
jobs:
build-manylinux2014-x86_64-wheel:
name: "Build and test Manylinux 2014 x86_64 wheels"
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
defaults:
run:
working-directory: bdk-python
Expand All @@ -29,10 +30,8 @@ jobs:
strategy:
matrix:
python:
# - cp36-cp36m
# - cp37-cp37m
# - cp38-cp38
# - cp39-cp39
- cp38-cp38
- cp39-cp39
- cp310-cp310
steps:
- name: "Checkout"
Expand All @@ -43,6 +42,9 @@ jobs:
with:
toolchain: stable

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

- name: "Install requirements"
run: ${PYBIN}/pip install -r requirements.txt

Expand Down Expand Up @@ -73,10 +75,9 @@ jobs:
strategy:
matrix:
python:
# - '3.7'
# - '3.8'
# - '3.9'
- '3.10'
- "3.8"
- "3.9"
- "3.10"
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -113,10 +114,9 @@ jobs:
strategy:
matrix:
python:
# - '3.7'
# - '3.8'
# - '3.9'
- '3.10'
- "3.8"
- "3.9"
- "3.10"
steps:
- name: "Checkout"
uses: actions/checkout@v2
Expand All @@ -135,12 +135,11 @@ jobs:
- name: "Build wheel"
run: python setup.py bdist_wheel --verbose

# TODO: On Windows the pip install ./dist/*.whl step fails with the following error:
# Run pip install ./dist/*.whl
# WARNING: Requirement './dist/*.whl' looks like a filename, but the file does not exist
# ERROR: *.whl is not a valid wheel filename.*.whl is not a valid wheel name
# So we skip the installing and the tests and simply test that the wheel builds

# TODO: On Windows the pip install ./dist/*.whl step fails with the following error:
# Run pip install ./dist/*.whl
# WARNING: Requirement './dist/*.whl' looks like a filename, but the file does not exist
# ERROR: *.whl is not a valid wheel filename.*.whl is not a valid wheel name
# So we skip the installing and the tests and simply test that the wheel builds
# - name: Install wheel
# run: pip install ./dist/*.whl
# - name: Run tests
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-swift.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Test Swift
on:
workflow_dispatch:
push:
paths:
- "bdk-ffi/**"
Expand All @@ -16,6 +17,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

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

- name: Install Rust targets
run: |
rustup install nightly-x86_64-apple-darwin
Expand Down