let's have a workflow
This commit is contained in:
parent
075cdd423d
commit
f7d1de5a5f
4 changed files with 60 additions and 3 deletions
48
.github/workflows/build.yml
vendored
Normal file
48
.github/workflows/build.yml
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
name: Build cr100
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
release:
|
||||
types: [published]
|
||||
check_suite:
|
||||
types: [rerequested]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
filter: "blob:none"
|
||||
fetch-depth: 0
|
||||
submodules: true
|
||||
|
||||
- uses: carlosperate/arm-none-eabi-gcc-action@v1
|
||||
with:
|
||||
# When changing this update what Windows grabs too!
|
||||
release: '13.3.Rel1'
|
||||
|
||||
- run:
|
||||
make -j$(nproc) dist
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cr100
|
||||
path: dist/
|
||||
if-no-files-found: error
|
||||
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: false
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: pre-commit
|
||||
run: pip install pre-commit && pre-commit run --all
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.0.1
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
- id: check-yaml
|
||||
- id: end-of-file-fixer
|
||||
|
|
|
|||
12
Makefile
12
Makefile
|
|
@ -3,7 +3,7 @@ all: uf2
|
|||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf build
|
||||
rm -rf build dist
|
||||
|
||||
build/Makefile:
|
||||
cmake -S . -B build
|
||||
|
|
@ -19,7 +19,7 @@ uf2: | build/Makefile
|
|||
$(MAKE) -C build
|
||||
|
||||
.PHONY: flash
|
||||
flash: build/cr100.uf2
|
||||
flash: uf2
|
||||
$(MAKE) -C build
|
||||
_douf2 RPI-RP2 build/cr100.uf2 /dev/serial/by-id/usb-Raspberry_Pi_Pico_*-if00
|
||||
|
||||
|
|
@ -28,3 +28,11 @@ flash: build/cr100.uf2
|
|||
# database.
|
||||
install-terminfo:
|
||||
tic -v cr100.terminfo
|
||||
|
||||
.PHONY: dist
|
||||
dist: uf2
|
||||
rm -rf dist
|
||||
mkdir -p dist/bin dist/terminfo
|
||||
cp build/cr100.uf2 dist/bin/
|
||||
cp build/cr100.elf dist/bin
|
||||
tic -o dist/terminfo cr100.terminfo
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from dataclasses import dataclass
|
||||
|
||||
|
||||
class Bitmap:
|
||||
def __init__(self, width, height, color_count):
|
||||
self.width = width
|
||||
|
|
|
|||
Loading…
Reference in a new issue