Skip to content

🌙 Nightly build for 2.5.3-c780028 #82

🌙 Nightly build for 2.5.3-c780028

🌙 Nightly build for 2.5.3-c780028 #82

Workflow file for this run

name: build
run-name: 🌙 Nightly build for ${{ github.event.client_payload.tag }}-${{ github.event.client_payload.sha }}
on:
repository_dispatch:
types: [build-nightly]
jobs:
build:
name: ${{ matrix.arch }}-${{ matrix.branch }} build
runs-on: ubuntu-latest
strategy:
fail-fast: false
# 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
- i386_pentium-mmx
- i386_pentium4
- 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
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup ccache
uses: actions/cache@v3
with:
path: /builder/.ccache
key: ccache-${{ matrix.arch }}-${{ matrix.branch }}-${{ github.event.client_payload.sha }}
restore-keys: |
ccache-${{ matrix.arch }}-${{ matrix.branch }}-
- name: Build packages
id: build
continue-on-error: true
working-directory: /builder
shell: bash
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}+git${DATE}
cp -vr ${GITHUB_WORKSPACE}/far2l package
sed "s|@VERSION@|$VERSION|" -i package/far2l/Makefile
sed "s|@GIT_HASH@|$SHA|" -i package/far2l/Makefile
sed 's|base.*\.git|base https://github.com/openwrt/openwrt.git|' -i feeds.conf.default
sed 's|packages.*\.git|packages https://github.com/openwrt/packages.git|' -i feeds.conf.default
./scripts/feeds update base packages
./scripts/feeds install -a
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=50M --show-stats
find ./bin/packages/*/base -type f ! -name 'far2l*.ipk' -delete
echo "$SIGN_KEY" | base64 -d > key-build
make package/index
ls -1R ./bin/packages/*/base
tar cvf ipk-$ARCH-$BRANCH.tar --transform "s|^\./|${BRANCH/openwrt-}/$ARCH/|" --show-transformed-names -C ./bin/packages/*/base .
# tar cJvf logs-$ARCH-$BRANCH.tar.xz ./logs
- name: Upload IPK
if: steps.build.outcome == 'success'
uses: actions/upload-artifact@v3
with:
name: ipk-${{ matrix.arch }}-${{ matrix.branch }}
path: /builder/ipk-${{ matrix.arch }}-${{ matrix.branch }}.tar
- name: Upload build logs
if: always()
uses: actions/upload-artifact@v3
with:
name: logs-${{ matrix.arch }}-${{ matrix.branch }}
path: /builder/logs/
# path: /builder/logs-${{ matrix.arch }}-${{ matrix.branch }}.tar.xz
gh-pages:
needs: build
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Merge artifacts
id: merge
run: |
mkdir public
find . -name 'ipk-*.tar' -exec tar xvf {} -C ./public \;
- name: Deploy to GH pages
id: deploy
if: steps.merge.outcome == 'success'
uses: peaceiris/actions-gh-pages@v3
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.6.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: f53cb6c1d56b0eaf40c88d607fc5fef1
filename: far2l-openwrt.json
label: version
message: ${{ github.event.client_payload.tag }}-${{ github.event.client_payload.sha }}
color: blue
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@v2
continue-on-error: true
release:
name: Upload Nightly 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@v3
- name: Merge .ipk into .tar
id: merge
env:
BRANCH: ${{ matrix.branch }}
run: |
find . -name "ipk-*$BRANCH.tar" -exec tar xvf {} --wildcards '*.ipk' \;
mkdir -p public
find $BRANCH -mindepth 1 -type d -exec sh -c 'tar cvf ./public/far2l_${DATE}_$(basename {}).ipk.tar -C {} .' \;
ls -1hs public
- name: Store .tar files
if: steps.merge.outcome == 'success'
uses: andelf/nightly-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
URL: ${{ github.event.client_payload.url }}
MESSAGE: ${{ github.event.client_payload.message }}
with:
prerelease: false
tag_name: ${{ matrix.branch }}
name: '${{ env.DATE }} for OpenWrt ${{ matrix.branch }}'
body: |
${{ env.URL }}: ${{ env.MESSAGE }}
files: |
./public/*.tar