-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (51 loc) · 1.73 KB
/
Copy pathbuild.yml
File metadata and controls
53 lines (51 loc) · 1.73 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
name: Build toolchain
on: [push]
env:
JOBS: 2
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install packages
run: sudo apt install -y u-boot-tools
- name: Check out repository code
uses: actions/checkout@v3
- name: Download toolchain
run: |
wget "https://github.com/OpenNoah/toolchain/releases/download/v758af2f/mipsel-linux-11.2.0-8f6af9284.tar.xz"
tar axf mipsel-linux*.tar.xz
echo "TOOLCHAIN=$(realpath mipsel-linux*/)" >> $GITHUB_ENV
- name: Build busybox rootfs
run: PATH="$PATH:${{ env.TOOLCHAIN }}/bin" ./build.sh
- name: Check out linux-new
uses: actions/checkout@v3
with:
repository: 'OpenNoah/linux-new'
ref: 'np-5.17.3'
path: 'linux'
- name: Build linux
run: PATH="$PATH:${{ env.TOOLCHAIN }}/bin" DEFCONFIG=noah_np1380_defconfig ./kernel.sh
- name: Archive
run: |
./release.sh
echo "RELEASE_ROOTFS=$(echo -e rootfs-*.tar.xz)" >> $GITHUB_ENV
echo "RELEASE_UIMAGE=$(echo -e uImage-*)" >> $GITHUB_ENV
- name: Upload artifact - rootfs
uses: actions/upload-artifact@v3
with:
name: ${{ env.RELEASE_ROOTFS }}
path: ${{ env.RELEASE_ROOTFS }}
if-no-files-found: error
- name: Upload artifact - uImage
uses: actions/upload-artifact@v3
with:
name: ${{ env.RELEASE_UIMAGE }}
path: ${{ env.RELEASE_UIMAGE }}
if-no-files-found: error
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{ env.RELEASE_ROOTFS }}
${{ env.RELEASE_UIMAGE }}