Files
beagleconnect-freedom/.github/workflows/buildroot.yml

105 lines
3.2 KiB
YAML

# This is a basic workflow to help you get started with Actions
name: buildroot
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
[push, pull_request, 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
- uses: actions/checkout@v2
with:
submodules: true
- name: Prepare cache timestamp
id: cache-timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: Cache for buildroot
id: cache-buildroot
uses: actions/cache@v2
with:
path: buildroot-2020.11.1
key: buildroot-source-2020-11v1
- name: Install buildroot
if: steps.cache-buildroot.outputs.cache-hit != 'true'
run: |
wget "https://buildroot.org/downloads/buildroot-2020.11.1.tar.gz"
tar xzf buildroot-2020.11.1.tar.gz
mkdir ~/.buildroot-ccache || true
mkdir ~/downloads || true
- name: Cache for ccache
id: cache-buildroot-ccache
uses: actions/cache@v2
with:
path: ~/.buildroot-ccache
key: buildroot-ccache-${{ steps.cache-timestamp.outputs.timestamp }}
restore-keys: |
buildroot-ccache-2020-
buildroot-ccache-
- name: Cache for downloads
id: cache-buildroot-downloads
uses: actions/cache@v2
with:
path: ~/downloads
key: buildroot-downloads-${{ steps.cache-timestamp.outputs.timestamp }}
restore-keys: |
buildroot-downloads-2020-
buildroot-downloads-
- name: Build pocketbeagle image
run: |
export BR2_CCACHE_DIR=~/.buildroot-ccache
export BR2_DL_DIR=~/downloads
cd sw/buildroot
make -C $GITHUB_WORKSPACE/buildroot-2020.11.1 O=$PWD/pb BR2_EXTERNAL=$PWD beagleconnect_gateway_pocketbeagle_defconfig
cd pb
make
- uses: actions/upload-artifact@v2
with:
name: pocketbeagle-target
path: |
sw/buildroot/pb/images
- name: Build qemu image
run: |
export BR2_CCACHE_DIR=~/.buildroot-ccache
export BR2_DL_DIR=~/downloads
cd sw/buildroot
make -C $GITHUB_WORKSPACE/buildroot-2020.11.1 O=$PWD/qemu BR2_EXTERNAL=$PWD beagleconnect_gateway_qemu_x86_64_defconfig
cd qemu
make
- uses: actions/upload-artifact@v2
with:
name: qemu-target
path: |
sw/buildroot/qemu/images
sw/buildroot/run
- uses: actions/upload-artifact@v2
with:
name: buildroot-host
path: |
sw/buildroot/run
#sw/buildroot/host