Skip to content

Commit

Permalink
Merge pull request #39 from keyboardio/tmp/releng
Browse files Browse the repository at this point in the history
Releng work
  • Loading branch information
obra authored Dec 18, 2023
2 parents e2b253a + 10edde7 commit ae0eca8
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 35 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ name: Build & Publish
on:
push:
branches:
- master

- '**' # Runs on pushes to any branch
pull_request:
branches:
- '**' # Runs on PRs targeting any branch
env:
LC_ALL: C
EXTRA_VERSION: ${{ github.run_number }}
Expand Down Expand Up @@ -38,7 +40,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Cache arduino dep downloads
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ github.workspace}}/.arduino/downloads
key: ${{ runner.os }}-arduino-downloads
Expand All @@ -54,6 +56,8 @@ jobs:
publish:
needs: [ metadata, build ]
runs-on: ubuntu-latest
# Ensure this job only runs on pushes to master branch
if: github.ref == 'refs/heads/master'

steps:
- uses: actions/checkout@v3
Expand Down
1 change: 0 additions & 1 deletion EZ/ErgoDox

This file was deleted.

19 changes: 15 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@ else
endif

BOARDS = \
EZ/ErgoDox \
Keyboardio/Atreus \
Keyboardio/Model01 \
Keyboardio/Model100 \
SOFTHRUF/Splitography \
Technomancy/Atreus
Keyboardio/Model100

all: message output $(foreach board,${BOARDS},${board}@build)
:
Expand Down Expand Up @@ -68,11 +65,25 @@ update:
git submodule update --init --recursive
(cd ${KALEIDOSCOPE_DIR} && make update)


pull-kaleidoscope: setup
(cd ${KALEIDOSCOPE_DIR} && git fetch origin && git pull origin master)
git commit -s -m "Updated Kaleidoscope to origin/master" lib/Kaleidoscope

.env:
echo "ARDUINO_DIRECTORIES_USER=\"${ARDUINO_DIRECTORIES_USER}\"" >.env
echo "ARDUINO_DIRECTORIES_DATA=\"${ARDUINO_DIRECTORIES_DATA}\"" >>.env
echo "HARDWARE_DIR=\"${HARDWARE_DIR}\"" >>.env
echo "KALEIDOSCOPE_DIR=\"${KALEIDOSCOPE_DIR}\"" >>.env


create-snapshot:
./tools/release create-snapshot


finalize-release:
./tools/release finalize


.SILENT:
.PHONY: ${BOARDS} clean all message version version-tag setup update .env
7 changes: 6 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@ Chrysalis-Firmware-Bundle 0.92.1
================================
Unreleased


Kaleidoscope has a new "ActiveLayerKeys" plugin from Evy Bongers
<evy@evybongers.nl>


USB protocol Fixes for both AVR-based and GD32-based keyboards that
may eliminate "communications timeout" issues when talking to
Chrysalis from Taylor Yu <code@argon.blue>

Remove the Focus Serial XON/XOFF flow-control that turns out to not
help in the way we thought it did.

Discontinued new firmware builds for non-Keyboardio keyboards. These
builds were untested and unsupported. If you're an active user of
one of these builds and are interested in providing ongoing support
for them, please get in touch with jesse@keyboard.io


Chrysalis-Firmware-Bundle 0.92.0
================================
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Chrysalis Firmware Bundle
[badge:development]: https://img.shields.io/github/v/release/keyboardio/chrysalis-firmware-bundle?include_prereleases&label=Development&style=for-the-badge
[badge:production]: https://img.shields.io/github/v/release/keyboardio/chrysalis-firmware-bundle?label=Production&style=for-the-badge
[build:prod]: https://github.com/keyboardio/Chrysalis-Firmware-Bundle/releases/latest
[build:dev]: https://github.com/keyboardio/Chrysalis-Firmware-Bundle/releases/tag/v0.91.2-snapshot
[build:dev]: https://github.com/keyboardio/Chrysalis-Firmware-Bundle/releases/tag/v0.92.1-snapshot

## About

Expand All @@ -32,5 +32,5 @@ To get a list of plugins used by each firmware, run the
keyboard.

