Skip to content

Merge pull request #986 from FrameworkComputer/fwk.fix_linux_ucsi #7

Merge pull request #986 from FrameworkComputer/fwk.fix_linux_ucsi

Merge pull request #986 from FrameworkComputer/fwk.fix_linux_ucsi #7

name: build lotus, azalea firmware
on:
push:
branches:
- lotus*
- azalea*
- fwk*
- framework*
paths:
- 'zephyr/program/lotus/**'
- '.github/workflows/**'
#pull_request:
# branches:
# - lotus-zephyr
workflow_dispatch:
jobs:
build:
name: Build lotus/azalea
runs-on: [lotus-azalea-builders]
strategy:
# Only build one at a time because we have only one working directory
max-parallel: 1
matrix:
platform: [
{name: lotus, folder: lotus },
{name: azalea, folder: lotus },
]
# Build not in $GITHUB_HOME but in the chroot env
defaults:
run:
working-directory: /${{ matrix.platform.folder }}/ec_home/chromiumos
steps:
# Need to use git
#- name: Checkout EC code
# uses: actions/checkout@v4
# with:
# path: /lotus/ec_home/chromiumos/src/platform/ec
#- name: Checkout Zephyr code
# uses: actions/checkout@v2
# path: /lotus/ec_home/chromiumos/src/third_party/zephyr/main
# ref: lotus-zephyr
# repository: ssh://[email protected]/FrameworkComputer/zephyr-ec
# Need to manually checkout
# actions/checkout@v4 complains:
# Error: Repository path '/lotus/ec_home/chromiumos/src/platform/ec' is not under '/data/ec_home/actions-runner/_work/ec/ec'
# See: https://github.com/actions/checkout/issues/197
- name: Manual checkout
run: |
pushd src/platform/ec
git fetch github-private
git clean -ffdx
# TODO: Doesn't work with on PR, only push
git reset --hard github-private/$GITHUB_REF_NAME
popd
pushd src/third_party/zephyr/main
git fetch github-private
git clean -ffdx
git reset --hard github-private/lotus-zephyr
popd
- name: Build ${{ matrix.platform.name }}
run: |
cros_sdk zmake build ${{ matrix.platform.name }}
echo Built ${{ matrix.platform.name }} EC
- name: File sha256
run: sha256sum src/platform/ec/build/zephyr/${{ matrix.platform.name }}/output/ec.bin
- name: Generate artifact version
run: |
echo "VERSIONINFO=$(date -u +'%Y-%m-%d-%H-%M-%S')_$GITHUB_SHA" >> $GITHUB_ENV
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform.name }}.${{ env.VERSIONINFO }}
path: /${{ matrix.platform.folder }}/ec_home/chromiumos/src/platform/ec/build/zephyr/${{ matrix.platform.name }}/output