This commit is contained in:
@@ -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
|
||||||
@@ -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 $< $@
|
||||||
|
|||||||
Reference in New Issue
Block a user