diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3230ad4 --- /dev/null +++ b/.github/workflows/build.yml @@ -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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8531669..3b6a058 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/Makefile b/Makefile index d0f99af..3262873 100644 --- a/Makefile +++ b/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 diff --git a/mkfont/adafruit_bitmap_font/__init__.py b/mkfont/adafruit_bitmap_font/__init__.py index 6145282..0fe5633 100644 --- a/mkfont/adafruit_bitmap_font/__init__.py +++ b/mkfont/adafruit_bitmap_font/__init__.py @@ -1,5 +1,6 @@ from dataclasses import dataclass + class Bitmap: def __init__(self, width, height, color_count): self.width = width