-
Notifications
You must be signed in to change notification settings - Fork 31
Automate building using docker #1
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3788bee
build: add build directory to .gitignore
RoiKlevansky ab06736
build: add script for automatically downloading packages
RoiKlevansky 4347d18
build: add script which patches GDB
RoiKlevansky b5e5665
build: add build script for automated building
RoiKlevansky a3becb6
build: add Dockerfile
RoiKlevansky 0d59976
build: add Makefile
RoiKlevansky 8e32342
docs: document missing step in the building of MPFR
RoiKlevansky e70ba04
docs: add information about building with docker
RoiKlevansky 4cde133
build: make build script more verbose
RoiKlevansky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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 |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| # IDE Folders | ||
| .idea/ | ||
| .vscode/ | ||
|
|
||
| # Build folders | ||
| build/ |
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,20 @@ | ||
| FROM ubuntu:24.04 | ||
|
|
||
| # Install dependencies | ||
| RUN apt update && apt install -y \ | ||
| g++ \ | ||
| g++-aarch64-linux-gnu \ | ||
| g++-arm-linux-gnueabi \ | ||
| g++-powerpc-linux-gnu \ | ||
| gcc \ | ||
| gcc-aarch64-linux-gnu \ | ||
| gcc-arm-linux-gnueabi \ | ||
| gcc-powerpc-linux-gnu \ | ||
| m4 \ | ||
| make \ | ||
| patch \ | ||
| texinfo \ | ||
| wget \ | ||
| xz-utils | ||
|
|
||
| WORKDIR /app/gdb |
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,54 @@ | ||
| ARCHS := x86_64 arm aarch64 powerpc | ||
| TARGETS := $(addprefix build-, $(ARCHS)) | ||
|
|
||
| .PHONY: clean help download_packages build patch-gdb build-docker-image $(TARGETS) | ||
|
|
||
| help: | ||
| @echo "Usage:" | ||
| @echo " make build" | ||
| @echo "" | ||
|
|
||
| @for target in $(TARGETS); do \ | ||
| echo " $$target"; \ | ||
| done | ||
|
|
||
| @echo "" | ||
| @echo " make clean" | ||
|
|
||
| build/build-docker-image.stamp: Dockerfile | ||
| mkdir -p build | ||
| docker build -t gdb-static . | ||
| touch build/build-docker-image.stamp | ||
|
|
||
| build-docker-image: build/build-docker-image.stamp | ||
|
|
||
| build/download-packages.stamp: build/build-docker-image.stamp src/download_packages.sh | ||
| mkdir -p build/packages | ||
| docker run --user $(shell id -u):$(shell id -g) \ | ||
| --rm --volume .:/app/gdb gdb-static env TERM=xterm-256color \ | ||
| /app/gdb/src/download_packages.sh /app/gdb/build/packages | ||
| touch build/download-packages.stamp | ||
|
|
||
RoiKlevansky marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| download-packages: build/download-packages.stamp | ||
|
|
||
| build/patch-gdb.stamp: build/build-docker-image.stamp src/gdb_static.patch build/download-packages.stamp | ||
| docker run --user $(shell id -u):$(shell id -g) \ | ||
| --rm --volume .:/app/gdb gdb-static env TERM=xterm-256color \ | ||
| /app/gdb/src/patch_gdb.sh /app/gdb/build/packages/gdb /app/gdb/src/gdb_static.patch | ||
| touch build/patch-gdb.stamp | ||
|
|
||
| patch-gdb: build/patch-gdb.stamp | ||
|
|
||
| build: $(TARGETS) | ||
|
|
||
| $(TARGETS): build-%: download-packages patch-gdb build-docker-image | ||
| mkdir -p build | ||
| docker run --user $(shell id -u):$(shell id -g) \ | ||
| --rm --volume .:/app/gdb gdb-static env TERM=xterm-256color \ | ||
| /app/gdb/src/build.sh $* /app/gdb/build/ /app/gdb/src/gdb_static.patch | ||
|
|
||
| clean: | ||
RoiKlevansky marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| rm -rf build | ||
| # Kill and remove all containers of image gdb-static | ||
guyush1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| docker ps -a | grep -P "^[a-f0-9]+\s+gdb-static\s+" | awk '{print $$1}' | xargs docker rm -f 2>/dev/null || true | ||
| docker rmi -f gdb-static 2>/dev/null || true | ||
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
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.