|
| 1 | +name: Kernel |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - '*' |
| 6 | + tags-ignore: |
| 7 | + - v* |
| 8 | + |
| 9 | +jobs: |
| 10 | + kernel: |
| 11 | + name: 'Zero-OS Kernel Image' |
| 12 | + runs-on: ubuntu-18.04 |
| 13 | + steps: |
| 14 | + - name: Checkout code |
| 15 | + uses: actions/checkout@v1 |
| 16 | + |
| 17 | + - name: Extract branch name |
| 18 | + shell: bash |
| 19 | + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" |
| 20 | + id: runbranch |
| 21 | + |
| 22 | + - name: 'Install: go' |
| 23 | + uses: actions/setup-go@v1 |
| 24 | + with: |
| 25 | + go-version: 1.14 |
| 26 | + id: go |
| 27 | + |
| 28 | + - name: 'Install: rust' |
| 29 | + uses: actions-rs/toolchain@v1 |
| 30 | + with: |
| 31 | + toolchain: stable |
| 32 | + target: x86_64-unknown-linux-musl |
| 33 | + default: true |
| 34 | + |
| 35 | + - name: 'Install: requirements' |
| 36 | + run: | |
| 37 | + sudo bash ./autobuild/tf-build-deps-clean.sh |
| 38 | +
|
| 39 | + - name: 'Fetch: sources' |
| 40 | + run: | |
| 41 | + export INTERACTIVE="false" |
| 42 | + sudo --preserve-env=PATH bash initramfs.sh --download |
| 43 | +
|
| 44 | + - name: 'Fetch: extensions' |
| 45 | + run: | |
| 46 | + cd extensions |
| 47 | + git clone https://github.com/zero-os/initramfs-gig |
| 48 | +
|
| 49 | + - name: 'Build: busybox' |
| 50 | + run: | |
| 51 | + sudo --preserve-env=PATH bash initramfs.sh --busybox |
| 52 | +
|
| 53 | + - name: 'Build: userland' |
| 54 | + run: | |
| 55 | + sudo --preserve-env=PATH bash initramfs.sh --tools |
| 56 | +
|
| 57 | + - name: 'Build: extensions' |
| 58 | + run: | |
| 59 | + sudo --preserve-env=PATH bash initramfs.sh --extensions |
| 60 | +
|
| 61 | + - name: 'Build: cores' |
| 62 | + run: | |
| 63 | + sudo --preserve-env=PATH bash initramfs.sh --cores |
| 64 | +
|
| 65 | + - name: 'Build: kernel' |
| 66 | + run: | |
| 67 | + sudo --preserve-env=PATH bash initramfs.sh --kernel --modules |
| 68 | +
|
| 69 | + - name: 'Upload: kernel' |
| 70 | + env: |
| 71 | + BOOTSTRAP_TOKEN: ${{ secrets.BOOTSTRAP_TOKEN }} |
| 72 | + IMAGE_BRANCH: ${{ steps.runbranch.outputs.branch }} |
| 73 | + run: | |
| 74 | + bash ./autobuild/tf-build-upload.sh |
| 75 | +
|
0 commit comments