Skip to content
Open
Show file tree
Hide file tree
Changes from 95 commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
bd10771
🔧 Update CMakeLists to cpp
Eduardo-Barreto Oct 21, 2023
0050396
⬆️ Update cube
Eduardo-Barreto Oct 21, 2023
f93583d
✨ Migrate mcu utility to cpp
Eduardo-Barreto Oct 21, 2023
aa33fbb
📝 Update README
Eduardo-Barreto Oct 21, 2023
b0b8248
📝 Update file header
Eduardo-Barreto Oct 21, 2023
281e42c
✨ Update tests to CPP
Eduardo-Barreto Oct 21, 2023
2b08065
✨ Readd C support
Eduardo-Barreto Oct 22, 2023
693fe59
🔧 Set uncrustify as default formatter
Eduardo-Barreto Oct 22, 2023
345a274
🎨 Function definitions inside namespace
Eduardo-Barreto Oct 22, 2023
545a38e
🎨 Format with uncrustify
Eduardo-Barreto Oct 22, 2023
fd43d6c
📝 Fix guard macros name
Eduardo-Barreto Oct 30, 2023
6689168
📝 Fix guard macros name comment
Eduardo-Barreto Oct 30, 2023
42f102d
🩹 Rename C_Things to PROJECT_Things
Eduardo-Barreto Oct 30, 2023
c6497cd
🔥 Remove mcu led toggle
Eduardo-Barreto Feb 23, 2024
b84c4e1
Merge branch 'migrate/cpp' into the-great-refactor
Eduardo-Barreto Mar 15, 2025
28c3444
🔧 Change Cube toolchain to CMake
Eduardo-Barreto Mar 16, 2025
7b63f56
🔧 Change uncrustify to clang
Eduardo-Barreto Mar 16, 2025
127c0e5
✨ Add linter
Eduardo-Barreto Mar 16, 2025
e969f47
♻️ Refactor structure to new cmake
Eduardo-Barreto Mar 16, 2025
e82cafa
🔇 Remove debug logs
Eduardo-Barreto Mar 16, 2025
95d5d61
✨ Add test_all target
Eduardo-Barreto Mar 16, 2025
7c7f99f
🚨 Fix linter warnings
Eduardo-Barreto Mar 16, 2025
34d1f55
♻️ Update targets
Eduardo-Barreto Mar 16, 2025
ffd8dca
⬆️ Update extensions recommendations
Eduardo-Barreto Mar 16, 2025
523b026
🚧 Add doxyfile
Eduardo-Barreto Mar 16, 2025
800bc6d
✨ Add gpio and test
Eduardo-Barreto Mar 17, 2025
23fbab4
♻️ Change uc to bluepill
Eduardo-Barreto Mar 17, 2025
af15935
✨🚧 Start to add docker
Eduardo-Barreto Mar 17, 2025
99fd511
👷 Add CI
Eduardo-Barreto Mar 17, 2025
a6838dc
🚨 Initialize config members
Eduardo-Barreto Mar 17, 2025
156c5e4
🚨🩹 Fix linter warnings with linter
Eduardo-Barreto Mar 17, 2025
f1bc47d
📝 Update helpme
Eduardo-Barreto Mar 17, 2025
c4c2131
🐛 Update launch.json template
Eduardo-Barreto Mar 17, 2025
260d470
📝 Update README
Eduardo-Barreto Mar 17, 2025
a224f94
♻️ Update vscode settings
Eduardo-Barreto Mar 17, 2025
438b87b
➖ Remove stm32-cmake submodule
Eduardo-Barreto Mar 17, 2025
0102bdb
🔧 Set cube code as system
Eduardo-Barreto Mar 17, 2025
342a1c3
🐛🔧 Remove system from cube sources
Eduardo-Barreto Mar 17, 2025
221672a
♻️ Use pin and ports from cube
Eduardo-Barreto Mar 17, 2025
2345177
🚨💩 Ignore lint error
Eduardo-Barreto Mar 17, 2025
7732f61
🚨 Reorder includes
Eduardo-Barreto Mar 17, 2025
686d0ea
🔧 Cube dont generate main()
Eduardo-Barreto Mar 17, 2025
0b72d38
🔧🐛 Fix cube includes as system
Eduardo-Barreto Mar 17, 2025
faf2e7b
🎨 Make format
Eduardo-Barreto Mar 17, 2025
41fc369
✨ Add blink
Eduardo-Barreto Mar 17, 2025
6fe6569
🔧🐛 Link stm32cubemx
Eduardo-Barreto Mar 17, 2025
4b681be
♻️🐛 Fix project sources
Eduardo-Barreto Mar 17, 2025
7d2c7a8
♻️ Use led toggle
Eduardo-Barreto Mar 17, 2025
1cc2e06
♻️🔧 Refactor to use project files as a library
Eduardo-Barreto Mar 17, 2025
eb07819
📝 omg micras mentioned
Eduardo-Barreto Mar 17, 2025
4daf74f
🩹 Remove thunder_ on sources and headers
Eduardo-Barreto Mar 17, 2025
13e17b6
🔧 Remove lib from format headers and sources
Eduardo-Barreto Mar 17, 2025
7c1924b
🐛 Add whole archive flag to project lib
Eduardo-Barreto Mar 17, 2025
fbde763
📝♻️ Fix README
Eduardo-Barreto Mar 17, 2025
168ef8f
🔥 Remove english section
Eduardo-Barreto Mar 17, 2025
81c2918
:bug: Fix STM32 PROGRAMMER
jairchtq Mar 17, 2025
7794ef6
🎨 Remove tab on else statement
Eduardo-Barreto Mar 17, 2025
8db7e91
📝 Add acknowledgments section
Eduardo-Barreto Mar 19, 2025
7a53420
🔥 Remove preload
Eduardo-Barreto Mar 19, 2025
a5ed64d
🚚 Move docker to .docker
Eduardo-Barreto Mar 19, 2025
0a86681
💚 Fix docker path on workflows
Eduardo-Barreto Mar 19, 2025
3708c99
💚 Fix erroneous .docker on image names
Eduardo-Barreto Mar 19, 2025
2d38cb0
📝 Change make help to helpme
Eduardo-Barreto Mar 27, 2025
6915d17
🩹 Remove redundant cmake build type
Eduardo-Barreto Mar 27, 2025
5917056
🎨 Remove semicolon from namespace ending
Eduardo-Barreto Mar 27, 2025
4aa7bee
📝 Change test led to test gpio
Eduardo-Barreto Mar 27, 2025
ad95f09
📝 Update doxystrings on files
Eduardo-Barreto Mar 27, 2025
2e656c6
🔧 Remove date field from doxygen tempalte
Eduardo-Barreto Mar 27, 2025
4c64dd2
🐛 Remove test includes
Eduardo-Barreto Mar 27, 2025
3a06571
🚚 Rename docker compose to compose
Eduardo-Barreto Mar 27, 2025
7555c90
🎨 Move project configuration up
Eduardo-Barreto Mar 27, 2025
8b7d584
📝 Move ignored folders
Eduardo-Barreto Mar 27, 2025
b0892a6
⬆️ Set cpp version to 26
Eduardo-Barreto Mar 27, 2025
8f2c9ec
🔧 Update build tools
Eduardo-Barreto Mar 29, 2025
23c5e43
💚 Fix cube cmd on dockerfile
Eduardo-Barreto Mar 29, 2025
20c9261
🔨 Add devcontainer
Eduardo-Barreto Mar 29, 2025
6e581fd
📝 Add cubemx warning and docker installation
Eduardo-Barreto Mar 29, 2025
27404d1
📝 Update README
Eduardo-Barreto Mar 29, 2025
d87cf74
📝 Update warning
Eduardo-Barreto Mar 29, 2025
852f770
📝 Update windows path instructions
Eduardo-Barreto Mar 29, 2025
2d6137d
🔇 Make docs in batch mode
Eduardo-Barreto Mar 29, 2025
1394dfe
🐛 Fix CUBE_SOURCE_DIR assignment for WSL and Linux environments
Eduardo-Barreto Mar 29, 2025
4ca3db8
🔥 Remove editorconfig
Eduardo-Barreto Mar 29, 2025
4204ab0
🎨 Fix include orders
Eduardo-Barreto Mar 29, 2025
a6d880a
🎨 Fix line breaking
Eduardo-Barreto Mar 29, 2025
ebde7d4
🔧 Optimize clang-format rules
Eduardo-Barreto Mar 29, 2025
20f7740
🙈 Ignore docs folder
Eduardo-Barreto Mar 29, 2025
398e932
🔧 Optimize doxyfile
Eduardo-Barreto Mar 29, 2025
625323f
✏️ Fix typo
Eduardo-Barreto Mar 29, 2025
07ab85b
📝 Add english README
Eduardo-Barreto Mar 29, 2025
3510d44
📄 Update LICENSE
Eduardo-Barreto Mar 29, 2025
30676f7
♻️ Change githook to clang-format
Eduardo-Barreto Mar 31, 2025
36abad5
🔥 Remove gitmodules file
Eduardo-Barreto Mar 31, 2025
dd4ba09
🩹 Use standard token reference
Eduardo-Barreto Apr 3, 2025
98ecbc9
💚 Add ready for review trigger on pull request ci
Eduardo-Barreto Apr 12, 2025
0120c51
🔧🐛 Support for basic and advanced code generation
Eduardo-Barreto Apr 16, 2025
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
46 changes: 46 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: BlockIndent
AlignConsecutiveBitFields:
Enabled: true
PadOperators: true
AlignConsecutiveDeclarations:
Enabled: true
PadOperators: true
AlignConsecutiveMacros:
PadOperators: true
AlignEscapedNewlines: Left
AllowShortBlocksOnASingleLine: Empty
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AlwaysBreakTemplateDeclarations: Yes
BreakBeforeTernaryOperators: false
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
ColumnLimit: 120
EmptyLineBeforeAccessModifier: Always
IncludeCategories:
- Regex: '^<.*>'
Priority: 1
SortPriority: 1
- Regex: '^".*"'
SortPriority: 2
IncludeIsMainRegex: '$'
IndentCaseLabels: true
IndentExternBlock: NoIndent
IndentPPDirectives: BeforeHash
IndentRequiresClause: false
IndentWidth: 4
IndentWrappedFunctionNames: true
KeepEmptyLinesAtTheStartOfBlocks: false
PackConstructorInitializers: NextLine
PointerAlignment: Left
SeparateDefinitionBlocks: Always
ShortNamespaceLines: 0
SortIncludes: Never
SpaceInEmptyBlock: true
SpacesBeforeTrailingComments: 2
TabWidth: 4
...

