Skip to content

build

build #5

Workflow file for this run

name: build
on:
#push:
# branches:
# - "*"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target: [RM2100]
toolchain: [mipsel-linux-musl]
steps:
- uses: actions/checkout@main
- uses: hendrikmuhs/ccache-action@main
with:
key: ${{ matrix.target }}-${{ matrix.toolchain }}
- uses: actions/setup-go@main
with:
go-version: '1.22.3'
check-latest: true
cache: false
- name: Prepare environment
run: |
sudo apt-get update && sudo apt-get install -y libtool-bin gperf python3-docutils autopoint gettext ccache
echo "ROOTDIR=${{ github.workspace }}/trunk" >> $GITHUB_ENV
echo "Compilation_time=$(TZ='Asia/Shanghai' date +%Y%m%d_%H%M%S)" >> $GITHUB_ENV
- name: Start build firmware
run: |
make ${{ matrix.target }} TOOLCHAIN=${{ matrix.toolchain }}
- uses: actions/upload-artifact@main
with:
name: ${{ matrix.target }}-${{ matrix.toolchain }}
path: trunk/images/*.trx
- uses: ncipollo/release-action@main
with:
commit: ${{ github.sha }}
tag: ${{ env.Compilation_time }}_build
artifacts: trunk/images/*.trx
allowUpdates: true
omitBodyDuringUpdate: true
#- uses: Mattraks/delete-workflow-runs@main
#with:
# retain_days: 0
# keep_minimum_runs: 1