Skip to content

Commit

Permalink
ci: add build options support
Browse files Browse the repository at this point in the history
Signed-off-by: sbwml <admin@cooluc.com>
  • Loading branch information
sbwml committed Jul 2, 2024
1 parent 2b57147 commit a361a67
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@ on:
device:
description: 'Select device to build'
required: true
default: 'nanopi-r5s'
default: 'x86_64'
type: choice
options:
- 'armv8'
- 'nanopi-r4s'
- 'nanopi-r5s'
- 'netgear_r8500'
- 'x86_64'
build_options:
description: 'Build options (separate multiple options with spaces)'
required: false
default: 'BUILD_FAST=y ENABLE_LTO=y ENABLE_LRNG=y ENABLE_BPF=y USE_GCC13=y USE_MOLD=y'
type: string

jobs:
build:
Expand Down Expand Up @@ -62,7 +67,8 @@ jobs:
continue-on-error: true
run: |
export GITHUB_REPO=${{ github.repository }}
BUILD_FAST=y ENABLE_LTO=y ENABLE_LRNG=y ENABLE_BPF=y USE_GCC13=y USE_MOLD=y bash <(curl -sS https://raw.githubusercontent.com/${{ github.repository }}/master/openwrt/build.sh) rc2 ${{ github.event.inputs.device }}
export ${{ github.event.inputs.build_options }}
bash <(curl -sS https://raw.githubusercontent.com/${{ github.repository }}/master/openwrt/build.sh) rc2 ${{ github.event.inputs.device }}
cd openwrt
tags=$(git describe --abbrev=0 --tags)
echo "latest_release=$tags" >>$GITHUB_ENV
Expand Down

0 comments on commit a361a67

Please sign in to comment.