Skip to content

Commit

Permalink
feat: add make option to build debian source
Browse files Browse the repository at this point in the history
  • Loading branch information
mpolitzer committed Jul 25, 2024
1 parent 3b01f1e commit a3c1bf4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ ENV DEV_ENV_HAS_TOOLCHAIN=yes

WORKDIR /usr/src/emulator

FROM --platform=$TARGETPLATFORM cartesi/toolchain:0.17.0-rv64ima-lp64 as debian-source-package
WORKDIR /usr/src/emulator
COPY debian debian
RUN apt update && \
apt build-dep --no-install-recommends -y .
COPY . .
RUN dch -v `make -s version` "Release `make -s version`" && \
dpkg-buildpackage

FROM --platform=$TARGETPLATFORM linux-env as dep-builder

COPY Makefile .
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ build-emulator-tests-builder-image: build-emulator-builder-image
build-debian-package:
docker build $(DOCKER_PLATFORM) --target debian-packager --build-arg RELEASE=$(release) --build-arg COVERAGE=$(coverage) --build-arg SANITIZE=$(sanitize) --build-arg MACHINE_EMULATOR_VERSION=$(MACHINE_EMULATOR_VERSION) -t $(DEBIAN_IMG) -f Dockerfile .

build-debian-source-package:
docker build $(DOCKER_PLATFORM) --target debian-source-package --build-arg MACHINE_EMULATOR_VERSION=$(MACHINE_EMULATOR_VERSION) -t $(DEBIAN_IMG) -f Dockerfile .

build-tests-debian-packages: build-emulator-builder-image
docker build $(DOCKER_PLATFORM) --target tests-debian-packager --build-arg MACHINE_EMULATOR_VERSION=$(MACHINE_EMULATOR_VERSION) --build-arg TAG=$(TAG) -t cartesi/machine-emulator:tests-debian-packager -f tests/Dockerfile .
$(MAKE) copy-tests-debian-packages
Expand Down

0 comments on commit a3c1bf4

Please sign in to comment.