forked from erwint/libdmg-hfsplus
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request planetbeing#13 from vasi/docker
Run Linux tests in Docker
- Loading branch information
Showing
4 changed files
with
49 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM ubuntu:noble AS base | ||
|
||
FROM base AS build | ||
RUN apt-get update && apt-get install -y g++ cmake make libbz2-dev libz-dev | ||
RUN mkdir -p /source | ||
COPY CMakeLists.txt /source | ||
COPY common /source/common | ||
COPY includes /source/includes | ||
COPY hdutil /source/hdutil | ||
COPY dmg /source/dmg | ||
COPY hfs /source/hfs | ||
RUN cmake -B /build /source | ||
RUN make -C /build -j$(nproc) | ||
|
||
FROM base AS test | ||
RUN apt-get update && apt-get install -y pipx perl xxd | ||
# We never want to actually make anything | ||
RUN ln -s /bin/true /bin/make | ||
RUN pipx install cram | ||
ENV PATH="/usr/bin:/root/.local/bin" | ||
RUN mkdir -p /test/build/dmg /test/build/hfs | ||
COPY --from=build /build/dmg/dmg /test/build/dmg/dmg | ||
COPY --from=build /build/hfs/hfsplus /test/build/hfs/hfsplus | ||
COPY test /test/test | ||
WORKDIR /test | ||
CMD ["/bin/sh", "-c", "cram test/*.t"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
set -ex | ||
docker buildx build --progress=plain --tag libdmg-hfsplus "$(dirname "$0")/.." | ||
docker run libdmg-hfsplus |