forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 4
111 lines (93 loc) · 3.05 KB
/
build_visionfive2_kernel.yml
File metadata and controls
111 lines (93 loc) · 3.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Build VF2 Kernel
permissions:
contents: write
on:
#push:
# branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
workflow_run:
workflows: [Scheduled Merge Remote Action2]
types: [completed]
workflow_call:
# secrets:
# GPG_PRIVATE_KEY:
# description: 'GPG Private Key'
# required: True
# GPG_PUBLIC_KEY:
# description: 'GPG Public Key'
# required: True
# GPG_PRIVATE_KEY_PASSWORD:
# description: 'GPG Private Key Password'
# required: True
jobs:
build:
runs-on: ubuntu-latest
#runs-on: self-hosted
container:
image: tuxmake/riscv_gcc:latest
options: --user root
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: master
fetch-depth: 1
- name: Install dependencies
run: apt update && apt install -y build-essential debhelper #gcc-riscv64-linux-gnu
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
- name: Set git config options
run: git config --global --add safe.directory $(pwd)
- name: Make visionfive2_defconfig
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv visionfive2_docker_defconfig
- name: Make kernel
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv -j`nproc`
- name: Make modules
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv -j`nproc` modules
- name: Build .deb packages
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
make CROSS_COMPILE=riscv64-linux-gnu- ARCH=riscv -j`nproc` bindeb-pkg
- name: Copy .deb to /tmp
run: |
rm -rf /tmp/*
cp ../*.deb /tmp/
# - name: Cache Debs
# id: cache-debs-save
# uses: actions/cache@v3
# with:
# path: /tmp/
# key: "deb-cache-${{ github.run_id }}"
- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
with:
name: compiled_vf2_debs
path: /tmp/*.deb
retention-days: 5
- name: Push Git changes
run: |
git config --global user.email "merge-upstream-action@github.com"
git config --global user.name "Merge Upstream Action"
git add -f .version
git commit -m "Updating version" --no-edit
git push origin master
#Update_Repo:
# if: ${{ always() && contains(join(needs.*.result, ','), 'success') }}
# needs: [build]
# uses: ./.github/workflows/update_repo.yml
# secrets:
# GPG_PRIVATE_KEY: "${{ secrets.GPG_PRIVATE_KEY }}"
# GPG_PUBLIC_KEY: "${{ secrets.GPG_PUBLIC_KEY }}"
# GPG_PRIVATE_KEY_PASSWORD: "${{ secrets.GPG_PRIVATE_KEY_PASSWORD }}"
#Release_Kernel:
# if: ${{ always() && contains(join(needs.*.result, ','), 'success') }}
# needs: [build]
# uses: ./.github/workflows/release_vf2_kernel.yml