pmt: fixup wrong workflow

This commit is contained in:
2024-10-26 11:14:08 +03:00
committed by GitHub
parent e24e624dec
commit bc138e689f

View File

@@ -15,22 +15,16 @@ jobs:
id: cleanup id: cleanup
uses: rokibhasansagar/slimhub_actions@main uses: rokibhasansagar/slimhub_actions@main
- name: Setup GitHub CLI - name: Update and setup packages
id: setup-gh id: general-packages-progress
run: | run: |
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y) type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \ curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \ && sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \ && sudo apt update \
&& sudo apt install gh -y
- name: Update and setup packages
id: general-packages-progress
run: |
sudo apt update \
&& sudo apt upgrade -y \ && sudo apt upgrade -y \
&& sudo apt install make xz-utils aria2 gawk -y && sudo apt install make xz-utils aria2 gawk gh -y
- name: Save spefic version variables - name: Save spefic version variables
id: save-vars id: save-vars
@@ -46,6 +40,7 @@ jobs:
sudo chmod -R 777 pmt sudo chmod -R 777 pmt
echo "PMT_SRCDIR=/home/pmt" >> $GITHUB_ENV echo "PMT_SRCDIR=/home/pmt" >> $GITHUB_ENV
echo "NDK_DIR=/home/ndk/android-ndk" >> $GITHUB_ENV echo "NDK_DIR=/home/ndk/android-ndk" >> $GITHUB_ENV
echo "NDK_IN_DIR=/home/ndk" >> $GITHUB_ENV
sudo mkdir -p "/home/ndk" && cd "/home/ndk" && sudo chmod 777 "/home/ndk" sudo mkdir -p "/home/ndk" && cd "/home/ndk" && sudo chmod 777 "/home/ndk"
- name: Setup Android NDK - name: Setup Android NDK
@@ -62,11 +57,9 @@ jobs:
- name: Build pmt - name: Build pmt
id: build-pmt id: build-pmt
run: | run: |
make gen-ndk-makefiles
export NDK_PROJECT_PATH=${PWD} export NDK_PROJECT_PATH=${PWD}
export NDK_ROOT_DIR=${{ env.NDK_DIR }} export NDK_ROOT_DIR=${{ env.NDK_DIR }}
echo "NDK_ROOT_DIR=${NDK_ROOT_DIR}" >> $GITHUB_ENV . build/bash/gen-header
bash build/bash/gen-header
cd ${{ env.NDK_DIR }} cd ${{ env.NDK_DIR }}
./ndk-build ./ndk-build
working-directory: ${{ env.PMT_SRCDIR }} working-directory: ${{ env.PMT_SRCDIR }}
@@ -75,26 +68,18 @@ jobs:
id: small-transactions id: small-transactions
run: | run: |
export CXX_64="${PWD}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang++" export CXX_64="${PWD}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android21-clang++"
export CXX_32="${PWD}/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang++"
export AR="${PWD}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"
export CXX_VERSION=$(${CXX_64} --version | head -n 1) export CXX_VERSION=$(${CXX_64} --version | head -n 1)
echo "CXX_VERSION=${CXX_VERSION}" >> $GITHUB_ENV echo "CXX_VERSION=${CXX_VERSION}" >> $GITHUB_ENV
. ${{ env.PMT_SRCDIR }}/build/workflow/build.config . ${{ env.PMT_SRCDIR }}/build/workflow/build.config
. ${{ env.PMT_SRCDIR }}/build/workflow/relnotes > /home/pmt/release_body.txt . ${{ env.PMT_SRCDIR }}/build/workflow/relnotes > /home/pmt/release_body.txt
cd ${{ env.PMT_SRCDIR }} cd ${{ env.PMT_SRCDIR }}
zip -rq pmt-objs-local.zip obj/local/arm64-v8a obj/local/armeabi-v7a zip -rq pmt-objs-local.zip obj/local/arm64-v8a obj/local/armeabi-v7a
for arch in arm64-v8a armeabi-v7a; do xz libs/arm64-v8a/pmt
xz libs/${arch}/pmt xz libs/armeabi-v7a/pmt
mv libs/${arch}/pmt.xz ${PWD}/pmt-${arch}-$(date +%Y%m%d).xz mv libs/arm64-v8a/pmt.xz ${PWD}/pmt-arm64-v8a-$(date +%Y%m%d).xz
done mv libs/armeabi-v7a/pmt.xz ${PWD}/pmt-armeabi-v7a-$(date +%Y%m%d).xz
for CXX_COMP in ${CXX_64} ${CXX_32}; do cp build/mandoc/mandoc pmt.8
make clean gzip -c pmt.8 > mandoc.gz
make PMT_CXX="${CXX_COMP}" PMT_AR="${AR}" PMT_EXTRA_CFLAGS="-D__NDK_BUILD"
[[ "${CXX_COMP}" == *"aarch64"* ]] && make deb FOR_THIS=64
[[ "${CXX_COMP}" == *"armv7a"* ]] && make deb FOR_THIS=32
mv out/debpackage/*.deb .
make clean
done
working-directory: ${{ env.NDK_DIR }} working-directory: ${{ env.NDK_DIR }}
- name: Upload to release - name: Upload to release
@@ -103,8 +88,8 @@ jobs:
with: with:
files: | files: |
/home/pmt/pmt*.xz /home/pmt/pmt*.xz
/home/pmt/pmt*.deb
/home/pmt/pmt-objs-local.zip /home/pmt/pmt-objs-local.zip
/home/pmt/mandoc.gz
name: Partition Manager ${{ env.PMT_VERSION }} Release name: Partition Manager ${{ env.PMT_VERSION }} Release
tag_name: ${{ env.PMT_VERSION }} tag_name: ${{ env.PMT_VERSION }}
body_path: /home/pmt/release_body.txt body_path: /home/pmt/release_body.txt