mirror of
https://github.com/OpenBluetoothToolbox/SimpleBLE
synced 2025-05-08 21:47:10 +08:00
Clean Android builds
This commit is contained in:
parent
a5bb52af0b
commit
ff5f43bc64
12
.github/workflows/ci_main.yml
vendored
12
.github/workflows/ci_main.yml
vendored
@ -219,6 +219,10 @@ jobs:
|
||||
needs: [smoketest]
|
||||
uses: ./.github/workflows/ci_simplejavable.yml
|
||||
|
||||
simpledroidble:
|
||||
needs: [smoketest]
|
||||
uses: ./.github/workflows/ci_simpledroidble.yml
|
||||
|
||||
simplecble:
|
||||
needs: [targets]
|
||||
uses: ./.github/workflows/ci_simplecble.yml
|
||||
@ -234,14 +238,8 @@ jobs:
|
||||
with:
|
||||
libraries: ${{ needs.libraries.outputs.values }}
|
||||
|
||||
# python:
|
||||
# needs: [smoketest]
|
||||
# if: needs.targets.outputs.python == 'true'
|
||||
# uses: ./.github/workflows/ci_python.yml
|
||||
# secrets: inherit
|
||||
|
||||
release:
|
||||
needs: [smoketest, simpleble, simplepyble, simplejavable, simplecble, simplersble, linux-internals]
|
||||
needs: [smoketest, simpleble, simplepyble, simplejavable, simpledroidble, simplecble, simplersble, linux-internals]
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
|
||||
|
38
.github/workflows/ci_simpleble.yml
vendored
38
.github/workflows/ci_simpleble.yml
vendored
@ -70,6 +70,44 @@ jobs:
|
||||
name: libsimpleble_${{ matrix.config.os }}-${{ matrix.config.architecture }}
|
||||
path: artifacts/libsimpleble_${{ matrix.config.os }}-${{ matrix.config.architecture }}.zip
|
||||
|
||||
build-plugins:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Add Version Suffix
|
||||
uses: ./.github/actions/setup-version
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: "17"
|
||||
distribution: "temurin"
|
||||
|
||||
- name: Setup Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
- name: Build simplebledroidbridge AAR
|
||||
run: gradle :bundleReleaseAar -p ./simpledroidbridge --no-daemon -Dorg.gradle.project.buildDir="$GITHUB_WORKSPACE/build_simpledroidbridge"
|
||||
|
||||
- name: Package Artifact
|
||||
uses: ./.github/actions/package-native
|
||||
with:
|
||||
source-dir: $GITHUB_WORKSPACE/build_simpledroidbridge/outputs/aar
|
||||
output-dir: $GITHUB_WORKSPACE/artifacts
|
||||
archive-name: libsimpleble_android_plugins
|
||||
os: linux
|
||||
|
||||
- name: Upload Binaries
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: libsimpleble_android_plugins
|
||||
path: artifacts/libsimpleble_android_plugins.zip
|
||||
|
||||
build-examples:
|
||||
runs-on: ${{ matrix.config.runner-os || 'ubuntu-latest' }}
|
||||
container: ${{ matrix.config.container-image }}
|
||||
|
120
.github/workflows/ci_simpledroidble.yml
vendored
120
.github/workflows/ci_simpledroidble.yml
vendored
@ -1,83 +1,83 @@
|
||||
name: CI Build for SimpleDroidBLE
|
||||
|
||||
# NOTE: This workflow is currently unused, but kept here for reference until we decide to bring this back.
|
||||
name: Build SimpleDroidBLE
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
workflow_call: # This allows it to be called from ci_main.yml
|
||||
inputs:
|
||||
tag:
|
||||
description: "The tag to upload artifacts"
|
||||
required: false
|
||||
type: string
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
|
||||
simpledroidble:
|
||||
build-lib:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Android Setup
|
||||
uses: ./.github/actions/android-setup
|
||||
- name: Add Version Suffix
|
||||
uses: ./.github/actions/setup-version
|
||||
|
||||
- name: Build simpledroidble AAR
|
||||
working-directory: ./simpledroidble
|
||||
run: |
|
||||
./gradlew simpledroidble:bundleReleaseAar \
|
||||
--no-daemon \
|
||||
-PbuildDir="${{ github.workspace }}"
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: "17"
|
||||
distribution: "temurin"
|
||||
|
||||
- name: Upload simpledroidble AAR to job
|
||||
- name: Setup Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
- name: Build simplebledroidble AAR
|
||||
run: gradle :bundleReleaseAar -p ./simpledroidble --no-daemon -Dorg.gradle.project.buildDir="$GITHUB_WORKSPACE/build_simpledroidble"
|
||||
|
||||
- name: Package Artifact
|
||||
uses: ./.github/actions/package-native
|
||||
with:
|
||||
source-dir: $GITHUB_WORKSPACE/build_simpledroidble/outputs/aar
|
||||
output-dir: $GITHUB_WORKSPACE/artifacts
|
||||
archive-name: simpledroidble
|
||||
os: linux
|
||||
|
||||
- name: Upload Binaries
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: simpledroidble
|
||||
path: outputs/aar/simpledroidble*.aar
|
||||
path: artifacts/simpledroidble.zip
|
||||
|
||||
# - name: Upload simpledroidble AAR to release
|
||||
# uses: svenstaro/upload-release-action@v2
|
||||
# if: github.event_name == 'release'
|
||||
# env:
|
||||
# TAG: ${{ inputs.tag }}
|
||||
# with:
|
||||
# file: outputs/aar/simpledroidble*.aar
|
||||
# tag: ${{ env.TAG }}
|
||||
# overwrite: true
|
||||
# file_glob: true
|
||||
build-examples:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# example:
|
||||
# runs-on: ubuntu-22.04
|
||||
# steps:
|
||||
# - name: Clone repository
|
||||
# uses: actions/checkout@v4
|
||||
- name: Add Version Suffix
|
||||
uses: ./.github/actions/setup-version
|
||||
|
||||
# - name: Android Setup
|
||||
# uses: ./.github/actions/android-setup
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: "17"
|
||||
distribution: "temurin"
|
||||
|
||||
# - name: Build example APK
|
||||
# working-directory: ./examples/simpleble-android
|
||||
# run: ./gradlew build
|
||||
- name: Setup Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
|
||||
# - name: Upload example APK to job
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# name: simpledroidble-example
|
||||
# path: examples/simpleble-android/app/build/outputs/apk/debug/*.apk
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
# - name: Upload lint report to job
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# name: simpledroidble-example-lint-report
|
||||
# path: examples/simpleble-android/app/build/reports/lint-results-debug.html
|
||||
- name: Build simplebledroidble examples AAR
|
||||
run: gradle :bundleReleaseAar -p ./examples/simpleble-android --no-daemon -Dorg.gradle.project.buildDir="$GITHUB_WORKSPACE/build_simpledroidble_examples"
|
||||
|
||||
# - name: Upload simpledroidble-example to release
|
||||
# uses: svenstaro/upload-release-action@v2
|
||||
# if: github.event_name == 'release'
|
||||
# env:
|
||||
# TAG: ${{ inputs.tag }}
|
||||
# with:
|
||||
# file: examples/simpleble-android/app/build/outputs/apk/debug/*.apk
|
||||
# tag: ${{ env.TAG }}
|
||||
# overwrite: true
|
||||
# file_glob: true
|
||||
- name: Package Artifact
|
||||
uses: ./.github/actions/package-native
|
||||
with:
|
||||
source-dir: $GITHUB_WORKSPACE/build_simpledroidble_examples/outputs/aar
|
||||
output-dir: $GITHUB_WORKSPACE/artifacts
|
||||
archive-name: simpledroidble_examples
|
||||
os: linux
|
||||
|
||||
- name: Upload Binaries
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: simpledroidble_examples
|
||||
path: artifacts/simpledroidble_examples.zip
|
Loading…
x
Reference in New Issue
Block a user