-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
561 additions
and
556 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
name: CI | ||
on: { push: { branches: [master] } } | ||
permissions: write-all | ||
jobs: | ||
build_linux_android_windows: | ||
runs-on: ubuntu-latest | ||
|
@@ -18,35 +19,35 @@ jobs: | |
run: | | ||
sudo apt-get install musl-tools musl musl-dev | ||
wget -q https://musl.cc/riscv64-linux-musl-cross.tgz && tar -zxvf riscv64-linux-musl-cross.tgz | ||
./build.sh clean && BIN=lpm.riscv64-linux CC=`pwd`/riscv64-linux-musl-cross/bin/riscv64-linux-musl-cc AR=`pwd`/riscv64-linux-musl-cross/bin/riscv64-linux-musl-ar ./build.sh -DLPM_STATIC -DLPM_VERSION='"'$FULL_VERSION-riscv64-linux'"' -static | ||
./build.sh clean && BIN=lpm.x86_64-linux CC=musl-gcc ./build.sh -DLPM_STATIC -DLPM_VERSION='"'$FULL_VERSION-x86_64-linux'"' -static | ||
- name: Run Tests | ||
run: | | ||
cp ./lpm.x86_64-linux lpm && ./lpm test t/run.lua | ||
./build.sh clean && BIN=ppm.riscv64-linux CC=`pwd`/riscv64-linux-musl-cross/bin/riscv64-linux-musl-cc AR=`pwd`/riscv64-linux-musl-cross/bin/riscv64-linux-musl-ar ./build.sh -DPPM_STATIC -DPPM_VERSION='"'$FULL_VERSION-riscv64-linux'"' -static | ||
./build.sh clean && BIN=ppm.x86_64-linux CC=musl-gcc ./build.sh -DPPM_STATIC -DPPM_VERSION='"'$FULL_VERSION-x86_64-linux'"' -static | ||
# - name: Run Tests | ||
# run: | | ||
# cp ./ppm.x86_64-linux ppm && ./ppm test t/run.lua | ||
- name: Build Android | ||
env: { ANDROID_ABI_VERSION: "26" } | ||
run: | | ||
export CMAKE_DEFAULT_FLAGS="-DCMAKE_ANDROID_NDK=$ANDROID_NDK_HOME -DCMAKE_ANDROID_API=$ANDROID_ABI_VERSION -DCMAKE_SYSTEM_VERSION=$ANDROID_ABI_VERSION -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" | ||
export AR="$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar" | ||
./build.sh clean && export ARCH="arm-android" && CFLAGS="-Dinline=" BIN=lpm.$ARCH CMAKE_DEFAULT_FLAGS="$CMAKE_DEFAULT_FLAGS -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a" CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi$ANDROID_ABI_VERSION-clang ./build.sh -DLPM_VERSION='"'$FULL_VERSION-$ARCH'"' -DLPM_STATIC | ||
./build.sh clean && export ARCH="aarch64-android" && CFLAGS="-Dinline=" BIN=lpm.$ARCH CMAKE_DEFAULT_FLAGS="$CMAKE_DEFAULT_FLAGS -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a" CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android$ANDROID_ABI_VERSION-clang ./build.sh -DLPM_VERSION='"'$FULL_VERSION-$ARCH'"' -DLPM_STATIC | ||
./build.sh clean && export ARCH="x86-android" && CFLAGS="-Dinline=" BIN=lpm.$ARCH CMAKE_DEFAULT_FLAGS="$CMAKE_DEFAULT_FLAGS -DCMAKE_ANDROID_ARCH_ABI=x86" CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android$ANDROID_ABI_VERSION-clang ./build.sh -DLPM_VERSION='"'$FULL_VERSION-$ARCH'"' -DLPM_STATIC | ||
./build.sh clean && export ARCH="x86_64-android" && CFLAGS="-Dinline=" BIN=lpm.$ARCH CMAKE_DEFAULT_FLAGS="$CMAKE_DEFAULT_FLAGS -DCMAKE_ANDROID_ARCH_ABI=x86_64" CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android$ANDROID_ABI_VERSION-clang ./build.sh -DLPM_VERSION='"'$FULL_VERSION-$ARCH'"' -DLPM_STATIC | ||
./build.sh clean && export ARCH="arm-android" && CFLAGS="-Dinline=" BIN=ppm.$ARCH CMAKE_DEFAULT_FLAGS="$CMAKE_DEFAULT_FLAGS -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a" CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi$ANDROID_ABI_VERSION-clang ./build.sh -DPPM_VERSION='"'$FULL_VERSION-$ARCH'"' -DPPM_STATIC | ||
./build.sh clean && export ARCH="aarch64-android" && CFLAGS="-Dinline=" BIN=ppm.$ARCH CMAKE_DEFAULT_FLAGS="$CMAKE_DEFAULT_FLAGS -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a" CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android$ANDROID_ABI_VERSION-clang ./build.sh -DPPM_VERSION='"'$FULL_VERSION-$ARCH'"' -DPPM_STATIC | ||
./build.sh clean && export ARCH="x86-android" && CFLAGS="-Dinline=" BIN=ppm.$ARCH CMAKE_DEFAULT_FLAGS="$CMAKE_DEFAULT_FLAGS -DCMAKE_ANDROID_ARCH_ABI=x86" CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android$ANDROID_ABI_VERSION-clang ./build.sh -DPPM_VERSION='"'$FULL_VERSION-$ARCH'"' -DPPM_STATIC | ||
./build.sh clean && export ARCH="x86_64-android" && CFLAGS="-Dinline=" BIN=ppm.$ARCH CMAKE_DEFAULT_FLAGS="$CMAKE_DEFAULT_FLAGS -DCMAKE_ANDROID_ARCH_ABI=x86_64" CC=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android$ANDROID_ABI_VERSION-clang ./build.sh -DPPM_VERSION='"'$FULL_VERSION-$ARCH'"' -DPPM_STATIC | ||
# - name: Package Debian/Ubuntu | ||
# env: { ARCH: "amd64", DESCRIPTION: "A plugin manager for the lite-xl text editor.", MAINTAINER: "Adam Harrison <[email protected]>" } | ||
# env: { ARCH: "amd64", DESCRIPTION: "A plugin manager for the pragtical text editor.", MAINTAINER: "Adam Harrison <[email protected]>" } | ||
# run: | | ||
# export NAME=lpm_$VERSION.0-$REV""_$ARCH | ||
# mkdir -p $NAME/usr/bin $NAME/DEBIAN && cp lpm $NAME/usr/bin | ||
# printf "Package: lpm\nVersion: $VERSION\nArchitecture: $ARCH\nMaintainer: $MAINTAINER\nDescription: $DESCRIPTION\n" > $NAME/DEBIAN/control | ||
# export NAME=ppm_$VERSION.0-$REV""_$ARCH | ||
# mkdir -p $NAME/usr/bin $NAME/DEBIAN && cp ppm $NAME/usr/bin | ||
# printf "Package: ppm\nVersion: $VERSION\nArchitecture: $ARCH\nMaintainer: $MAINTAINER\nDescription: $DESCRIPTION\n" > $NAME/DEBIAN/control | ||
# dpkg-deb --build --root-owner-group $NAME | ||
- name: Build Windows | ||
run: | | ||
sudo apt-get install mingw-w64 && ./build.sh clean && BIN=lpm.x86_64-windows.exe CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-gcc-ar WINDRES=x86_64-w64-mingw32-windres CMAKE_DEFAULT_FLAGS="-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=NEVER -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_INCLUDE_PATH=/usr/share/mingw-w64/include" LZMA_CONFIGURE="--host=x86_64-w64-mingw32" GIT2_CONFIGURE="-DDLLTOOL=x86_64-w64-mingw32-dlltool" ./build.sh -DLPM_STATIC -DLPM_VERSION='"'$VERSION-x86_64-windows'"' | ||
sudo apt-get install mingw-w64 && ./build.sh clean && BIN=ppm.x86_64-windows.exe CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-gcc-ar WINDRES=x86_64-w64-mingw32-windres CMAKE_DEFAULT_FLAGS="-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=NEVER -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_INCLUDE_PATH=/usr/share/mingw-w64/include" LZMA_CONFIGURE="--host=x86_64-w64-mingw32" GIT2_CONFIGURE="-DDLLTOOL=x86_64-w64-mingw32-dlltool" ./build.sh -DPPM_STATIC -DPPM_VERSION='"'$VERSION-x86_64-windows'"' | ||
- name: Create Release(s) | ||
env: { GITHUB_TOKEN: "${{ github.token }}", ARTIFACTS: "lpm.x86_64-linux lpm.riscv64-linux lpm.x86_64-windows.exe lpm.arm-android lpm.aarch64-android lpm.x86-android lpm.x86_64-android" } | ||
env: { GITHUB_TOKEN: "${{ github.token }}", ARTIFACTS: "ppm.x86_64-linux ppm.riscv64-linux ppm.x86_64-windows.exe ppm.arm-android ppm.aarch64-android ppm.x86-android ppm.x86_64-android" } | ||
run: | | ||
gh release delete -y continuous || true; gh release create -t 'Continuous Release' continuous $ARTIFACTS | ||
if [[ `git tag --points-at HEAD v* | head -c 1` == "v" ]]; then | ||
if git tag --points-at HEAD | tail -n1 | grep "^v"; then | ||
gh release delete -y v$VERSION || true; | ||
gh release create -t v$VERSION v$VERSION $ARTIFACTS | ||
gh release delete -y latest || true; | ||
|
@@ -69,14 +70,14 @@ jobs: | |
- name: Build MacOS | ||
env: { GITHUB_TOKEN: "${{ github.token }}" } | ||
run: | | ||
./build.sh clean && BIN=lpm.x86_64-darwin ./build.sh -DLPM_STATIC -DLPM_VERSION='"'$FULL_VERSION-x86_64-darwin'"' | ||
./build.sh clean && BIN=lpm.aarch64-darwin CC=clang CFLAGS="-arch arm64" ./build.sh -DLPM_STATIC -DLPM_VERSION='"'$FULL_VERSION-aarch64-darwin'"' | ||
gh release upload continuous lpm.x86_64-darwin lpm.aarch64-darwin | ||
if [[ `git tag --points-at HEAD v* | head -c 1` == "v" ]]; then | ||
gh release upload v$VERSION lpm.x86_64-darwin | ||
gh release upload latest lpm.x86_64-darwin | ||
gh release upload v$VERSION lpm.aarch64-darwin | ||
gh release upload latest lpm.aarch64-darwin | ||
./build.sh clean && BIN=ppm.x86_64-darwin ./build.sh -DPPM_STATIC -DPPM_VERSION='"'$FULL_VERSION-x86_64-darwin'"' | ||
./build.sh clean && BIN=ppm.aarch64-darwin CC=clang CFLAGS="-arch arm64" ./build.sh -DPPM_STATIC -DPPM_VERSION='"'$FULL_VERSION-aarch64-darwin'"' | ||
gh release upload continuous ppm.x86_64-darwin ppm.aarch64-darwin | ||
if git tag --points-at HEAD | tail -n1 | grep "^v"; then | ||
gh release upload v$VERSION ppm.x86_64-darwin | ||
gh release upload latest ppm.x86_64-darwin | ||
gh release upload v$VERSION ppm.aarch64-darwin | ||
gh release upload latest ppm.aarch64-darwin | ||
git branch -f latest HEAD | ||
git tag -f latest | ||
git push -f origin refs/heads/latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
lpm | ||
ppm | ||
lua.exe | ||
lpm-* | ||
ppm-* | ||
*.o | ||
lpm.lua.c | ||
ppm.lua.c | ||
lib/prefix | ||
src/lpm.luac.c | ||
src/lpm.luac | ||
src/ppm.luac.c | ||
src/ppm.luac | ||
lib/mbedtls-2.27.0/build | ||
lib/mbedtls-2.27.0/tests |
Oops, something went wrong.