Skip to content

scum_programmer: bump to 0.2.0 #93

scum_programmer: bump to 0.2.0

scum_programmer: bump to 0.2.0 #93

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags: '*'
pull_request:
jobs:
build-sdk:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
build-type: ["Debug", "Release", "MinSizeRel"]
steps:
- uses: carlosperate/arm-none-eabi-gcc-action@v1
- name: Checkout repo
uses: actions/checkout@v4
- name: Check Ninja (debugging)
if: matrix.os == 'windows-latest'
run: ninja --version
- name: Build
run: make all BUILD_TYPE=${{ matrix.build-type }}
build-sdk-success:
# this is only run if all SDK builds succeeded
needs: build-sdk
runs-on: ubuntu-latest
steps:
- name: build succeeded
run: exit 0
build-programmer-nrf-fw:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Build SCuM nRF programmer
run:
make scum-programmer-in-docker
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: nrf-fw-artifacts
path: |
scum_programmer/nrf-fw/Output/Release/Exe/scum-programmer.elf
scum_programmer/nrf-fw/Output/Release/Exe/scum-programmer.hex
check-format:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Check format
run:
make check-format
check-typos:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install typos-cli
run:
cargo install typos-cli
- name: Check typos
run:
typos --sort
check-programmer-script:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install hatch
run:
pip install -U pip hatch
- name: Check formatting
run:
hatch fmt -f --check
- name: Check linting
run:
hatch fmt -l --check
- name: Check installation
run:
hatch run scum-programmer --help
- name: Check tests
run:
hatch test .
- name: Check package
run:
hatch build
- name: Upload package artifacts
uses: actions/upload-artifact@v4
with:
name: scum-programmer-python-artifacts
path: ./dist/*
release:
runs-on: ubuntu-latest
needs:
- build-sdk-success
- build-programmer-nrf-fw
- check-format
- check-typos
- check-programmer-script
if: >-
github.event_name == 'push' &&
startsWith(github.event.ref, 'refs/tags')
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Download scum-programmer Python package
uses: actions/download-artifact@v4
with:
name: scum-programmer-python-artifacts
path: ./dist
- name: Check dist/ content
run: ls -lR ./dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_token }}
- name: Download programmer nrf artifacts
uses: actions/download-artifact@v4
with:
name: nrf-fw-artifacts
path: ./artifacts
- name: Release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
artifacts: "artifacts/*"
token: ${{ secrets.github_token }}