forked from lxc/lxcfs
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (59 loc) · 2.42 KB
/
Copy pathmain.yml
File metadata and controls
70 lines (59 loc) · 2.42 KB
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
name: Android Build lxcfs-dev
on:
workflow_dispatch:
inputs:
target_arch:
description: 'Target architecture (aarch64/arm/x86_64/i686)'
required: false
default: 'aarch64'
ndk_version:
description: 'Android NDK version'
required: false
default: 'r27c'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Android NDK
uses: nttld/setup-ndk@v1
with:
ndk-version: ${{ github.event.inputs.ndk_version || 'r27c' }}
- name: Install dependencies
run: |
sudo apt-get install -y -qq build-essential pipx python3-venv pkg-config \
cmake docbook2x python3-pip pipx help2man
pipx ensurepath
pipx install meson==0.61
pipx install ninja
- name: Download dependencies
run: |
libfuse_link=$(curl -s https://api.github.com/repos/DreamConnected/libfuse-dev/releases/latest | grep browser_download_url | cut -d'"' -f4 |grep -E 'zip$')
libfuse_name=$(curl -s https://api.github.com/repos/DreamConnected/libfuse-dev/releases/latest | grep name | cut -d'"' -f4 |grep -E 'zip$')
wget ${libfuse_link}
sudo unzip ${libfuse_name} -d /
- name: Build lxcfs-dev
run: |
sed -i "s|android-ndk-r27c|$ANDROID_NDK_HOME|g" aarch64-android-api30.txt
export PKG_CONFIG_PATH=/data/sysroot/lib/pkgconfig:$PKG_CONFIG_PATH
meson setup build -Dinit-script=sysvinit -Dprefix=/data/share -Druntime-path=/cache --localstatedir=/data/share/var --cross-file aarch64-android-api30.txt
meson compile -C build
sudo ninja -C build install
echo "RELEASE_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Upload artifacts
uses: actions/upload-artifact@v4.3.1
with:
name: android-${{ github.event.inputs.target_arch || 'aarch64' }}-lxcfs-dev
path: /data/share/*
- name: Create a ZIP file for artifact
run: zip -r android-${{ github.event.inputs.target_arch || 'aarch64' }}-lxcfs-dev.zip /data/share/*
- name: Create Release and Upload Release Asset
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.RELEASE_DATE }}
name: Release ${{ env.RELEASE_DATE }}
body: TODO New Release.
draft: false
prerelease: false
files: |
android-${{ github.event.inputs.target_arch || 'aarch64' }}-lxcfs-dev.zip