diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2023-02-24 21:35:42 -0500 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2023-02-24 21:35:42 -0500 |
commit | b12cbd8755e42c77fa854ce082a5d23890c65146 (patch) | |
tree | d35c104af9a31c1650610e62617d0881322e04c4 | |
parent | d17e85ebdb4b1f9204505c1bed1b8dae3b80f2af (diff) | |
download | lite-xl-plugin-manager-b12cbd8755e42c77fa854ce082a5d23890c65146.tar.gz lite-xl-plugin-manager-b12cbd8755e42c77fa854ce082a5d23890c65146.zip |
Added in riscv support.
-rw-r--r-- | .github/workflows/build.yml | 17 | ||||
-rw-r--r-- | src/lpm.c | 4 |
2 files changed, 11 insertions, 10 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bc4f57f..a2227f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,9 +16,9 @@ jobs: run: git submodule update --init --depth=1 - name: Build Linux run: | - 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 + sudo apt-get install musl-tools musl musl-dev gcc-12-riscv64-linux-gnu + ./build clean && BIN=lpm.x86_64-linux CC=musl-gcc ./build.sh -DLPM_STATIC -DLPM_VERSION='"'$FULL_VERSION-x86_64-linux'"' -static + ./build clean && BIN=lpm.riscv64-linux CC=riscv64-linux-gnu-gcc-12 AR=riscv64-linux-gnu-ar ./build.sh -DLPM_STATIC -DLPM_VERSION='"'$FULL_VERSION-riscv64-linux'"' - name: Run Tests run: | ./lpm test t/run.lua @@ -40,10 +40,9 @@ jobs: # dpkg-deb --build --root-owner-group $NAME - name: Build Windows run: | - sudo apt-get install mingw-w64 && ./build.sh clean && 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'"' && zip -r lpm-$FULL_VERSION-x86_64-windows.zip lpm.exe - cp lpm.exe lpm.x86_64-windows.exe + 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'"' - name: Create Release(s) - env: { GITHUB_TOKEN: "${{ github.token }}", ARTIFACTS: "lpm.x86_64-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: "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" } run: | gh release delete -y continuous || true; gh release create -t 'Continuous Release' continuous $ARTIFACTS if [[ `git tag --points-at HEAD | head -c 1` == "v" ]]; then @@ -69,10 +68,8 @@ jobs: - 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 - cp lpm lpm.x86_64-darwin - ./build.sh clean && CC=clang CFLAGS="-arch arm64" ./build.sh -DLPM_STATIC -DLPM_VERSION='"'$FULL_VERSION-aarch64-darwin'"' && tar -czvf lpm-$FULL_VERSION-aarch64-darwin.tar.gz lpm - cp lpm lpm.aarch64-darwin + ./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 | head -c 1` == "v" ]]; then gh release upload v$VERSION lpm.x86_64-darwin @@ -1058,6 +1058,10 @@ static const luaL_Reg system_lib[] = { #define ARCH_PROCESSOR "aarch64" #elif defined(__arm__) || defined(_M_ARM) #define ARCH_PROCESSOR "arm" + #edif __riscv_xlen == 32 + #define ARCH_PROCESSOR "riscv32" + #elif __riscv_xlen == 64 + #define ARCH_PROCESSOR "riscv64" #else #error "Please define -DARCH_PROCESSOR." #endif |