Skip to content

Commit

Permalink
GHA: only build kernel once for less GHA time
Browse files Browse the repository at this point in the history
  • Loading branch information
hzyitc committed Aug 8, 2022
1 parent 7e77691 commit 394bbcf
Showing 1 changed file with 54 additions and 1 deletion.
55 changes: 54 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,50 @@ jobs:
Armbian: [${ARMBIAN_REPO}@${ARMBIAN_REF}](https://github.com/${ARMBIAN_REPO}/tree/${ARMBIAN_REF}) ([\`${ARMBIAN_SHA}\`](https://github.com/${ARMBIAN_REPO}/tree/${ARMBIAN_SHA}))
EOF
build-debs:
name: Build ${{ matrix.BRANCH }}
needs: prepare
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
BRANCH:
- edge
- current
- legacy

steps:
- name: Import env
run: |
echo "$(echo "${{ needs.prepare.outputs.env }}" | base64 -d)" >>$GITHUB_ENV
- name: Checkout
uses: actions/checkout@v2
with:
repository: ${{ env.ARMBIAN_REPO }}
ref: ${{ env.ARMBIAN_SHA }}

- name: Build
run: |
sudo ./compile.sh \
BOARD=onecloud \
BRANCH=${{ matrix.BRANCH }} \
KERNEL_CONFIGURE=no \
KERNEL_ONLY=yes \
EXPERT=yes \
USE_CCACHE=no \
NO_APT_CACHER=yes
sudo chown $(id -u):$(id -g) -R output/
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: debs-${{ matrix.BRANCH }}
path: output/debs/*

build:
name: Build ${{ matrix.RELEASE }}-${{ matrix.BRANCH }}-${{ matrix.TYPE == 'desktop' && matrix.DESKTOP_ENVIRONMENT || matrix.TYPE }}
needs: prepare
needs: [ prepare, build-debs ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -119,6 +160,12 @@ jobs:
curl -L -O https://github.com/armbian/build/pull/3981.patch
git apply 3981.patch
- name: Download debs
uses: actions/download-artifact@v2
with:
name: debs-${{ matrix.BRANCH }}
path: output/debs/

- name: Build
run: |
sudo ./compile.sh \
Expand All @@ -133,6 +180,8 @@ jobs:
DESKTOP_ENVIRONMENT_CONFIG_NAME=${{ matrix.DESKTOP_ENVIRONMENT_CONFIG_NAME }} \
DESKTOP_APPGROUPS_SELECTED=${{ matrix.DESKTOP_APPGROUPS_SELECTED }} \
EXPERT=yes \
SKIP_EXTERNAL_TOOLCHAINS=yes \
CLEAN_LEVEL= \
USE_CCACHE=no \
NO_APT_CACHER=yes \
COMPRESS_OUTPUTIMAGE=img,xz,sha,gpg
Expand Down Expand Up @@ -213,6 +262,10 @@ jobs:
with:
path: artifacts/

- name: Remove debs
run: |
rm -rf artifacts/debs-*
- name: Generate sha256sum
run: |
touch sha256sum
Expand Down

0 comments on commit 394bbcf

Please sign in to comment.