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
11 changes: 11 additions & 0 deletions .github/workflows/bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,14 @@ jobs:
run: git diff --exit-code
- name: Run the example
run: make test-python
swift:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build the bindings
run: make swift
- name: Checks for uncommitted changes
run: git diff --exit-code
- name: Run the example
run: make test-swift
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,14 @@ bindings: ## Build all bindings
$(MAKE) go
$(MAKE) kotlin
$(MAKE) python
$(MAKE) swift

.PHONY: test-bindings
test-bindings: ## Test all bindings
$(MAKE) test-go
$(MAKE) test-kotlin
$(MAKE) test-python
$(MAKE) test-swift

# Build ffi crate and detect platform
define build_binding
Expand Down Expand Up @@ -98,6 +100,12 @@ python: ## Build Python bindings
cargo run --bin iota_sdk_bindings -- generate --library "target/release/libiota_sdk_ffi$${LIB_EXT}" --language python --out-dir bindings/python/lib --no-format; \
cp target/release/libiota_sdk_ffi$${LIB_EXT} bindings/python/lib/

.PHONY: swift
swift: ## Build Swift bindings
$(build_binding) \
cargo run --bin iota_sdk_bindings -- generate --library "target/release/libiota_sdk_ffi$${LIB_EXT}" --language swift --out-dir bindings/swift/lib --no-format; \
cp target/release/libiota_sdk_ffi$${LIB_EXT} bindings/swift/lib/

.PHONY: test-go
test-go: ## Test Go bindings
Copy link
Member

Choose a reason for hiding this comment

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

test-swift is missing

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, will add it when I actually have an example 👍🏻

cd bindings/go/; \
Expand Down
Loading
Loading