-
Notifications
You must be signed in to change notification settings - Fork 4
Reproducible Docker build for test cases in src/test #288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
katrinafyi
wants to merge
95
commits into
main
Choose a base branch
from
nix-docker-build
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
95 commits
Select commit
Hold shift + click to select a range
4357a5a
nix + docker work
katrinafyi d468595
move all docker things into script
katrinafyi a1882b8
add md5sum and docker hashing
katrinafyi 4eda022
remove binaries in secret_write
katrinafyi dc5f18c
implement docker hashing
katrinafyi 96f83ed
add hash files
katrinafyi 6de43e5
check should depend on artefacts
katrinafyi 59d965b
more things inside docker. use podman by default.
katrinafyi 2084fc9
DELETE GENERATED FILES in src/test
katrinafyi a65f380
fix docker clang command and only md5sum certain files
katrinafyi 83b6842
gitignore generated files
katrinafyi 181ecb4
do not use -it in docker, to avoid CRLF
katrinafyi bec6d9f
add hash files in src/test
katrinafyi e096ee9
move docker commands into parent makefile
katrinafyi 1a72342
fix running lift-directories.mk directly
katrinafyi 9188366
add docker-flake
katrinafyi b3d1000
support 'env' inside docker-helper.sh
katrinafyi ec7ba8a
tweak and fix some things in hash generation
katrinafyi d9aa555
update hash with bap ite
katrinafyi f1c5475
tweaks to makefile
katrinafyi c65f7f6
add readme for docker usage
katrinafyi 95b97e0
add bap-normalise and use original absolute paths in docker
katrinafyi dc10fad
update md5sums after bap-normalise
katrinafyi 47e62b9
support nesting shell. fix bap-normalise. proto-json still broken
katrinafyi 3df5ff7
split up targets to avoid inadvertent parallelism
katrinafyi 48a65ca
add repro-check to readme
katrinafyi dd5e0d6
touch bap-normalise and make somewhat more atomic
katrinafyi 69b56e1
update flake
katrinafyi 265f432
fix bap normalise fr!
katrinafyi 2cba5e3
hash changes after bap-normalise fix fr
katrinafyi 3e844fa
support push/pull workflows in docker-helper
katrinafyi 420c712
update flakes in docker-hash
katrinafyi 5eff3b0
touch readme
katrinafyi 6c430d7
big md5sums
katrinafyi 2874d70
update md5sums after big md5sums
katrinafyi 0092c63
update src/test with clearer steps and flow-chart
katrinafyi a57a12e
update development readme to mention Docker lifting
katrinafyi 5ba93c4
update src/test/readme for new tests
katrinafyi 419145e
remove files added from a docker shell
katrinafyi 7af7677
update big md5sum
katrinafyi 9dfe341
add gitattributes to mark generated files
katrinafyi bf4c9ed
remove suprious gcc1/gcc2
katrinafyi ecb3164
replace tabs in docker-helper
katrinafyi 6ea272c
tarball extraction for compiled files
katrinafyi b5d37ca
ci: download and extract compiled files
katrinafyi f5230b2
makefile for everything in src/test and update readme
katrinafyi c78a06d
FIX missing arrays_simple
katrinafyi 60cf168
use a docker-contents.txt instead of docker-hash everywhere
katrinafyi 369473d
REMOVE GENERATED FILES in other directories
katrinafyi a080854
add md5sums for non-correct/incorret
katrinafyi 7b1bdf9
add dsa/irred_loops, use tarbz2, add docker-contents
katrinafyi fd0e6d2
docker platform
katrinafyi 3830d8b
avoid -v for macos
katrinafyi 035658f
add macos notes, local notes, and dir mount notes
katrinafyi fb0a391
remove docker hash mentions
katrinafyi 511558a
add sha1sum to compiled.url.txt
katrinafyi a45482f
Merge remote-tracking branch 'origin/main' into nix-docker-build
katrinafyi b0786ee
src/test/readme: fix markdown
katrinafyi 113171f
UPDATE EXPECTED
katrinafyi 2bf1d2e
extract set mtime to current time
katrinafyi e7b2fc3
allow file command to fail in Makefile
katrinafyi 6cfd953
add new dsa examples
katrinafyi 6c23bf0
handle empty directories and missing md5sum better
katrinafyi deaa46c
docker disable hardening
katrinafyi 4eb193c
remove NIX_HARDENING from docker-helper
katrinafyi d19c174
gcc_pic: add -pie argument ?????
katrinafyi d9c9e2e
update binaries after -pie
katrinafyi d1612ad
sort big md5sum, use zst
katrinafyi dedc39b
update readme
katrinafyi fa740ff
support configuring LIFT_ARTEFACTS in config.mk and remove spurious B…
katrinafyi 9073116
rename md5sum files to NAME.md5sum
katrinafyi 33ba34c
remove dsa and irreducible_loop from the Makefile
katrinafyi 306d0d8
exclude syscall/clang_O2:BAP
katrinafyi c040856
ci: run without docker, using pinned z3 and boogie
katrinafyi 7a41b20
gitattibutes eol=lf for url and flake files
katrinafyi 3a60c4c
docker-helper: push does not need platform
katrinafyi 6bd37a2
document docker-helper variables, add DOCKER_TAG
katrinafyi d04b509
log url in make extract
katrinafyi 9f38f73
lf for more files, use `stop` in docker-helper
katrinafyi 5f3e137
add defaults for new tool variables
katrinafyi 573af8f
choosing bap/gtirb based on existing files
katrinafyi ab1c744
update md5sums after bap/gtirb auto-detection
katrinafyi 31b642f
-pie for gcc/gcc_O2 and update md5s
katrinafyi 414de0c
preorder iterator
ailrst 288b4e1
IndirectCallTests: auto-detect indirect call IDs
katrinafyi 05e7deb
touch comment of ILForwardIterator
katrinafyi e9ad100
LiveVarsAnalysisTests: avoid fixed addresses
katrinafyi 1dfbe3f
docker flake update. to pick up gtirb-semantics pc fix
katrinafyi 0d4b7ee
Merge remote-tracking branch 'origin/main' into nix-docker-build
katrinafyi ae42e64
fix merge oopsie
katrinafyi 85079be
update compiled tarball and add procedure_summaries
katrinafyi 009dc88
ci: add 'make extract'
katrinafyi 75947ab
make push TODO NOT DONE YET
katrinafyi c05d5ed
fix DataStructureAnalysisTest by avoiding unnecessary temps in memload
katrinafyi 5b76273
remove bap from procedure_summary5 and update
katrinafyi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 @@ | ||
| md5sums linguist-generated | ||
| compiled.md5sum linguist-generated | ||
| docker-hash linguist-generated | ||
| *.gts linguist-generated | ||
| *.adt linguist-generated | ||
| *.bir linguist-generated | ||
| *.relf linguist-generated | ||
|
|
||
| src/test/compiled.url.txt text eol=lf | ||
| src/test/make/docker-flake.txt text eol=lf | ||
|
|
||
| Makefile text eol=lf | ||
| *.sh text eol=lf | ||
| *.mk text eol=lf | ||
| *.md5sum text eol=lf |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,12 +1,60 @@ | ||
| TARGETSS := all verify clean cleanall cleanlift recompile json cleanjson cleangts gts | ||
| TARGETSS := all verify repro-stash repro-check md5sum-check md5sum-update clean cleanall cleanlift recompile json cleanjson cleangts gts | ||
|
|
||
| SUBTARGETS = $(wildcard correct/*/ incorrect/*/) | ||
| .PHONY : $(TARGETSS) $(SUBTARGETS) correct incorrect | ||
| # subdirectories of src/test. to be entered into by this makefile. | ||
| DIRS := correct incorrect extraspec_correct extraspec_incorrect indirect_calls memory_regions procedure_summaries | ||
| # dirs with different directory structure: dsa, irreducible_loops | ||
|
|
||
| $(TARGETSS): $(SUBTARGETS) | ||
| # non-test dirs: make, scala, unimplemented | ||
|
|
||
| correct: $(realpath $(wildcard correct/*)) | ||
| incorrect: $(realpath $(wildcard incorrect/*)) | ||
| # in case the user specfies DIRS, make sure all dirs exist. | ||
| $(foreach d, $(DIRS), \ | ||
| $(if $(wildcard $(d)/.), \ | ||
| , \ | ||
| $(error user error: directory "$(d)" in DIRS variable does not exist))) | ||
|
|
||
| SUBDIRS = $(wildcard $(addsuffix /*/,$(DIRS))) | ||
| .PHONY : $(TARGETSS) $(SUBDIRS) $(DIRS) | ||
|
|
||
| # through some unpleasantness, this lets the user specify either DIRS or SUBDIRS | ||
| # on the command line, and the make operation will be narrowed to that directory | ||
| $(TARGETSS): $(SUBDIRS) | ||
|
|
||
| $(SUBDIRS): | ||
| $(MAKE) -C $@ -f $(realpath ./make/lift-directories.mk) $(MAKECMDGOALS) | ||
|
|
||
| # concats md5sums files in subdirectories into a compiled.md5sum. | ||
| # check with `md5sum -c compiled.md5sum` in src/test. | ||
| .PHONY: compiled.md5sum | ||
| compiled.md5sum: | ||
| find $(DIRS) -name '*.md5sum' -exec cat '{}' + | sort -k2 > compiled.md5sum | ||
|
|
||
| TARBALL := compiled.tar.zst | ||
|
|
||
| $(TARBALL) docker-contents.txt &: compiled.md5sum | ||
| set -u; $$DOCKER_CMD hash > docker-contents.txt # before compessing, make sure docker-contents.txt is up to date. | ||
| md5sum --quiet -c compiled.md5sum # before compressing, make sure our files match expected hashes. | ||
| list=`mktemp`; cut -d' ' -f3 compiled.md5sum > $$list && tar caf $(TARBALL) -T $$list && rm $$list | ||
| sha1sum $(TARBALL) | ||
|
|
||
| .PHONY: extract | ||
| extract: | ||
| # log URL and expected hash | ||
| { head -n1 compiled.url.txt; tail -n1 compiled.url.txt; } | cat -v | ||
| # check existing file, otherwise download fresh copy. | ||
| { tail -n1 compiled.url.txt | sha1sum -c - ; } \ | ||
| || curl "$$(head -n1 compiled.url.txt)" -o $(TARBALL) | ||
| # check file type. | ||
| -file $(TARBALL) | ||
| # validate the hash, otherwise remove the incorrect file and abort. | ||
| { tail -n1 compiled.url.txt | sha1sum -c - ; } || { rm -v $(TARBALL); exit 1; } | ||
| tar xf $(TARBALL) --keep-old-files --touch | ||
| md5sum --quiet -c compiled.md5sum # check that extracted files match expected checksums | ||
|
|
||
| .PHONY: push | ||
| push: | ||
| tmp=`mktemp -d` && \ | ||
| git clone git@github.com:UQ-PAC/basil-tests.git $$tmp --single-branch --branch basil-src-test && \ | ||
| cd $$tmp && \ | ||
|
|
||
| rm -rf $$tmp | ||
|
|
||
| $(SUBTARGETS): | ||
| -$(MAKE) -C $@ -f $(realpath ./make/lift-directories.mk) $(MAKECMDGOALS) | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.