Skip to content

Allow specifying NDK version when building for Android #9

Allow specifying NDK version when building for Android

Allow specifying NDK version when building for Android #9

Workflow file for this run

name: Generate API docs and deploy them to Github Pages
on:
push:
branches: ["master"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest
# queued. However, do NOT cancel in-progress runs as we want to allow these production deployments
# to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Build job
build:
# Only run this in the main repo
if: github.repository == 'equalitie/ouisync'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Cache gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Setup gradle
uses: gradle/gradle-build-action@v2.4.2
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Build docs for the rust library
run: cargo doc --package ouisync --lib --no-deps
- name: Build docs for the kotlin bindings
working-directory: bindings/kotlin
run: ./gradlew lib:dokkaHtml
- name: Prepare the files
run: |
mkdir -p _site
cp -r target/doc _site/rust
cp -r bindings/kotlin/build/lib/dokka/html _site/kotlin
cp doc/index.html _site/
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4