🌙 Nightly build 🚀 2.6.4-2024-12-12-9275551 #215
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
run-name: 🌙 Nightly build 🚀 ${{ github.event.client_payload.tag }}-${{ github.event.client_payload.date }}-${{ github.event.client_payload.sha }} | |
on: | |
repository_dispatch: | |
types: [ build-nightly ] | |
jobs: | |
build: | |
name: "${{ matrix.branch }} :: ${{ matrix.arch }}" | |
runs-on: ubuntu-latest | |
strategy: | |
# max-parallel: 8 | |
matrix: | |
branch: | |
- openwrt-22.03 | |
- openwrt-23.05 | |
arch: | |
- aarch64_cortex-a53 | |
- aarch64_cortex-a72 | |
- aarch64_generic | |
- arm_arm1176jzf-s_vfp | |
- arm_arm926ej-s | |
- arm_cortex-a15_neon-vfpv4 | |
- arm_cortex-a5_vfpv4 | |
- arm_cortex-a7 | |
- arm_cortex-a7_neon-vfpv4 | |
- arm_cortex-a7_vfpv4 | |
- arm_cortex-a8_vfpv3 | |
- arm_cortex-a9 | |
- arm_cortex-a9_neon | |
- arm_cortex-a9_vfpv3-d16 | |
- arm_fa526 | |
- arm_mpcore | |
- arm_xscale | |
- mips64_octeonplus | |
- mips_24kc | |
- mips_4kec | |
- mips_mips32 | |
- mipsel_24kc | |
- mipsel_24kc_24kf | |
- mipsel_74kc | |
- mipsel_mips32 | |
- x86_64 | |
include: | |
- branch: openwrt-21.02 | |
arch: mipsel_24kc | |
- branch: SNAPSHOT | |
arch: x86_64 | |
# exclude: | |
# - branch: openwrt-21.02 | |
# arch: arm_cortex-a7_vfpv4 | |
container: | |
image: openwrt/sdk:${{ matrix.arch }}-${{ matrix.branch }} | |
options: --user root | |
defaults: { run: { shell: bash } } | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up SDK | |
if: matrix.branch == 'openwrt-23.05' || matrix.branch == 'SNAPSHOT' | |
working-directory: /builder | |
run: | | |
HOME=/builder ./setup.sh | |
- name: Setup ccache | |
uses: actions/cache@v4 | |
with: | |
path: /builder/.ccache | |
key: ccache-${{ matrix.branch }}-${{ matrix.arch }}-${{ github.event.client_payload.sha }} | |
restore-keys: | | |
ccache-${{ matrix.branch }}-${{ matrix.arch }}- | |
- name: Build packages | |
id: build | |
# continue-on-error: true | |
working-directory: /builder | |
env: | |
DATE: ${{ github.event.client_payload.date }} | |
SHA: ${{ github.event.client_payload.sha }} | |
TAG: ${{ github.event.client_payload.tag }} | |
ARCH: ${{ matrix.arch }} | |
BRANCH: ${{ matrix.branch }} | |
SIGN_KEY: ${{ secrets.SIGN_PRIVATE_KEY }} | |
run: | | |
VERSION=${TAG}.$(date -d $DATE +%Y%m%d) | |
sed -e "s|@VERSION@|$VERSION|" \ | |
-e "s|@GIT_DATE@|$DATE|" \ | |
-e "s|@GIT_HASH@|$SHA|" -i $GITHUB_WORKSPACE/far2l/Makefile | |
mv feeds.conf.default feeds.conf | |
sed -e 's|base.*\.git|base https://github.com/openwrt/openwrt.git|' \ | |
-e 's|packages.*\.git|packages https://github.com/openwrt/packages.git|' \ | |
-e 's|luci.*\.git|luci https://github.com/openwrt/luci.git|' \ | |
-e 's|routing.*\.git|routing https://github.com/openwrt/routing.git|' \ | |
-e 's|telephony.*\.git|telephony https://github.com/openwrt/telephony.git|' -i feeds.conf | |
echo "src-link far2l $GITHUB_WORKSPACE" >> feeds.conf | |
./scripts/feeds update base packages far2l | |
./scripts/feeds install -a -p far2l | |
make defconfig | |
make package/far2l/compile V=s -j$(nproc) CONFIG_CCACHE=1 BUILD_LOG=1 | |
./staging_dir/host/bin/ccache --dir .ccache --max-size=100M --show-stats | |
rm -rf ./bin/packages/*/base/* | |
ls -lh ./bin/packages/*/far2l | |
mv ./bin/packages/*/far2l/*.*pk ./bin/packages/*/base | |
echo "$SIGN_KEY" | base64 -d > key-build | |
make package/index | |
tar -C ./bin/packages/*/base -cvf pkg-$BRANCH-$ARCH.tar --transform "s|^\./|${BRANCH/openwrt-}/$ARCH/|" --show-transformed-names . | |
- name: Compress build logs | |
if: always() | |
env: | |
ARCH: ${{ matrix.arch }} | |
BRANCH: ${{ matrix.branch }} | |
run: | | |
tar -cJvf logs-$BRANCH-$ARCH.tar.xz /builder/logs | |
- name: Upload packages | |
if: steps.build.outcome == 'success' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pkg-${{ matrix.branch }}-${{ matrix.arch }} | |
path: /builder/*.tar | |
if-no-files-found: error | |
- name: Upload build logs | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs-${{ matrix.branch }}-${{ matrix.arch }} | |
path: logs-*.tar.xz | |
# retention-days: 1 | |
gh-pages: | |
needs: build | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: pkg-* | |
- name: Prepare files to publish | |
run: | | |
mkdir public | |
find . -name 'pkg-*.tar' -exec tar -C ./public -xvf {} \; | |
- name: Deploy to GH pages | |
id: deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
user_name: 'github-actions[bot]' | |
user_email: 'github-actions[bot]@users.noreply.github.com' | |
full_commit_message: ${{ github.event.client_payload.repo }}@${{ github.event.client_payload.sha }} | |
force_orphan: true | |
- name: Update version for badge | |
if: steps.deploy.outcome == 'success' | |
uses: schneegans/dynamic-badges-action@v1.7.0 | |
with: | |
auth: ${{ secrets.GIST_SECRET }} | |
gistID: f53cb6c1d56b0eaf40c88d607fc5fef1 | |
filename: far2l-openwrt.json | |
label: version | |
message: ${{ github.event.client_payload.tag }}-${{ github.event.client_payload.date }}-${{ github.event.client_payload.sha }} | |
color: blue | |
- name: Delete workflow runs | |
uses: Mattraks/delete-workflow-runs@v2 | |
continue-on-error: true | |
release: | |
name: Update release ${{ matrix.branch }} | |
needs: gh-pages | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 1 | |
matrix: | |
branch: | |
- '21.02' | |
- '22.03' | |
- '23.05' | |
env: | |
DATE: ${{ github.event.client_payload.date }} | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: pkg-openwrt-${{ matrix.branch }}-* | |
- name: Put packages into zip | |
env: | |
BRANCH: ${{ matrix.branch }} | |
run: | | |
find . -name "pkg-openwrt-$BRANCH-*.tar" -exec tar -xvf {} --wildcards '*.*pk' \; | |
mkdir -p public | |
find $BRANCH -mindepth 1 -type d -exec sh -c 'zip -0 ./public/far2l-$(basename {}).zip -j {} {}/*' \; | |
- name: Upload release assets | |
uses: andelf/nightly-release@main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
prerelease: false | |
tag_name: ${{ matrix.branch }} | |
name: '${{ env.DATE }} for OpenWrt ${{ matrix.branch }}' | |
body: | | |
${{ github.event.client_payload.url }}: ${{ github.event.client_payload.message }} | |
files: | | |
./public/*.zip |