Skip to content

Commit

Permalink
feat: add docker tests for custom linker
Browse files Browse the repository at this point in the history
  • Loading branch information
abeimler committed Aug 6, 2023
1 parent 8ad22f1 commit 661e335
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,11 @@ services:
build:
context: .
dockerfile: ./docker/Dockerfile.arm-bare-metal
target: build
target: build
build-gcc-with-custom-linker:
build:
context: .
dockerfile: ./docker/Dockerfile
args:
compiler: gcc
target: build-with-custom-linker
14 changes: 14 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ RUN setup-cpp --compiler $compiler --llvm true --cmake true --doxygen true --nin
COPY ./docker/entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT [ "/docker-entrypoint.sh" ]

FROM setup AS setup-custom-linker

# install linker
RUN apt-get update && apt-get install -y \
binutils \
mold \
lld \
&& rm -rf /var/lib/apt/lists/*

FROM setup AS build
COPY . /home/project_options
Expand All @@ -30,3 +38,9 @@ WORKDIR /home/project_options
RUN git submodule update --init
CMD ["/bin/bash", "-c", "task myproj:test"]


FROM setup-custom-linker AS build-with-custom-linker
COPY . /home/project_options
WORKDIR /home/project_options
RUN git submodule update --init
CMD ["/bin/bash", "-c", "task myproj:build"]
4 changes: 4 additions & 0 deletions docker/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ tasks:
- docker-compose up --build test-gcc
- docker-compose down

gcc.custom-linker:
- docker-compose up --build build-gcc-with-custom-linker
- docker-compose down

llvm:
- docker-compose up --build build-llvm
- docker-compose up --build test-llvm
Expand Down

0 comments on commit 661e335

Please sign in to comment.