Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github action building #1

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 21 additions & 11 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: C/C++ CI
name: Build

on:
push:
Expand All @@ -8,16 +8,26 @@ on:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: configure
run: ./configure
- uses: actions/checkout@v3
- name: install avr gcc compiler
run: |
sudo apt-get install avr-libc
- name: download arduino
run: |
wget https://downloads.arduino.cc/arduino-1.0.5-linux64.tgz
tar zxvf arduino-1.0.5-linux64.tgz
- name: download font
run: |
cd U8glib
mkdir fntsrc
cd fntsrc
wget https://raw.githubusercontent.com/olikraus/u8glib/master/fntsrc/u8g_font_courb14r.c
- name: make
run: make
- name: make check
run: make check
- name: make distcheck
run: make distcheck
run: make HARDWARE_MOTHERBOARD=33 ARDUINO_INSTALL_DIR=arduino-1.0.5
- name: Upload firmware files (elf+hex)
uses: actions/upload-artifact@v3
with:
name: firmware
path: applet/PancakeBot-firmware*
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*.lo
*.o
*.obj
*.d

# Precompiled Headers
*.gch
Expand All @@ -27,3 +28,7 @@
*.exe
*.out
*.app

# Embedded
*.elf
*.hex
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ TARGET = $(notdir $(CURDIR))
# directory is added here

VPATH = .
VPATH += $(CURDIR)/U8glib
VPATH += $(CURDIR)/U8glib/utility
VPATH += $(CURDIR)/U8glib/fntsrc
VPATH += $(BUILD_DIR)
VPATH += $(HARDWARE_SRC)
ifeq ($(HARDWARE_VARIANT), arduino)
Expand Down Expand Up @@ -267,6 +270,12 @@ CXXSRC = WMath.cpp WString.cpp Print.cpp Marlin_main.cpp \
stepper.cpp temperature.cpp cardreader.cpp ConfigurationStore.cpp \
watchdog.cpp SPI.cpp Servo.cpp Tone.cpp ultralcd.cpp digipot_mcp4451.cpp \
vector_3.cpp qr_solve.cpp
# u8glib source files
SRC += u8g_ll_api.c u8g_rot.c u8g_font.c u8g_bitmap.c u8g_rect.c u8g_clip.c \
u8g_dev_st7565_dogm132.c u8g_com_api.c u8g_pb.c u8g_pb8v1.c \
u8g_com_arduino_sw_spi.c u8g_state.c u8g_com_arduino_common.c \
u8g_delay.c u8g_page.c u8g_font_courb14r.c
CXXSRC += U8glib.cpp
ifeq ($(LIQUID_TWI2), 0)
CXXSRC += LiquidCrystal.cpp
else
Expand Down
6 changes: 3 additions & 3 deletions SdBaseFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ bool SdBaseFile::getFilename(char* name) {
return true;
}
//------------------------------------------------------------------------------
void SdBaseFile::getpos(fpos_t* pos) {
void SdBaseFile::getpos(fpos_tt* pos) {
pos->position = curPosition_;
pos->cluster = curCluster_;
}
Expand Down Expand Up @@ -925,7 +925,7 @@ bool SdBaseFile::openRoot(SdVolume* vol) {
* \return The byte if no error and not at eof else -1;
*/
int SdBaseFile::peek() {
fpos_t pos;
fpos_tt pos;
getpos(&pos);
int c = read();
if (c >= 0) setpos(&pos);
Expand Down Expand Up @@ -1492,7 +1492,7 @@ bool SdBaseFile::seekSet(uint32_t pos) {
return false;
}
//------------------------------------------------------------------------------
void SdBaseFile::setpos(fpos_t* pos) {
void SdBaseFile::setpos(fpos_tt* pos) {
curPosition_ = pos->position;
curCluster_ = pos->cluster;
}
Expand Down
10 changes: 5 additions & 5 deletions SdBaseFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@
#include "SdVolume.h"
//------------------------------------------------------------------------------
/**
* \struct fpos_t
* \struct fpos_tt
* \brief internal type for istream
* do not use in user apps
*/
struct fpos_t {
struct fpos_tt {
/** stream position */
uint32_t position;
/** cluster for position */
uint32_t cluster;
fpos_t() : position(0), cluster(0) {}
fpos_tt() : position(0), cluster(0) {}
};

// use the gnu style oflag in open()
Expand Down Expand Up @@ -196,11 +196,11 @@ class SdBaseFile {
/** get position for streams
* \param[out] pos struct to receive position
*/
void getpos(fpos_t* pos);
void getpos(fpos_tt* pos);
/** set position for streams
* \param[out] pos struct with value for new position
*/
void setpos(fpos_t* pos);
void setpos(fpos_tt* pos);
//----------------------------------------------------------------------------
bool close();
bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock);
Expand Down