Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 committed Aug 17, 2024
1 parent 5e003a6 commit 52cdecb
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 17 deletions.
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
UBUNTU_IMAGE = ubuntu:22.04

.PHONY: $(shell ls)

Expand Down
2 changes: 1 addition & 1 deletion scripts/format.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define DOCKERFILE_FORMAT
FROM ubuntu:20.04
FROM $(UBUNTU_IMAGE)

RUN apt update && apt install -y --no-install-recommends \
clang-format
Expand Down
2 changes: 1 addition & 1 deletion scripts/lint.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
define DOCKERFILE_LINT
FROM ubuntu:20.04
FROM $(UBUNTU_IMAGE)

RUN apt update && apt install -y --no-install-recommends \
clang-format
Expand Down
13 changes: 2 additions & 11 deletions test/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
RPI_IMAGE = balenalib/raspberry-pi:bullseye

all: build-cross

build-direct:
@$(MAKE) -f Makefile.src

define DOCKERFILE
FROM balenalib/raspberry-pi-debian:stretch
FROM $(RPI_IMAGE)
RUN apt-get update && apt-get install -y --no-install-recommends \
make \
gcc \
Expand All @@ -22,13 +23,3 @@ export DOCKERFILE
build-cross:
docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes >/dev/null
echo "$$DOCKERFILE" | docker build ../ -f - -t temp

TARGET ?= [email protected]
BIN = test-imu

deploy: build-cross
ssh $(TARGET) "killall $(BIN) || exit 0"
docker run --rm temp cat /s/test/$(BIN) \
| ssh $(TARGET) "tee ./$(BIN) >/dev/null"
ssh $(TARGET) "chmod +x ./$(BIN)"
ssh $(TARGET) "./$(BIN)"
5 changes: 2 additions & 3 deletions test/Makefile.src
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

BIN = test-imu

OBJECTS = \
Expand All @@ -16,7 +15,7 @@ LDFLAGS +=
all: $(BIN)

$(BIN): $(OBJECTS)
gcc $(OBJECTS) $(LDFLAGS) -o $@
$(CC) $(OBJECTS) $(LDFLAGS) -o $@

%.o: %.c
gcc $(CFLAGS) -c $< -o $@
$(CC) $(CFLAGS) -c $< -o $@

0 comments on commit 52cdecb

Please sign in to comment.