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

docs/building #32

Merged
merged 2 commits into from
Sep 16, 2024
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
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Continues Integration

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
clippy:
name: Clippy check
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: clippy
30 changes: 30 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Github Pages

on:
workflow_dispatch:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: "0.4.40"

- name: Build
run: cd mdbook && mdbook build

- name: Deploy to github pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./mdbook/book
33 changes: 32 additions & 1 deletion docs/src/contribution/contribution.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contribution Guide

This guide is mostly for macOS users
This guide is mostly for macOS users, if you found your way to build it on windows or linux feel free to open a PR!

## Apple

Expand All @@ -21,6 +21,27 @@ We're using SPM (swift package manager), a limitation while using an `xcframewor
which doesn't play well when publishing on remote. A work around for this limitation is to set the `useLocalFramework` to
`true` and return it back to `false` before pushing.

### Building

To generate swift bindings run:

```shell
./build-ios.sh
```

This will generate the swift bindings and create an `xcframework` with the built rust static libraries.

### Releasing

Similar to the building command but we should pass `--release`

```shell
./build-ios.sh --release
```

This will create a ZIP archive of the `xcframework` and update `Package.swift` with the computed checksum.
This is only needed when cutting a new release, not for local development.

## Android

### System Requirements
Expand Down Expand Up @@ -84,6 +105,16 @@ been added to your path by running `echo $PATH`.
> Please make sure you use the correct Android SDK path. You can find the actual location of the SDK in the
> Android Studio "Settings" dialog, under Languages & Frameworks → Android SDK.

### Building

Change directory into the android directory and run:

```shell
./gradlew :bindings:assembleDebug
```

This will generate the kotlin bindings and link `.so` files to the `jni` directory.

## Documentation

We're using [mdbook](https://github.com/rust-lang/mdBook) as a general purpose documentation tool.
Expand Down
Loading