aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yml18
-rw-r--r--manifest.json20
-rw-r--r--src/lpm.c2
3 files changed, 35 insertions, 5 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index ff69f93..635a1ae 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -19,6 +19,14 @@ jobs:
sudo apt-get install musl-tools musl musl-dev
CC=musl-gcc ./build.sh -DLPM_STATIC -DLPM_VERSION='"'$FULL_VERSION-x86_64-linux'"' -static && tar -czvf lpm-$FULL_VERSION-x86_64-linux.tar.gz lpm
cp lpm lpm.x86_64-linux
+ - name: Build Android
+ env: { ANDROID_ARCH: "26" }
+ run: |
+ export CMAKE_DEFAULT_FLAGS="-DCMAKE_ANDROID_NDK=$ANDROID_NDK_HOME -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=NEVER -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_INCLUDE_PATH=$ANDROID_SYSROOT_NDK/sysroot/usr/include"
+ ./build.sh clean && export ARCH="arm-android" && BIN=lpm.$ARCH CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi$ANDROID_ARCH-clang CFLAGS="-Dinline=" ./build.sh -DLPM_VERSION='"'$FULL_VERSION-$ARCH'"' -DLPM_STATIC
+ ./build.sh clean && export ARCH="aarch64-android" && BIN=lpm.$ARCH CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android$ANDROID_ARCH-clang CFLAGS="-Dinline=" ./build.sh -DLPM_VERSION='"'$FULL_VERSION-$ARCH'"' -DLPM_STATIC
+ ./build.sh clean && export ARCH="x86-android" && BIN=lpm.$ARCH CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android$ANDROID_ARCH-clang CFLAGS="-Dinline=" ./build.sh -DLPM_VERSION='"'$FULL_VERSION-$ARCH'"' -DLPM_STATIC
+ ./build.sh clean && export ARCH="x86_64-android" && BIN=lpm.$ARCH CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android$ANDROID_ARCH-clang CFLAGS="-Dinline=" ./build.sh -DLPM_VERSION='"'$FULL_VERSION-$ARCH'"' -DLPM_STATIC
- name: Run Tests
run: |
./lpm test t/run.lua
@@ -38,10 +46,10 @@ jobs:
run: |
gh release delete -y continuous || true; gh release create -t 'Continuous Release' continuous *.zip *.tar.gz
if [[ `git tag --points-at HEAD | head -c 1` == "v" ]]; then
- gh release delete -y v$VERSION || true;
- gh release create -t v$VERSION v$VERSION lpm.x86_64-linux lpm.x86_64-windows.exe
- gh release delete -y latest || true;
- gh release create -t latest latest lpm.x86_64-linux lpm.x86_64-windows.exe
+ gh release delete -y v$VERSION || true;
+ gh release create -t v$VERSION v$VERSION lpm.x86_64-linux lpm.x86_64-windows.exe lpm.*-android
+ gh release delete -y latest || true;
+ gh release create -t latest latest lpm.x86_64-linux lpm.x86_64-windows.exe lpm.*-android
fi
build_macos:
@@ -57,7 +65,7 @@ jobs:
run: echo VERSION=`git describe --tags --abbrev=0 --match "v*" | tail -c +2` >> $GITHUB_ENV && echo FULL_VERSION=`git describe --tags --match "v*" | tail -c +2` >> $GITHUB_ENV && echo REV=$((`git describe --tags --match "v*" | sed 's/.*-\([0-9]*\)-.*/\1/' | sed s/^v.*//` + 1)) >> $GITHUB_ENV
- name: Clone Submodules
run: git submodule update --init --depth=1
- - name: Build MacOS
+ - name: Build MacOS
env: { GITHUB_TOKEN: "${{ github.token }}" }
run: |
./build.sh -DLPM_STATIC -DLPM_VERSION='"'$FULL_VERSION-x86_64-darwin'"' && tar -czvf lpm-$FULL_VERSION-x86_64-darwin.tar.gz lpm
diff --git a/manifest.json b/manifest.json
index 2b030d8..5c0c6d5 100644
--- a/manifest.json
+++ b/manifest.json
@@ -21,6 +21,26 @@
"url": "https://github.com/lite-xl/lite-xl-plugin-manager/releases/download/latest/lpm.x86_64-darwin",
"arch": "x86_64-darwin",
"checksum": "SKIP"
+ },
+ {
+ "url": "https://github.com/lite-xl/lite-xl-plugin-manager/releases/download/latest/lpm.aarch64-android",
+ "arch": "aarch64-android",
+ "checksum": "SKIP"
+ },
+ {
+ "url": "https://github.com/lite-xl/lite-xl-plugin-manager/releases/download/latest/lpm.amd-android",
+ "arch": "amd-android",
+ "checksum": "SKIP"
+ },
+ {
+ "url": "https://github.com/lite-xl/lite-xl-plugin-manager/releases/download/latest/lpm.x86-android",
+ "arch": "x86-android",
+ "checksum": "SKIP"
+ },
+ {
+ "url": "https://github.com/lite-xl/lite-xl-plugin-manager/releases/download/latest/lpm.x86_64-android",
+ "arch": "x86_64-android",
+ "checksum": "SKIP"
}
],
"dependencies": {
diff --git a/src/lpm.c b/src/lpm.c
index c0104cd..8dd2dff 100644
--- a/src/lpm.c
+++ b/src/lpm.c
@@ -1065,6 +1065,8 @@ static const luaL_Reg system_lib[] = {
#ifndef ARCH_PLATFORM
#if _WIN32
#define ARCH_PLATFORM "windows"
+ #elif __ANDROID__
+ #define ARCH_PLATFORM "android"
#elif __linux__
#define ARCH_PLATFORM "linux"
#elif __APPLE__