Skip to content

Commit

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

This file was deleted.

2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
RPI_IMAGE = balenalib/raspberry-pi:bullseye
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
19 changes: 18 additions & 1 deletion scripts/test.mk
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
define DOCKERFILE_TEST
FROM $(RPI_IMAGE)
RUN apt-get update && apt-get install -y --no-install-recommends \
make \
gcc \
libc6-dev \
libi2c-dev
WORKDIR /s
COPY . .
RUN make test-nodocker
endef
export DOCKERFILE_TEST

test:
cd test && make build-cross
docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes >/dev/null
echo "$$DOCKERFILE_TEST" | docker build . -f - -t temp

test-nodocker:
@$(MAKE) -C test -f Makefile.src
34 changes: 0 additions & 34 deletions test/Makefile

This file was deleted.

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 028d8e1

Please sign in to comment.