-
-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (61 loc) · 2.53 KB
/
build-arm64.yml
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
name: Kernel Build ARM64
on:
push:
branches: ["main"]
pull_request:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
variant: ["mt8192", "mt8183", "sc7180", "rpi"]
runs-on: arm64
container:
image: registry.fedoraproject.org/fedora-minimal:40
steps:
- name: Install Toolchain
run: |
curl -L https://github.com/terrapkg/subatomic-repos/raw/main/terra.repo -o /etc/yum.repos.d/terra.repo
dnf5 up -y
dnf5 install -y make gcc ccache flex bison elfutils-devel xz bc tar openssl-devel rpmbuild git dwarves openssl perl python3 rsync gcc-aarch64-linux-gnu subatomic-cli
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: "recursive"
- name: Set git user
run: |
git config --global user.name "FyraLabs CI"
git config --global user.email "[email protected]"
- name: Setup each variant
run: make -C ${{ matrix.variant }} setup
- name: Setup enviroment variables
run: |
echo "CCACHE_DIR=$(pwd)/ccache" >> $GITHUB_ENV
echo "KERNEL_COMMIT=$(cd linux && git rev-parse HEAD)" >> $GITHUB_ENV
- name: Setup ccache cache
uses: actions/cache@v3
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-${{ matrix.variant }}-${{ env.KERNEL_COMMIT }}-${{ hashFiles(format('{0}/config', matrix.variant)) }}
restore-keys: |
ccache-${{ matrix.variant }}-${{ env.KERNEL_COMMIT }}-
ccache-${{ matrix.variant }}-
- name: Set git safe directory
run: git config --global safe.directory '*'
- name: Make
run: git config --global user.email "[email protected]" && git config --global user.email "[email protected]" && make -C ${{ matrix.variant }} CC="ccache aarch64-linux-gnu-gcc" compile
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.variant }}
path: |
${{ format('{0}/rpmbuild/RPMS/aarch64/kernel-{0}*.rpm', matrix.variant) }}
${{ format('{0}/rpmbuild/SRPMS/kernel-{0}*.src.rpm', matrix.variant) }}
- name: Upload packages to Subatomic
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
subatomic-cli upload --prune \
--server https://subatomic.fyralabs.com \
--token ${{ secrets.SUBATOMIC_TOKEN }} \
kaibutsu ${{ matrix.variant }}/rpmbuild/SRPMS/* ${{ matrix.variant }}/rpmbuild/RPMS/aarch64/*