-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b4fdc8e
commit e315f0a
Showing
3 changed files
with
79 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM ubuntu | ||
|
||
ARG LIBCON4M_REPO=/libcon4m | ||
|
||
WORKDIR $LIBCON4M_REPO | ||
COPY ./ $LIBCON4M_REPO | ||
|
||
# llvm.sh needs tools to install clang-18 | ||
RUN apt-get update && apt upgrade | ||
RUN apt-get install -y \ | ||
lsb-release \ | ||
wget \ | ||
software-properties-common \ | ||
gnupg | ||
|
||
RUN wget https://apt.llvm.org/llvm.sh | ||
RUN chmod u+x llvm.sh | ||
RUN ./llvm.sh 18 | ||
|
||
# meson install + crypto | ||
RUN apt-get install -y \ | ||
meson \ | ||
libssl-dev | ||
|
||
ENTRYPOINT [ "./scripts/run_tests.sh" ] |
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,39 @@ | ||
# libcon4m | ||
|
||
This is the C library for con4m. The language reference guide is [here](./doc/reference.md). | ||
|
||
# tests | ||
|
||
## running via dockerfile | ||
|
||
To build the dockerfile, run the following command from the repository root: | ||
|
||
``` | ||
docker build -t libcon4m-tests -f Dockerfile.test . | ||
``` | ||
|
||
To run the tests, run: | ||
|
||
``` | ||
docker run libcon4m-tests | ||
``` | ||
|
||
## running directly | ||
|
||
To run the tests directly, the following are required: | ||
|
||
- minimum versions clang 17.0.6 or gcc 14.1 or greater | ||
- meson | ||
- ninja | ||
|
||
From the repository root, build with: | ||
|
||
``` | ||
./dev build | ||
``` | ||
|
||
and run with: | ||
|
||
``` | ||
./dev run | ||
``` |
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,15 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
rm -rf ./debug ./build ./release | ||
|
||
comp='clang-18' | ||
# comp='gcc' | ||
|
||
${comp} -v | ||
|
||
# kind='debug' | ||
kind='build' | ||
|
||
CC="${comp}" ./dev "${kind}" | ||
./"${kind}"/c4test ./tests |