new git-binaries implement for upload
AVR Build / build (push) Failing after 1s

This commit is contained in:
Lukas
2026-04-29 16:57:55 +02:00
parent cb2f836672
commit 96c7119005
2 changed files with 29 additions and 6 deletions
+28 -5
View File
@@ -49,8 +49,31 @@ jobs:
run: | run: |
make BUILD_TYPE=$BUILD_TYPE PREFIX=$PREFIX VERSION=$VERSION make BUILD_TYPE=$BUILD_TYPE PREFIX=$PREFIX VERSION=$VERSION
- name: Upload hex
uses: actions/upload-artifact@v4 - name: Publish HEX to binaries repo
with: run: |
name: firmware-${{ env.BUILD_TYPE }} git config --global user.name "gitea-runner"
path: build/**/*.hex git config --global user.email "runner@runner.runner"
# clone binaries repo
git clone https://gitea.swiss-dedi.ch/Lukas/Flextron-Binaries.git bins
# decide target folder
if [ "$BUILD_TYPE" = "dev" ]; then
TARGET_DIR="bins/dev"
else
TARGET_DIR="bins/live"
fi
mkdir -p "$TARGET_DIR"
# copy newest hex
cp $(find build -name "*.hex" | head -n 1) \
"$TARGET_DIR/${PREFIX}_${VERSION}.hex"
cd bins
git add .
git commit -m "CI build $BUILD_TYPE $VERSION" || echo "No changes"
git push
+1 -1
View File
@@ -19,7 +19,7 @@ all: $(TARGET).hex
$(TARGET).elf: $(SRC) $(TARGET).elf: $(SRC)
@mkdir -p $(OUTDIR) @mkdir -p $(OUTDIR)
$(CC) $(CFLAGS) $< -o $@ $(CC) $(CFLAGS) $< -o $@ //avr-gcc -mmcu=atmega644pa ....
$(TARGET).hex: $(TARGET).elf $(TARGET).hex: $(TARGET).elf
$(OBJCOPY) -O ihex -R .eeprom $< $@ $(OBJCOPY) -O ihex -R .eeprom $< $@