For guidelines about how we build these sketches, which plugins we enable, and
so on, have a look at the [Chrysalis-enalbed
so on, have a look at the [Chrysalis-enabled
Firmware](docs/chrysalis-enabled-firmware.md) documentation.
1 change: 0 additions & 1 deletion SOFTHRUF/Splitography

This file was deleted.

1 change: 0 additions & 1 deletion Technomancy/Atreus

This file was deleted.

25 changes: 25 additions & 0 deletions docs/releng.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Releasing Chrysalis Firmware Builds


## Creating a new snapshot after a release

`make create-snapshot`

## Publishing a release

### Make sure the Kaleidoscope submodule is pulled up to the version you expect

#. `make pull-kaleidoscope` (If you want Kaleidoscope master)
#. Update NEWS.md with any changes in this release
#. 'git commit -a -s -m "A description of what you're changing"
#. 'git push'
#. Visit https://github.com/keyboardio/Chrysalis-Firmware-Bundle/actions to verify that the build succeeded
#. Visit https://github.com/keyboardio/Chrysalis-Firmware-Bundle/releases to download your unpublished snapshot
#. * TEST THE BUILT SNAPSHOT ON HARDWARE*
#. `make finalize-release`
#. Visit https://github.com/keyboardio/Chrysalis-Firmware-Bundle/actions to verify that the build succeeded
#. Visit https://github.com/keyboardio/Chrysalis-Firmware-Bundle/releases to download your unpublished release
#. Test it again
#. Promote it to the latest release on GitHub.


2 changes: 1 addition & 1 deletion lib/Kaleidoscope
Submodule Kaleidoscope updated 63 files
+1 −1 README.md
+5 −4 bin/build-arduino-package
+1 −1 bin/run-docker
+1 −1 plugins/Kaleidoscope-FirmwareDump/src/kaleidoscope/plugin/FirmwareDump.h
+1 −1 plugins/Kaleidoscope-LEDEffect-BootAnimation/src/kaleidoscope/plugin/LEDEffect-BootAnimation.cpp
+7 −0 plugins/KeyboardioHID/.astylerc
+3 −0 plugins/KeyboardioHID/.gitignore
+18 −0 plugins/KeyboardioHID/.travis.yml
+50 −0 plugins/KeyboardioHID/CONTRIBUTING.md
+22 −0 plugins/KeyboardioHID/LICENSE
+39 −0 plugins/KeyboardioHID/Makefile
+14 −0 plugins/KeyboardioHID/Readme.md
+3 −0 plugins/KeyboardioHID/doc/notes
+36 −0 plugins/KeyboardioHID/examples/Consumer/Consumer.ino
+65 −0 plugins/KeyboardioHID/examples/Gamepad/Gamepad.ino
+46 −0 plugins/KeyboardioHID/examples/Keyboard/BootKeyboard/BootKeyboard.ino
+47 −0 plugins/KeyboardioHID/examples/Keyboard/KeyboardLed/KeyboardLed.ino
+59 −0 plugins/KeyboardioHID/examples/Keyboard/NKRO/NKRO.ino
+67 −0 plugins/KeyboardioHID/examples/Mouse/AbsoluteMouse/AbsoluteMouse.ino
+68 −0 plugins/KeyboardioHID/examples/Mouse/ImprovedMouse/ImprovedMouse.ino
+53 −0 plugins/KeyboardioHID/examples/System/System.ino
+76 −0 plugins/KeyboardioHID/keywords.txt
+10 −0 plugins/KeyboardioHID/library.properties
+413 −0 plugins/KeyboardioHID/src/BootKeyboard/BootKeyboard.cpp
+84 −0 plugins/KeyboardioHID/src/BootKeyboard/BootKeyboard.h
+144 −0 plugins/KeyboardioHID/src/DescriptorPrimitives.h
+104 −0 plugins/KeyboardioHID/src/DeviceAPIs/AbsoluteMouseAPI.h
+101 −0 plugins/KeyboardioHID/src/DeviceAPIs/AbsoluteMouseAPI.hpp
+159 −0 plugins/KeyboardioHID/src/HID-Settings.h
+195 −0 plugins/KeyboardioHID/src/HID.cpp
+132 −0 plugins/KeyboardioHID/src/HID.h
+33 −0 plugins/KeyboardioHID/src/HIDAliases.h
+27 −0 plugins/KeyboardioHID/src/HIDReportObserver.cpp
+51 −0 plugins/KeyboardioHID/src/HIDReportObserver.h
+797 −0 plugins/KeyboardioHID/src/HIDTables.h
+54 −0 plugins/KeyboardioHID/src/KeyboardioHID.h
+38 −0 plugins/KeyboardioHID/src/LEDs.h
+3 −0 plugins/KeyboardioHID/src/Makefile
+35 −0 plugins/KeyboardioHID/src/MouseButtons.h
+63 −0 plugins/KeyboardioHID/src/MultiReport/AbsoluteMouse.cpp
+43 −0 plugins/KeyboardioHID/src/MultiReport/AbsoluteMouse.h
+120 −0 plugins/KeyboardioHID/src/MultiReport/ConsumerControl.cpp
+65 −0 plugins/KeyboardioHID/src/MultiReport/ConsumerControl.h
+187 −0 plugins/KeyboardioHID/src/MultiReport/Gamepad.cpp
+126 −0 plugins/KeyboardioHID/src/MultiReport/Gamepad.h
+305 −0 plugins/KeyboardioHID/src/MultiReport/Keyboard.cpp
+77 −0 plugins/KeyboardioHID/src/MultiReport/Keyboard.h
+176 −0 plugins/KeyboardioHID/src/MultiReport/Mouse.cpp
+80 −0 plugins/KeyboardioHID/src/MultiReport/Mouse.h
+107 −0 plugins/KeyboardioHID/src/MultiReport/SystemControl.cpp
+56 −0 plugins/KeyboardioHID/src/MultiReport/SystemControl.h
+131 −0 plugins/KeyboardioHID/src/SingleReport/SingleAbsoluteMouse.cpp
+53 −0 plugins/KeyboardioHID/src/SingleReport/SingleAbsoluteMouse.h
+8 −0 plugins/KeyboardioHID/src/arch/avr.cpp
+8 −0 plugins/KeyboardioHID/src/arch/gd32.cpp
+17 −0 plugins/KeyboardioHID/src/arch/samd.cpp
+1 −1 testing/makefiles/shared.mk
+1 −0 tests/.gitignore
+62 −12 tests/Makefile
+6 −0 tests/_cache-warmer/warm-cache/sketch.json
+1 −0 tests/_cache-warmer/warm-cache/sketch.yaml
+13 −0 tests/_cache-warmer/warm-cache/test.ktest
+46 −0 tests/_cache-warmer/warm-cache/warm-cache.ino
50 changes: 29 additions & 21 deletions tools/release
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,21 @@ set -eE -o pipefail
COMMAND="${1:-help}"
COMMAND="${COMMAND//-/_}"

cfb_news_version() {
head -n 1 NEWS.md | cut -d" " -f 2
}

cfb_make_version() {
make version
}

cfb_push_changes() {
git push
git push
}

## finalize

cfb_verify_release_version() {
if [ "$(cfb_news_version)" != "$(cfb_make_version)" ]; then
news_version=`head -n 1 NEWS.md | cut -d" " -f 2`
if [ "${news_version}" != "$(cfb_make_version)" ]; then
cat >&2 <<EOF
Package version ($(cfb_make_version)) does not match the version in NEWS.md ($(cfb_news_version)).
Package version ($(cfb_make_version)) does not match the version in NEWS.md (${news_version}).
Please add NEWS items for the upcoming release, and make sure the versions
align.
Expand All @@ -33,23 +30,25 @@ EOF
;;
*)
cat >&2 <<EOF
Package version is not a snapshot version. This script requires the version to
be a snapshot version of the upcoming release.
It looks like you're trying to finalize a release when the labeled
version in the Makefile isn't a -snapshot version.
(The version in the Makefile is ($(cfb_make_version)).
This script requires the version to be a snapshot version of the
upcoming release.
EOF
exit 1
;;
esac
}

cfb_get_release_version() {
make version | cut -d- -f1
}

cfb_update_release_version() {
VERSION="$(cfb_get_release_version)"
VERSION=$(make version | cut -d- -f1)

## Update the Makefile
sed -i "s,^VERSION=.*,VERSION=\"${VERSION}\"," Makefile
perl -i -pe "s/^VERSION=.*/VERSION=\"${VERSION}\"/" Makefile

## Update NEWS.md
TMP=$(mktemp)
Expand Down Expand Up @@ -78,7 +77,7 @@ EOF
rm -f "${TMP}"
}

cfb_create_and_push_release_tag() {
cfb_create_and_push_version_tag() {
VERSION=$(cfb_make_version)
git tag -a -s -m "Chrysalis-Firmware-Bundle ${VERSION} release." v${VERSION}
git push origin v${VERSION}
Expand All @@ -90,7 +89,7 @@ cfb_finalize() {
cfb_update_release_date
cfb_commit_release_preparations
cfb_push_changes
cfb_create_and_push_release_tag
cfb_create_and_push_version_tag
}

## create-snapshot
Expand All @@ -99,8 +98,15 @@ cfb_verify_snapshot_version() {
case "$(cfb_make_version)" in
*-snapshot)
cat >&2 <<EOF
Package version ($(cfb_make_version)) is not a tagged release. This script
requires the version to be of a tagged release.
It looks like this is *already* a snapshot.
Package version ($(cfb_make_version)) is not a tagged release.
This script requires the version to be of a tagged release.
The release flow is that there is only ever one -snapshot
before a given release. Snapshots are not themselves versioned,
but are updated on every push.
EOF
exit 1
;;
Expand All @@ -124,7 +130,8 @@ cfb_update_snapshot_version() {
VERSION="$(cfb_new_snapshot_version)"

## Update the Makefile
sed -i "s,^VERSION=.*,VERSION=\"${VERSION}\"," Makefile
perl -i -pe "s/^VERSION=.*/VERSION=\"${VERSION}\"/" Makefile
git add Makefile

## Update NEWS.md
TMP=$(mktemp)
Expand All @@ -137,16 +144,17 @@ cfb_update_snapshot_version() {
echo ; \
cat NEWS.md) >"${TMP}"
mv "${TMP}" NEWS.md
git add NEWS.md
}

cfb_update_snapshot_readme() {
VERSION="$(cfb_make_version)"
sed -i -e "s,\(\[build:dev\]: .*/releases/tag/\).*,\1v${VERSION}," README.md
perl -i -pe "s{(\[build:dev\]: .*/releases/tag/).*}{\${1}v${VERSION}}" README.md
git add README.md
}

cfb_commit_snapshot_changes() {
VERSION="$(cfb_make_version)"
git add Makefile NEWS.md README.md
git commit -s -m "Bump version to ${VERSION}"
}

Expand Down

0 comments on commit ae0eca8

Please sign in to comment.