mirror of
https://github.com/brain-hackers/buildbrain
synced 2024-12-22 12:10:12 +09:00
Merge pull request #7 from f0reachARR/master
Merge CI implementation to the working branch
This commit is contained in:
commit
65afaac673
89
.github/workflows/build.yml
vendored
Normal file
89
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
name: Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
create_release:
|
||||||
|
name: Create release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
steps:
|
||||||
|
- name: Generate release name
|
||||||
|
id: release_name
|
||||||
|
run: echo "::set-output name=name::`date "+%Y%m%d-%H"`"
|
||||||
|
- name: Create release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ steps.release_name.outputs.name }}
|
||||||
|
release_name: ${{ steps.release_name.outputs.name }}
|
||||||
|
body: |
|
||||||
|
Build ${{ steps.release_name.outputs.name }}
|
||||||
|
draft: false
|
||||||
|
prerelease: true
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: [create_release]
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
hardware:
|
||||||
|
- sh1
|
||||||
|
- sh2
|
||||||
|
- sh3
|
||||||
|
- sh4
|
||||||
|
- sh5
|
||||||
|
- sh6
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- name: Workaround for apt update failure
|
||||||
|
run: sudo rm /etc/apt/sources.list.d/github_git-lfs.*
|
||||||
|
- name: Install deps
|
||||||
|
run: sudo apt update && sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabi qemu-user-static debootstrap
|
||||||
|
|
||||||
|
- name: Build nkbin-maker
|
||||||
|
run: make nkbin-maker
|
||||||
|
- name: Configure for U-Boot
|
||||||
|
run: make udefconfig-${{ matrix.hardware }}
|
||||||
|
- name: Build U-Boot
|
||||||
|
run: make ubuild
|
||||||
|
- name: Generate NK.bin
|
||||||
|
run: make nk.bin
|
||||||
|
|
||||||
|
- name: Configure for Linux
|
||||||
|
run: make ldefconfig
|
||||||
|
- name: Build Linux
|
||||||
|
run: make lbuild
|
||||||
|
|
||||||
|
# - name: Build Debian Root # Wait for buildroot
|
||||||
|
# run: |
|
||||||
|
# ./tools/aptcache_linux_amd64 \
|
||||||
|
# -rule 'local=localhost:65432, remote=ftp.us.debian.org' \
|
||||||
|
# -rule 'local=localhost:65433, remote=security.debian.org' &
|
||||||
|
# make debian
|
||||||
|
- name: Setup releases
|
||||||
|
id: release_name
|
||||||
|
run: |
|
||||||
|
mkdir release
|
||||||
|
cp ./u-boot-brain/u-boot.bin release/u-boot.bin
|
||||||
|
cp ./u-boot-brain/u-boot.sb release/u-boot.sb
|
||||||
|
cp ./nk.bin release/nk.bin
|
||||||
|
cp ./linux-brain/arch/arm/boot/dts/imx28-evk.dtb release/imx28-evk.dtb
|
||||||
|
cp ./linux-brain/arch/arm/boot/zImage release/zImage
|
||||||
|
zip -r release.zip release/
|
||||||
|
- name: Upload release.zip
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
||||||
|
asset_path: release.zip
|
||||||
|
asset_name: ${{ matrix.hardware }}-release.zip
|
||||||
|
asset_content_type: application/zip
|
2
Makefile
2
Makefile
@ -85,7 +85,7 @@ debian:
|
|||||||
echo "Debootstrap is only available in Linux!"; \
|
echo "Debootstrap is only available in Linux!"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
mkdir debian
|
mkdir -p debian
|
||||||
sudo debootstrap --arch=armel --foreign buster debian/ http://localhost:65432/debian/
|
sudo debootstrap --arch=armel --foreign buster debian/ http://localhost:65432/debian/
|
||||||
sudo cp /usr/bin/qemu-arm-static debian/usr/bin/
|
sudo cp /usr/bin/qemu-arm-static debian/usr/bin/
|
||||||
sudo cp ./tools/setup_debian.sh debian/
|
sudo cp ./tools/setup_debian.sh debian/
|
||||||
|
Loading…
Reference in New Issue
Block a user