2021-06-07 05:03:08 +08:00
|
|
|
name: Footprint Tracking
|
|
|
|
|
|
|
|
# Run every 12 hours and on tags
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '50 1/12 * * *'
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- 'VERSION'
|
2021-07-21 22:07:03 +08:00
|
|
|
- '.github/workflows/footprint-tracking.yml'
|
2023-05-11 16:55:24 +08:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- v*-branch
|
2021-06-07 05:03:08 +08:00
|
|
|
tags:
|
|
|
|
# only publish v* tags, do not care about zephyr-v* which point to the
|
|
|
|
# same commit
|
|
|
|
- 'v*'
|
|
|
|
|
2022-10-14 00:53:19 +08:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-06-07 05:03:08 +08:00
|
|
|
jobs:
|
|
|
|
footprint-tracking:
|
2023-10-11 05:32:58 +08:00
|
|
|
runs-on: zephyr-runner-linux-x64-4xlarge
|
2023-05-11 16:58:56 +08:00
|
|
|
if: github.repository_owner == 'zephyrproject-rtos'
|
2021-06-07 05:03:08 +08:00
|
|
|
container:
|
2023-09-25 19:58:57 +08:00
|
|
|
image: ghcr.io/zephyrproject-rtos/ci:v0.26.5
|
2021-06-07 05:03:08 +08:00
|
|
|
options: '--entrypoint /bin/bash'
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
env:
|
2023-09-25 19:58:57 +08:00
|
|
|
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.16.3
|
2021-06-07 05:03:08 +08:00
|
|
|
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
|
|
|
|
steps:
|
2022-04-15 02:35:57 +08:00
|
|
|
- name: Apply container owner mismatch workaround
|
|
|
|
run: |
|
|
|
|
# FIXME: The owner UID of the GITHUB_WORKSPACE directory may not
|
|
|
|
# match the container user UID because of the way GitHub
|
|
|
|
# Actions runner is implemented. Remove this workaround when
|
|
|
|
# GitHub comes up with a fundamental fix for this problem.
|
|
|
|
git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
|
|
|
|
2021-06-07 05:03:08 +08:00
|
|
|
- name: Update PATH for west
|
|
|
|
run: |
|
|
|
|
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
2023-05-11 16:49:05 +08:00
|
|
|
|
|
|
|
- name: Install packages
|
2021-07-21 22:07:03 +08:00
|
|
|
run: |
|
2023-05-11 16:49:05 +08:00
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y python3-venv
|
2021-07-21 22:07:03 +08:00
|
|
|
sudo pip3 install -U setuptools wheel pip gitpython
|
2021-06-07 05:03:08 +08:00
|
|
|
|
|
|
|
- name: checkout
|
2022-10-14 01:48:20 +08:00
|
|
|
uses: actions/checkout@v3
|
2021-06-07 05:03:08 +08:00
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: west setup
|
|
|
|
run: |
|
|
|
|
west init -l . || true
|
2021-11-16 21:53:30 +08:00
|
|
|
west config --global update.narrow true
|
|
|
|
west update 2>&1 1> west.update.log || west update 2>&1 1> west.update2.log
|
2021-06-07 05:03:08 +08:00
|
|
|
|
|
|
|
- name: Configure AWS Credentials
|
2023-04-15 14:33:24 +08:00
|
|
|
uses: aws-actions/configure-aws-credentials@v2
|
2021-06-07 05:03:08 +08:00
|
|
|
with:
|
2023-05-12 01:06:29 +08:00
|
|
|
aws-access-key-id: ${{ vars.AWS_TESTING_ACCESS_KEY_ID }}
|
|
|
|
aws-secret-access-key: ${{ secrets.AWS_TESTING_SECRET_ACCESS_KEY }}
|
2021-06-07 05:03:08 +08:00
|
|
|
aws-region: us-east-1
|
|
|
|
|
|
|
|
- name: Record Footprint
|
|
|
|
env:
|
|
|
|
BASE_REF: ${{ github.base_ref }}
|
|
|
|
run: |
|
|
|
|
export ZEPHYR_BASE=${PWD}
|
|
|
|
./scripts/footprint/track.py -p scripts/footprint/plan.txt
|
2023-05-11 16:49:05 +08:00
|
|
|
|
|
|
|
- name: Upload footprint data
|
|
|
|
run: |
|
|
|
|
python3 -m venv .venv
|
|
|
|
. .venv/bin/activate
|
|
|
|
pip3 install awscli
|
2021-06-07 05:03:08 +08:00
|
|
|
aws s3 sync --quiet footprint_data/ s3://testing.zephyrproject.org/footprint_data/
|