Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use github action to install current version of python, and en… #172

Merged
merged 1 commit into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 12 additions & 19 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: CI


on:
push:
branches:
Expand All @@ -12,43 +11,37 @@ on:

jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
model: [ "hydrafw" ]
fail-fast: true
runs-on: ubuntu-latest

steps:
- name: Update package cache
run: sudo apt update -y

- name: Install packages
run: sudo apt install -y --no-install-recommends --no-install-suggests bash coreutils tar bzip2 git make python3 python3-pip

- name: Install python modules
run: python3 -m pip install GitPython intelhex --upgrade

- uses: actions/checkout@v4
with:
submodules: true
fetch-tags: true
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: 3.12
cache: 'pip' # caching pip dependencies

- run: pip install -r src/requirements.txt

- name: Set git meta info
run: echo "GITHUB_CI_PR_SHA=${{github.event.pull_request.head.sha}}" >> "${GITHUB_ENV}" && echo "GITHUB_CI_CD=1" >> "${GITHUB_ENV}"

- name: Install standalone reference GCC toolchain
run: bash scripts/env.sh

- name: Build ${{ matrix.model }}
- name: Build hydrafw
run: source build.env && arm-none-eabi-gcc --version && arm-none-eabi-gcc -print-search-dirs && make V=1 -j$(nproc) -C src/

- name: Archive ${{ matrix.model }} artifacts
- name: Archive hydrafw artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.model }}
name: hydrafw
path: |
src/build/${{ matrix.model }}.dfu
src/build/hydrafw.dfu
if-no-files-found: error


2 changes: 2 additions & 0 deletions src/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
GitPython
intelhex