60 changes: 60 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
Checks:
-*,
bugprone-*,
-bugprone-easily-swappable-parameters,
-bugprone-narrowing-conversions,
-bugprone-dynamic-static-initializers,
clang-*,
-clang-diagnostic-unused-command-line-argument,
cppcoreguidelines-*,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-avoid-do-while,
-cppcoreguidelines-pro-type-union-access,
google-*,
llvm-*,
-llvm-header-guard,
misc-*,
-misc-include-cleaner,
-misc-const-correctness,
-misc-use-anonymous-namespace,
modernize-*,
-modernize-use-nodiscard,
-modernize-use-trailing-return-type,
performance-*,
readability-*,
-readability-duplicate-include,
-readability-magic-numbers,
WarningsAsErrors: '*'
HeaderFileExtensions:
- ''
- h
- hh
- hpp
- hxx
ImplementationFileExtensions:
- c
- cc
- cpp
- cxx
HeaderFilterRegex: '(include|config)/.*.hpp'
FormatStyle: none
CheckOptions:
readability-magic-numbers.IgnorePowersOf2IntegerValues: true
readability-magic-numbers.IgnoreBitFieldsWidths: true
readability-magic-numbers.IgnoreUserDefinedLiterals: true
readability-identifier-length.MinimumVariableNameLength: 2
readability-identifier-length.IgnoredVariableNames: ^[nxyz]$
readability-identifier-length.MinimumParameterNameLength: 2
readability-identifier-length.IgnoredParameterNames: ^[nxyz]$
misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic: true
cppcoreguidelines-narrowing-conversions.WarnOnIntegerToFloatingPointNarrowingConversion: false
readability-function-cognitive-complexity.Threshold: 30
SystemHeaders: false
ExtraArgsBefore:
- '--target=arm-none-eabi'
- '--sysroot=/usr/lib/arm-none-eabi/'
- '-I/usr/lib/arm-none-eabi/include/c++/13.2.1/'
- '-I/usr/lib/arm-none-eabi/include/c++/13.2.1/arm-none-eabi/'
...
26 changes: 26 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "STM32 Template Container",
"dockerComposeFile": "compose.yaml",
"service": "dev",
"shutdownAction": "stopCompose",
"workspaceFolder": "/project",
"overrideCommand": true,
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools",
"cschlosser.doxdocgen",
"davidanson.vscode-markdownlint",
"marus25.Cortex-Debug",
"dan-c-underwood.arm",
"streetsidesoftware.code-spell-checker",
"streetsidesoftware.code-spell-checker-portuguese-brazilian",
"twxs.cmake",
"ms-vscode.cmake-tools",
"seatonjiang.gitmoji-vscode",
"mhutchie.git-graph",
"xaver.clang-format",
]
}
}
}
18 changes: 18 additions & 0 deletions .docker/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.git/
.github/
.vscode/
.cache/
.idea/
build/
cube/
!**.ioc

