File: Android.yml

package info (click to toggle)
duckdb 1.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 299,196 kB
  • sloc: cpp: 865,414; ansic: 57,292; python: 18,871; sql: 12,663; lisp: 11,751; yacc: 7,412; lex: 1,682; sh: 747; makefile: 558
file content (103 lines) | stat: -rw-r--r-- 2,991 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Android
on:
  workflow_call:
    inputs:
      override_git_describe:
        type: string
      git_ref:
        type: string
      skip_tests:
        type: string
  workflow_dispatch:
    inputs:
      override_git_describe:
        type: string
      git_ref:
        type: string
      skip_tests:
        type: string
  repository_dispatch:
  push:
    branches-ignore:
      - 'main'
      - 'feature'
      - 'v*.*-*'
    paths-ignore:
      - '**'
      - '!.github/workflows/Android.yml'
  pull_request:
    types: [opened, reopened, ready_for_review]
    paths-ignore:
      - '**'
      - '!.github/workflows/Android.yml'
      - '!.github/patches/duckdb-wasm/**'


concurrency:
  group: android-${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}-${{ inputs.override_git_describe }}
  cancel-in-progress: true

env:
  GH_TOKEN: ${{ secrets.GH_TOKEN }}
  OVERRIDE_GIT_DESCRIBE: ${{ inputs.override_git_describe }}

jobs:
  android:
    name: Android
    runs-on: ubuntu-latest
    if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/feature' }}

    strategy:
      matrix:
        arch: [ armeabi-v7a, arm64-v8a ]

    env:
      ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
      ENABLE_EXTENSION_AUTOLOADING: 1
      ENABLE_EXTENSION_AUTOINSTALL: 1
      GEN: ninja
      EXTENSION_STATIC_BUILD: 1
      DUCKDB_PLATFORM: android_${{ matrix.arch}}
      DUCKDB_CUSTOM_PLATFORM: android_${{ matrix.arch}}
      CMAKE_VARS_BUILD: -DBUILD_UNITTESTS=0 -DBUILD_SHELL=0 -DANDROID_ABI=${{ matrix.arch}} -DCMAKE_TOOLCHAIN_FILE=./android-ndk/build/cmake/android.toolchain.cmake -DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON

    steps:
    - uses: actions/checkout@v4
      with:
        fetch-depth: 0
        ref: ${{ inputs.git_ref }}

    - name: Install Ninja
      shell: bash
      run: sudo apt-get -y update && sudo apt-get -y install ninja-build

    - name: Checkout (again)
      shell: bash
      run: git checkout ${{ inputs.git_ref }}

    - name: Install Android NDK
      shell: bash
      run: |
        wget https://dl.google.com/android/repository/android-ndk-r27-linux.zip
        unzip android-ndk-r27-linux.zip
        mv android-ndk-r27 android-ndk

    - name:  Build
      shell: bash
      run: make

    - name: Deploy
      shell: bash
      env:
        AWS_ENDPOINT_URL: ${{ secrets.S3_DUCKDB_STAGING_ENDPOINT }}
        AWS_ACCESS_KEY_ID: ${{ secrets.S3_DUCKDB_STAGING_ID }}
        AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DUCKDB_STAGING_KEY }}
      run: |
        zip -j libduckdb-android_${{matrix.arch}}.zip build/release/src/libduckdb*.*  src/include/duckdb.h
        ./scripts/upload-assets-to-staging.sh github_release libduckdb-android_${{matrix.arch}}.zip

    - uses: actions/upload-artifact@v4
      with:
        name: duckdb-binaries-android-${{matrix.arch}}
        path: |
          libduckdb-android_${{matrix.arch}}.zip