Skip to content

Commit 25fe5a1

Browse files
committed
Actions: add self-hosted
1 parent 6ccee5f commit 25fe5a1

File tree

3 files changed

+93
-2
lines changed

3 files changed

+93
-2
lines changed

.github/workflows/build-nightly.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ on:
1111
default: false
1212
type: boolean
1313
workflow_call:
14-
pull_request:
15-
types: [ assigned ]
14+
1615

1716
jobs:
1817
set-envs:
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Build self hosted devices
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
DEVICE:
7+
required: true
8+
type: string
9+
10+
jobs:
11+
Build:
12+
runs-on: self-hosted
13+
env:
14+
CCACHE_DIR: ~/ccache-${{ inputs.DEVICE }}
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
- name: Build
20+
uses: corrupt952/actions-retry-command@v1.0.7
21+
with:
22+
command: |
23+
set -o pipefail
24+
make ${{ inputs.DEVICE }} | tee output.log | grep -E --color=never --line-buffered "^GET|^UNPACK|^BUILD|^INSTALL"
25+
exit ${PIPESTATUS[0]}
26+
max_attempts: 2
27+
retry_interval: 10
28+
29+
- name: Archive output.logs (${{ inputs.DEVICE }}-aarch64)
30+
if: failure()
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: output.logs-${{ inputs.DEVICE }}-aarch64
34+
path: |
35+
output.log
36+
./build.ROCKNIX-${{ inputs.DEVICE }}.aarch64/.threads/logs/
37+
- name: Get date
38+
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
39+
40+
- uses: actions/upload-artifact@v4
41+
with:
42+
name: ROCKNIX-image-${{ inputs.DEVICE }}-${{ env.DATE }}
43+
path: |
44+
target/ROCKNIX-*.img.gz
45+
target/ROCKNIX-*.img.gz.sha256
46+
compression-level: 0
47+
if-no-files-found: error
48+
49+
- uses: actions/upload-artifact@v4
50+
with:
51+
name: ROCKNIX-update-${{ inputs.DEVICE }}-${{ env.DATE }}
52+
path: |
53+
target/ROCKNIX-*.tar
54+
target/ROCKNIX-*.tar.sha256
55+
compression-level: 0
56+
if-no-files-found: error
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build self-hosted
2+
3+
on:
4+
workflow_dispatch:
5+
workflow_call:
6+
pull_request:
7+
types: [ assigned ]
8+
9+
jobs:
10+
require-approval:
11+
runs-on: ubuntu-24.04
12+
environment:
13+
name: ${{ github.event_name == 'pull_request' && 'pr-approval' || 'auto' }}
14+
steps:
15+
- run: echo "PR approved"
16+
build-devices:
17+
name: Build Devices
18+
needs: require-approval
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
include:
23+
- device: RK3326
24+
- device: RK3399
25+
- device: RK3566
26+
- device: RK3588
27+
- device: S922X
28+
- device: H700
29+
- device: SDM845
30+
- device: SM8250
31+
- device: SM8550
32+
- device: SM8650
33+
uses: ./.github/workflows/build-self-hosted-device.yml
34+
secrets: inherit
35+
with:
36+
DEVICE: ${{ matrix.device }}

0 commit comments

Comments
 (0)