Skip to content

Commit

Permalink
CI: add config for github actions
Browse files Browse the repository at this point in the history
CI: try to fix missing packages

ci: drop 32-bit r64 (default is now 64bit)

ci: drop python-mako

ci: update checkout and cache to v3

https://github.com/actions/cache

for additional warnings a PR is open for marvinpinto/automatic-releases

marvinpinto/action-automatic-releases#2
  • Loading branch information
frank-w committed Apr 1, 2023
1 parent 084479b commit 0414592
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches:
- '*-bpi'
- '*-ci'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v3

- name: Install depencies
run: |
sudo apt update
sudo apt install ccache libssl-dev u-boot-tools gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu make
- name: Setup env
run: |
echo "DT=$(date +'%Y-%m-%d_%H%M')" >> $GITHUB_ENV
echo "UBOOTVER=$(make ubootversion)" >> $GITHUB_ENV
echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Print env
run: |
echo $BRANCH $UBOOTVER $DT
- name: Setup cache
id: cache
uses: actions/cache@v3
with:
path: ~/.ccache
key: ${{ runner.os }}-ccache
restore-keys: ${{ runner.os }}-ccache

- name: Build for bananapi-r2
run: |
export PATH=/usr/lib/ccache:$PATH
bash build.sh importconfig
bash build.sh build
bash build.sh rename
- name: Build for bananapi-r64
run: |
sed -i 's/#\(board=bpi-r64\)/\1/' build.conf #change board to r64
bash build.sh importconfig
bash build.sh build
bash build.sh rename
- name: Upload binaries to release
if: endsWith(github.ref,'-bpi')
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "CI-BUILD-${{ env.BRANCH }}-${{ env.UBOOTVER }}-${{ env.DT }}"
prerelease: false
title: "Build for branch ${{ env.BRANCH }} (${{ env.UBOOTVER }})"
files: |
u-boot-r2*.bin
u-boot-r64*.bin

0 comments on commit 0414592

Please sign in to comment.