From 79ef99279b454ef7fa40bad5c76db0f7b3030ed6 Mon Sep 17 00:00:00 2001 From: f0reachARR Date: Wed, 4 Nov 2020 19:39:09 +0900 Subject: [PATCH 01/13] Add workflow for building U-Boot and Linux --- .github/workflows/build.yml | 29 +++++++++++++++++++++++++++++ Makefile | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..af8af09 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,29 @@ +name: Build + +on: + push: + branches: master + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Install deps + run: sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabi qemu-user-static + + - name: Build nkbin-maker + run: make nkbin-maker + - name: Configure for U-Boot + run: make udefconfig + - 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 \ No newline at end of file diff --git a/Makefile b/Makefile index 004bb71..8dc840f 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,7 @@ debian: echo "Debootstrap is only available in Linux!"; \ exit 1; \ fi - mkdir debian + mkdir -p debian sudo debootstrap --arch=armel --foreign buster debian/ http://localhost:65432/debian/ sudo cp /usr/bin/qemu-arm-static debian/usr/bin/ sudo cp ./tools/setup_debian.sh debian/ From d482d3ccf95750052dcb5bf8917249d9593bdc75 Mon Sep 17 00:00:00 2001 From: f0reachARR Date: Thu, 5 Nov 2020 11:36:50 +0900 Subject: [PATCH 02/13] Add debian build --- .github/workflows/build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index af8af09..ec6286b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,4 +26,9 @@ jobs: - name: Configure for Linux run: make ldefconfig - name: Build Linux - run: make lbuild \ No newline at end of file + run: make lbuild + + - name: Build Debian Root + run: | + make aptcache & + make debian \ No newline at end of file From e199f13d88987f0c54d7734f8ee850a451c274c3 Mon Sep 17 00:00:00 2001 From: f0reachARR Date: Thu, 5 Nov 2020 11:39:42 +0900 Subject: [PATCH 03/13] Update package index before setup deps --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ec6286b..7463d16 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: with: submodules: true - name: Install deps - run: sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabi qemu-user-static + run: sudo apt update && sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabi qemu-user-static - name: Build nkbin-maker run: make nkbin-maker From 86bdc238340349bebd4d7252ae484b3d46568258 Mon Sep 17 00:00:00 2001 From: f0reachARR Date: Thu, 5 Nov 2020 11:45:05 +0900 Subject: [PATCH 04/13] Add workaround for build failure --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7463d16..e427f0c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,6 +11,8 @@ jobs: - 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 From 7ea704e702c8b840358dfe095a31a52a4576c3b9 Mon Sep 17 00:00:00 2001 From: f0reachARR Date: Thu, 5 Nov 2020 11:56:54 +0900 Subject: [PATCH 05/13] Add debootstrap to deps --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e427f0c..723cc6b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ jobs: - 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 + 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 From 39d9bdba6509b80de51d5ec436e69606895898e9 Mon Sep 17 00:00:00 2001 From: f0reachARR Date: Thu, 5 Nov 2020 12:18:42 +0900 Subject: [PATCH 06/13] Use azure debian mirror --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 723cc6b..dab29e5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,5 +32,7 @@ jobs: - name: Build Debian Root run: | - make aptcache & + ./tools/aptcache_linux_amd64 \ + -rule 'local=localhost:65432, remote=ftp.us.debian.org' \ + -rule 'local=localhost:65433, remote=security.debian.org' & make debian \ No newline at end of file From a2a5e0bdd87647fd1b936a52bbaac19006432c76 Mon Sep 17 00:00:00 2001 From: f0reachARR Date: Thu, 5 Nov 2020 19:14:12 +0900 Subject: [PATCH 07/13] Add release process --- .github/workflows/build.yml | 42 ++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dab29e5..1e2ff3a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,9 +30,41 @@ jobs: - name: Build Linux run: make lbuild - - name: Build Debian Root + # - 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: | - ./tools/aptcache_linux_amd64 \ - -rule 'local=localhost:65432, remote=ftp.us.debian.org' \ - -rule 'local=localhost:65433, remote=security.debian.org' & - make debian \ No newline at end of file + 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/ + 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 + - name: Upload release.zip + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: release.zip + asset_name: release.zip + asset_content_type: application/zip From 3c1eefb1bca34fc31de7a4bb5504d8d3dde6c5f5 Mon Sep 17 00:00:00 2001 From: f0reachARR Date: Sun, 8 Nov 2020 21:01:29 +0900 Subject: [PATCH 08/13] Add build matrix for each hardware --- .github/workflows/build.yml | 51 +++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1e2ff3a..065047c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,8 +5,40 @@ on: 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: @@ -19,7 +51,7 @@ jobs: - name: Build nkbin-maker run: make nkbin-maker - name: Configure for U-Boot - run: make udefconfig + run: make udefconfig-${{ matrix.hardware }} - name: Build U-Boot run: make ubuild - name: Generate NK.bin @@ -46,25 +78,12 @@ jobs: 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/ - 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 - name: Upload release.zip uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ needs.create_release.outputs.upload_url }} asset_path: release.zip - asset_name: release.zip + asset_name: ${{ matrix.hardware }}-release.zip asset_content_type: application/zip From ac172d4ba0552895e6425d91e89fb284fffc5af5 Mon Sep 17 00:00:00 2001 From: Takumi Sueda Date: Tue, 24 Nov 2020 03:39:40 +0900 Subject: [PATCH 09/13] Adjust format --- .github/workflows/build.yml | 90 ++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 065047c..4840fc3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,51 +39,51 @@ jobs: - 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 + - 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 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: 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: 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 + - 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 From 0300cf954cb7eebddd6176b309a343dd3285fb34 Mon Sep 17 00:00:00 2001 From: Takumi Sueda Date: Tue, 24 Nov 2020 04:30:16 +0900 Subject: [PATCH 10/13] Change release name format --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4840fc3..5d78190 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Generate release name id: release_name - run: echo "::set-output name=name::`date "+%Y%m%d-%H"`" + run: echo "::set-output name=name::`date "+%Y-%m-%d-%H%M%S"`" - name: Create release id: create_release uses: actions/create-release@v1 From 1c60c9a1382ff6e129cf9403feaef865be788bb0 Mon Sep 17 00:00:00 2001 From: Takumi Sueda Date: Tue, 24 Nov 2020 04:31:23 +0900 Subject: [PATCH 11/13] Copy with model-specific filename --- .github/workflows/build.yml | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d78190..c6de8fc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,13 +32,19 @@ jobs: needs: [create_release] strategy: matrix: - hardware: - - sh1 - - sh2 - - sh3 - - sh4 - - sh5 - - sh6 + include: + - model: sh1 + nk: edsa1exe.bin + - model: sh2 + nk: edsa2exe.bin + - model: sh3 + nk: edsa3exe.bin + - model: sh4 + nk: edsh4exe.bin + - model: sh5 + nk: edsh5exe.bin + - model: sh6 + nk: edsh6exe.bin steps: - uses: actions/checkout@v2 @@ -51,7 +57,7 @@ jobs: - name: Build nkbin-maker run: make nkbin-maker - name: Configure for U-Boot - run: make udefconfig-${{ matrix.hardware }} + run: make udefconfig-${{ matrix.model }} - name: Build U-Boot run: make ubuild - name: Generate NK.bin @@ -74,8 +80,8 @@ jobs: 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 ./nk.bin release/${{ matrix.nk }} + cp ./linux-brain/arch/arm/boot/dts/imx28-pw${{ matrix.model }}.dtb release/imx28-pw${{ matrix.model }}.dtb cp ./linux-brain/arch/arm/boot/zImage release/zImage zip -r release.zip release/ - name: Upload release.zip @@ -85,5 +91,5 @@ jobs: with: upload_url: ${{ needs.create_release.outputs.upload_url }} asset_path: release.zip - asset_name: ${{ matrix.hardware }}-release.zip + asset_name: ${{ matrix.model }}-boot.zip asset_content_type: application/zip From 490bc26e47cd6922b6fe823bce68b679dc2639f4 Mon Sep 17 00:00:00 2001 From: Takumi Sueda Date: Tue, 24 Nov 2020 04:34:58 +0900 Subject: [PATCH 12/13] Launch CI on its development and on pushing tags --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c6de8fc..cc752a9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,8 @@ name: Build on: push: - branches: master + branches: ci* + tags: * jobs: create_release: From 8999441c13fc6ddecceb4dae0d0dce38efd5e8a0 Mon Sep 17 00:00:00 2001 From: Takumi Sueda Date: Tue, 24 Nov 2020 04:37:15 +0900 Subject: [PATCH 13/13] Quote asterisk --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cc752a9..01b2d78 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,7 +3,7 @@ name: Build on: push: branches: ci* - tags: * + tags: '*' jobs: create_release: