Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build.yml #3

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 21 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,28 +91,32 @@ jobs:

- name: "🌟 Clone kernel source => (${{ env.KERNEL_REPO }})"
run: |
git clone --recursive --depth=1 -j $(nproc) --branch $KERNEL_BRANCH $KERNEL_REPO $KERNEL_NAME
git clone --recursive --depth=1 -j $(nproc) https://github.com/Abdullashakee/kernel_xiaomi_vayu.git

echo "🤔 Clone kernel source => ($KERNEL_REPO)"

- name: 🔢 Extract kernel version
working-directory: ${{ env.KERNEL_NAME }}

- name: "Change to SkylineKernel directory"
run: |
kernel_version=$(grep "^VERSION = " Makefile | cut -d ' ' -f 3)
patchlevel=$(grep "^PATCHLEVEL = " Makefile | cut -d ' ' -f 3)
sublevel=$(grep "^SUBLEVEL = " Makefile | cut -d ' ' -f 3)
local_kernel_version="${kernel_version}.${patchlevel}.${sublevel}"
echo "Kernel Version: $local_kernel_version"
echo "KERNEL_VERSION=${local_kernel_version}" >> $GITHUB_ENV
if [ -d "SkylineKernel" ]; then
cd SkylineKernel || exit
fi

- name: "Extract Kernel Version"
run: |
kernel_version=$(grep "^VERSION = " Makefile | cut -d ' ' -f 3)
patchlevel=$(grep "^PATCHLEVEL = " Makefile | cut -d ' ' -f 3)
sublevel=$(grep "^SUBLEVEL = " Makefile | cut -d ' ' -f 3)
echo "Kernel Version: ${kernel_version}.${patchlevel}.${sublevel}"


- name: "💫 Get toolchains"
env:
toolchains: "${{ toJSON(matrix.repos.toolchains) }}"
run: |
toolchains_num="$(echo $toolchains | jq 'length')"
echo "🤔 There is $toolchains_num defined toolchains."
for ((i=0;i<toolchains_num;i++)); do
toolchain_name=$(echo $toolchains | jq -r ".[$i].name")
toolchain_name=$echo $toolchains | jq -r ".[$i].name")
# Github
toolchain_repo=$(echo $toolchains | jq -r ".[$i].repo")
toolchain_branch=$(echo $toolchains | jq -r ".[$i].branch")
Expand Down Expand Up @@ -218,12 +222,13 @@ jobs:
- name: "👍 Make defconfig"
working-directory: ${{ env.KERNEL_NAME }}
env:
args: ${{ steps.generate-args.outputs.args }}
arch: ${{ steps.generate-args.outputs.ARCH }}
run: |
echo "PATH Variable: $PATH"
make ${{ env.args }} ${{ env.DEFCONFIG_NAME }}
args: ${{ steps.generate-args.outputs.args }}
arch: ${{ steps.generate-args.outputs.ARCH }}
run: |
echo "PATH Variable: $PATH"
make ${{ env.args }} vayu_user_defconfig


- name: "🔡 Generate name for files and artifacts"
run: |
echo "GITHUB_RELEASE_TAG=${{ github.run_number }}.v${{ env.KERNEL_VERSION }}.${{ env.KERNEL_NAME }}.${{ env.KERNEL_DEVICE }}.${{ env.builddate }}" >> $GITHUB_ENV
Expand Down