.devcontainer
.gitignore
.gitmodules
Doxyfile
LICENSE

*.yaml
*.md
*.iml
39 changes: 39 additions & 0 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
##################################
# Base image for STM32 Template #
##################################
FROM thunderatz/stm32cubemx:6.13.0-f1 AS base

RUN apt-get update -y > /dev/null && \
apt-get upgrade -y > /dev/null && \
apt-get install -y \
gcc-arm-none-eabi \
make \
cmake \
clang-tidy \
clang-format > /dev/null\
&& apt-get clean > /dev/null

WORKDIR /project
COPY ./cube/*.ioc /project/cube/

ENV CUBE_CMD=${CUBE_PATH}/STM32CubeMX

ENV DISPLAY=:10
ARG PROJECT_NAME=stm32_project_template

RUN Xvfb :10 -ac & \
echo "config load /project/cube/${PROJECT_NAME}.ioc\nproject generate\nexit\n" > .cube && \
$CUBE_PATH/STM32CubeMX -q /project/.cube && \
rm .cube && \
pkill -f Xvfb

RUN rm /tmp/.X10-lock

RUN echo "trap 'chown -R ubuntu /project' EXIT" >> "/root/.bashrc"

###################################
# Build image for STM32 Template #
###################################
FROM base AS build

COPY . /project
30 changes: 30 additions & 0 deletions .docker/scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

BUILD_ARG=$1

rm -rf /project/build || exit 1
mkdir -p /project/build || exit 1
cd /project/build || exit 1
cmake .. -DBUILD_TYPE=Release $BUILD_ARG || exit 1

echo "Compiling main..." | sed 's/.*/\x1b[34m&\x1b[0m/'

make -j

if [ $? -eq 0 ]; then
echo "Compilation successful." | sed 's/.*/\x1b[32m&\x1b[0m/'
else
echo "Compilation failed." | sed 's/.*/\x1b[31m&\x1b[0m/'
exit 1
fi

echo "Compiling tests..." | sed 's/.*/\x1b[34m&\x1b[0m/'

make test_all -j

if [ $? -eq 0 ]; then
echo "Tests compiled successfully." | sed 's/.*/\x1b[32m&\x1b[0m/'
else
echo "Tests compilation failed." | sed 's/.*/\x1b[31m&\x1b[0m/'
exit 1
fi
14 changes: 14 additions & 0 deletions .docker/scripts/check_format.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

FILES=$(find . \( -name "*.c" -o -name "*.cpp" -o -name "*.h" -o -name "*.hpp" \) \
-not \( -path "*/cube/*" -o -path "*/build/*" -o -path "*/libs/*" \))

for FILE in $FILES; do
clang-format -style=file -output-replacements-xml $FILE | grep "<replacement " >/dev/null
if [ $? -eq 0 ]; then
echo "Code not properly formatted (File: $FILE). Please run make format." | sed 's/.*/\x1b[31m&\x1b[0m/'
exit 1
fi
done

echo "Code properly formatted." | sed 's/.*/\x1b[32m&\x1b[0m/'
16 changes: 0 additions & 16 deletions .editorconfig

This file was deleted.

4 changes: 2 additions & 2 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ cd "$( dirname "${BASH_SOURCE[0]}" )"/..

for file in $(git diff --cached --name-only --diff-filter=ACMRT | grep "\.[ch]$")
do
uncrustify -q -f $file -c uncrustify.cfg --check > /dev/null 2> /dev/null
if [ $? -ne 0 ]; then
clang-format -style=file -output-replacements-xml $file | grep "<replacement " >/dev/null
if [ $? -eq 0 ]; then
echo "Code not properly formatted. Please run make format and git add again."
git reset -q HEAD
exit 1
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Build lint and check formatting

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- develop
- main
push:
branches:
- develop
- main

jobs:
build:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
steps:
- name: 🔀 Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: 🗃️ Check cache
id: cache
uses: actions/cache/restore@v4
with:
path: .docker/Dockerfile
key: ${{ hashFiles('.github/*', 'cmake/*', '**/*.cpp', '**/*.hpp', '**/*.ioc', '.clang*', 'CMakeLists.txt', '.docker/*') }}
lookup-only: true

- name: 🔧 Set up Docker Buildx
if: steps.cache.outputs.cache-hit != 'true'
uses: docker/setup-buildx-action@v3

- name: 🐋 Build Docker image
if: steps.cache.outputs.cache-hit != 'true'
uses: docker/build-push-action@v6
Comment on lines +37 to +38

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if: steps.cache.outputs.cache-hit != 'true'
uses: docker/build-push-action@v6
if: steps.cache.outputs.cache-hit != 'true'
timeout-minutes: 10
uses: docker/build-push-action@v6

with:
context: .
file: .docker/Dockerfile
target: build
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
no-cache-filters: build
tags: project:build

- name: 🎨 Check code formatting
if: steps.cache.outputs.cache-hit != 'true'
run: docker run --rm project:build /bin/bash /project/.docker/scripts/check_format.sh

- name: 🔨 Build project
if: steps.cache.outputs.cache-hit != 'true'
run: docker run --rm project:build /bin/bash /project/.docker/scripts/build.sh

- name: 🚨 Lint project
if: steps.cache.outputs.cache-hit != 'true'
run: docker run --rm project:build /bin/bash /project/.docker/scripts/build.sh -DLINTER_MODE=ON
Comment on lines +53 to +59
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Não olhei tão a fundo, mas precisa desses dois estágios? O o build já não é feito junto do linting?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verdade, acho q eh melhor juntar nesse caso

a única diferença de resultado eh que quando roda com lint não tem binários de saída, mas como o CI não usa eu acho legal, já eh bom que diminui o tempo do check

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a gnt tbm perde a clareza da informação se falhou na compilação ou no lint, mas acho q tá suave

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pra ambos os casos teria que olhar os logs pra ver o que falhou, então acho que não é tanto um problema. E aí economizar tempo na CI sempre ajuda, ainda mais pra projetos grandes aushhshshshsu

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eu ainda digo que esse if de cache em todos os steps não faz sentido nenhum e tem que ter uma forma melhor

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Analisando melhor, acho que vale destacar uma troca importante entre clareza e performance aqui.

Atualmente, temos dois estágios separados: um para o build puro e outro para o build com lint. A proposta de juntar os dois ajuda a economizar tempo no CI, mas tem algumas implicações.

Comparativo entre os cenários

Build sem linter (estágios separados):

⏱️ Build puro: ~23s

🧹 Lint (com build): ~3min

🔍 Time-to-fail se o código não compila: 23s

🔍 Time-to-fail se o lint falha: ~3min 23s

Build com linter somente (estágios unificados):

🔄 Tudo junto: ~3min

🔍 Time-to-fail para qualquer falha: sempre até 3min

Ou seja, se o código não compila, o CI gasta 3 minutos para descobrir algo que poderia ser pego em 23 segundos. Isso pode ser relevante principalmente quando estamos em uma iteração rápida ou PRs mais simples.

Além disso, com os estágios separados, a gente ganha um pouco mais de clareza visual no resultado do CI, já que conseguimos ver diretamente se falhou no build ou no lint pelo nome do step (com o emojizinho bonitinho :p). Se unificarmos, isso se perde, aí todo erro vai parecer um erro do "build+lint"

Por outro lado…

É justo dizer que falhas de compilação são menos comuns em branches que sobem PRs, então há um argumento forte pra otimizar pro caso comum (sucesso), e evitar rodar o build puro à toa.

Eu particularmente acho que tanto faz kkkkkkkkkkkkkkkk mas como eu gosto dos emojis tendo a manter como está. De qualquer modo, é uma coisa extremamente simples que pode ser configurada pelo projeto se ele nao gostar do jeito que está


- name: 🗃️ Save cache
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: .docker/Dockerfile
key: ${{ steps.cache.outputs.cache-primary-key }}
42 changes: 42 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Add binaries to release

on:
release:
types: [published]

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 🔀 Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: 🔧 Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: 🐋 Build Docker image
uses: docker/build-push-action@v6
Comment on lines +22 to +23

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: 🐋 Build Docker image
uses: docker/build-push-action@v6
- name: 🐋 Build Docker image
timeout-minutes: 10
uses: docker/build-push-action@v6

with:
context: .
file: .docker/Dockerfile
target: build
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
no-cache-filters: build
tags: project:build

- name: 🔨 Build project
run: |
docker run --name release project:build /bin/bash /project/.docker/scripts/build.sh
docker cp release:/project/build/ output/

- name: ⬆️ Upload binaries
run: gh release upload ${{ github.event.release.tag_name }} output/*.hex output/*.elf
env:
GITHUB_TOKEN: ${{ github.token }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ build/
-g
.jlink-flash
.cube
docs

# Created by https://www.gitignore.io/api/visualstudiocode,c

Expand Down Expand Up @@ -66,7 +67,6 @@ dkms.conf
### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/extensions.json


Expand Down
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

Loading