You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2023/06/26 07:48:17 UTC
[incubator-opendal] branch main updated: doc(bindings/swift): add CONTRIBUTING.md (#2540)
This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
The following commit(s) were added to refs/heads/main by this push:
new c86fc24ab doc(bindings/swift): add CONTRIBUTING.md (#2540)
c86fc24ab is described below
commit c86fc24abbcc43a218ad63b16a648536236e9969
Author: Cyandev <un...@gmail.com>
AuthorDate: Mon Jun 26 15:48:13 2023 +0800
doc(bindings/swift): add CONTRIBUTING.md (#2540)
* doc(bindings/swift): add CONTRIBUTING.md
* doc(bindings/swift): remove dev container section
---
bindings/swift/CONTRIBUTING.md | 65 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
diff --git a/bindings/swift/CONTRIBUTING.md b/bindings/swift/CONTRIBUTING.md
new file mode 100644
index 000000000..cf4e16569
--- /dev/null
+++ b/bindings/swift/CONTRIBUTING.md
@@ -0,0 +1,65 @@
+# Contributing
+
+- [Contributing](#contributing)
+ - [Setup](#setup)
+ - [Build](#build)
+ - [Test](#test)
+
+## Setup
+
+To build OpenDAL Swift binding, the Swift toolchain is required to be installed.
+
+For Ubuntu and CentOS, you may follow the instructions in [this documentation](https://www.swift.org/download) to install it. Make sure that `swift` binary is added to your path:
+
+```shell
+export PATH=/path/to/swift-toolchain/usr/bin:"${PATH}"
+```
+
+For macOS, you can install Xcode or Xcode command line tools to get your environment all set.
+
+Then you can validate your Swift installation by executing `swift --version`.
+
+```text
+$ swift --version
+
+Swift version 5.8.1 (swift-5.8.1-RELEASE)
+Target: x86_64-unknown-linux-gnu
+```
+
+For better development experience, we recommend you to configure your editors to use SourceKit-LSP (the LSP for Swift). Visit SourceKit-LSP [repository](https://github.com/apple/sourcekit-lsp) for more details.
+
+## Build
+
+To build the binding package:
+
+```shell
+$ make
+```
+
+Swift packages are not released via binary artifacts typically. However, you can still build the package locally to check whether there are compilation errors.
+
+To clean the build results:
+
+```shell
+$ make clean
+```
+
+## Test
+
+To build and run the tests:
+
+```text
+$ make test
+
+Test Suite 'All tests' started at xxx.
+Test Suite 'OpenDALPackageTests.xctest' started at xxx.
+Test Suite 'OpenDALTests' started at xxx.
+Test Case '-[OpenDALTests.OpenDALTests testSimple]' started.
+Test Case '-[OpenDALTests.OpenDALTests testSimple]' passed (xx seconds).
+Test Suite 'OpenDALTests' passed at xxx.
+ Executed 1 test, with 0 failures (0 unexpected) in xx (xx) seconds
+Test Suite 'OpenDALPackageTests.xctest' passed at xxx.
+ Executed 1 test, with 0 failures (0 unexpected) in xx (xx) seconds
+Test Suite 'All tests' passed at xxx.
+ Executed 1 test, with 0 failures (0 unexpected) in xx (xx) seconds
+```