Skip to content

Commit

Permalink
add github ci
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonflylee committed Apr 18, 2024
1 parent d088561 commit b72506d
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 2 deletions.
89 changes: 89 additions & 0 deletions .github/workflows/images.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# build.sh docker BRANCH=next BOARD=orangepizero3 BUILD_OPT=kernel MEM_TYPE=Others KERNEL_CONFIGURE=yes CLEAN_LEVEL=oldcache

name: Release

on:
workflow_dispatch:
push:
tags: ["*"]

jobs:
kernel:
runs-on: ubuntu-latest
strategy:
matrix:
board:
- orangepizero2
- orangepizero3
- orangepi3-lts
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache debs
id: cache-debs
uses: actions/cache@v4
with:
path: output/debs
key: debs-${{ matrix.board }}
- name: Cache toolchain
id: cache-toolchain
if: steps.cache-debs.outputs.cache-hit != 'true'
uses: actions/cache@v4
with:
path: toolchains
key: toolchains
restore-keys: toolchains
- name: Build u-boot
if: steps.cache-debs.outputs.cache-hit != 'true'
run: ./build.sh BRANCH=next BOARD=${{ matrix.board }} BUILD_OPT=u-boot MEM_TYPE=Others CLEAN_LEVEL=oldcache DOWNLOAD_MIRROR=us
- name: Build kernel
if: steps.cache-debs.outputs.cache-hit != 'true'
run: ./build.sh BRANCH=next BOARD=${{ matrix.board }} BUILD_OPT=kernel MEM_TYPE=Others KERNEL_CONFIGURE=no CLEAN_LEVEL=oldcache DOWNLOAD_MIRROR=us
- name: Upload Assets
if: steps.cache-debs.outputs.cache-hit != 'true'
uses: actions/upload-artifact@v4
with:
name: debs-${{ matrix.board }}
path: |
output/debs/linux-*.deb
output/debs/u-boot/*.deb
build:
runs-on: ubuntu-latest
needs: [ kernel ]
strategy:
matrix:
distro:
- bullseye
- bookworm
board:
- orangepizero2
- orangepizero3
- orangepi3-lts
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache toolchain
id: cache-toolchain
uses: actions/cache@v4
with:
path: toolchains
key: toolchains
restore-keys: |
toolchains
- name: Cache debs
id: cache-debs
uses: actions/cache@v4
with:
path: output/debs
key: debs-${{ matrix.board }}
- name: Build Server image
run: $PWD/build.sh BRANCH=next BOARD=${{ matrix.board }} RELEASE=${{ matrix.distro }} BUILD_OPT=image MEM_TYPE=Others BETA=yes ARMHF_ARCH=skip COMPRESS_OUTPUTIMAGE=gz KERNEL_CONFIGURE=no BUILD_DESKTOP=no PACKAGE_LIST_RM=orangepi-zsh CLEAN_LEVEL=oldcache DOWNLOAD_MIRROR=us
- name: Build Desktop image
run: $PWD/build.sh BRANCH=next BOARD=${{ matrix.board }} RELEASE=${{ matrix.distro }} BUILD_OPT=image MEM_TYPE=Others BETA=yes ARMHF_ARCH=skip COMPRESS_OUTPUTIMAGE=gz KERNEL_CONFIGURE=no BUILD_DESKTOP=yes PACKAGE_LIST_RM=orangepi-zsh CLEAN_LEVEL=oldcache DOWNLOAD_MIRROR=us DESKTOP_ENVIRONMENT=xfce DESKTOP_ENVIRONMENT_CONFIG_NAME=config_base DESKTOP_APPGROUPS_SELECTED=3dsupport
- name: Upload images
uses: softprops/action-gh-release@v1
with:
tag_name: next
files: output/images/*/*.img.gz

2 changes: 1 addition & 1 deletion external/config/sources/families/sun50iw9.conf
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ case $BRANCH in

OVERLAY_PREFIX='sun50i-h616'
ATFSOURCE='https://github.com/ARM-software/arm-trusted-firmware'
ATFBRANCH='branch:master'
ATFBRANCH='tag:v2.10'
ATF_PLAT="sun50i_h616";
ATF_TARGET_MAP='PLAT=sun50i_h616 DEBUG=1 bl31;;build/sun50i_h616/debug/bl31.bin'
UBOOT_TARGET_MAP=';;u-boot-sunxi-with-spl.bin'
Expand Down
2 changes: 1 addition & 1 deletion external/config/templates/config-docker.conf
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ DOCKER_FLAGS+=(-v=$SRC/:/root/orangepi/)
DOCKER_FLAGS+=(-v=/etc/timezone:/etc/timezone)

# mount 2 named volumes - for cacheable data and compiler cache
DOCKER_FLAGS+=(-v=orangepi-rootfs:/root/orangepi/external/cache/rootfs -v=orangepi-ccache:/root/.ccache)
# DOCKER_FLAGS+=(-v=orangepi-rootfs:/root/orangepi/external/cache/rootfs -v=orangepi-ccache:/root/.ccache)

DOCKER_FLAGS+=(-e COLUMNS="`tput cols`" -e LINES="`tput lines`")

Expand Down

0 comments on commit b72506d

Please sign in to comment.