Compare commits
7 Commits
python-sup
...
parallel-c
Author | SHA1 | Date | |
---|---|---|---|
cc1c9763b2 | |||
00a8738392 | |||
0a60aedf76 | |||
ff0d3ad28f | |||
c86f506e90 | |||
46e8eb22a8 | |||
fa04d3a7a2 |
24
.github/workflows/pr-pipeline.yaml
vendored
Normal file
24
.github/workflows/pr-pipeline.yaml
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
name: gdb-static-pr-pipeline
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
architecture: ["x86_64", "arm", "aarch64", "powerpc", "mips", "mipsel"]
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: sudo apt-get install -y wget
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: make build-${{ matrix.architecture }} -j$((`nproc`+1))
|
@ -1,19 +1,19 @@
|
|||||||
name: gdb-static-pipeline
|
name: gdb-static-release-pipeline
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- '*'
|
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
|
|
||||||
|
# Use a non-parallel single job pipeline because artifacts weigh too much. Instead,
|
||||||
|
# simply build the files in the same job they are released.
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build_and_publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: sudo apt-get install -y wget
|
run: sudo apt-get install -y wget
|
||||||
@ -24,14 +24,7 @@ jobs:
|
|||||||
- name: Pack
|
- name: Pack
|
||||||
run: make pack
|
run: make pack
|
||||||
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: gdb-static
|
|
||||||
path: build/artifacts/gdb-static*.tar.gz
|
|
||||||
|
|
||||||
- name: Publish release
|
- name: Publish release
|
||||||
if: github.event_name == 'push'
|
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
files: build/artifacts/gdb-static*.tar.gz
|
files: build/artifacts/gdb-static*.tar.gz
|
8
.gitmodules
vendored
Normal file
8
.gitmodules
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
[submodule "cpython-static"]
|
||||||
|
path = src/submodule_packages/cpython-static
|
||||||
|
url = git@github.com:guyush1/cpython-static.git
|
||||||
|
branch = python3.12-static
|
||||||
|
[submodule "binutils-gdb-static"]
|
||||||
|
path = src/submodule_packages/binutils-gdb
|
||||||
|
url = git@github.com:guyush1/binutils-gdb.git
|
||||||
|
branch = gdb-static
|
23
Makefile
23
Makefile
@ -1,6 +1,8 @@
|
|||||||
ARCHS := x86_64 arm aarch64 powerpc mips mipsel
|
ARCHS := x86_64 arm aarch64 powerpc mips mipsel
|
||||||
TARGETS := $(addprefix build-, $(ARCHS))
|
TARGETS := $(addprefix build-, $(ARCHS))
|
||||||
PACK_TARGETS := $(addprefix pack-, $(ARCHS))
|
PACK_TARGETS := $(addprefix pack-, $(ARCHS))
|
||||||
|
SUBMODULE_PACKAGES := $(wildcard src/submodule_packages/*)
|
||||||
|
BUILD_PACKAGES_DIR := "build/packages"
|
||||||
|
|
||||||
.PHONY: clean help download_packages build build-docker-image $(TARGETS) $(PACK_TARGETS)
|
.PHONY: clean help download_packages build build-docker-image $(TARGETS) $(PACK_TARGETS)
|
||||||
|
|
||||||
@ -23,22 +25,28 @@ build/build-docker-image.stamp: Dockerfile
|
|||||||
|
|
||||||
build-docker-image: 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
|
build/download-packages.stamp: build/build-docker-image.stamp src/compilation/download_packages.sh
|
||||||
mkdir -p build/packages
|
mkdir -p $(BUILD_PACKAGES_DIR)
|
||||||
docker run --user $(shell id -u):$(shell id -g) \
|
docker run --user $(shell id -u):$(shell id -g) \
|
||||||
--rm --volume .:/app/gdb gdb-static env TERM=xterm-256color \
|
--rm --volume .:/app/gdb gdb-static env TERM=xterm-256color \
|
||||||
/app/gdb/src/download_packages.sh /app/gdb/build/packages
|
/app/gdb/src/compilation/download_packages.sh /app/gdb/$(BUILD_PACKAGES_DIR)/
|
||||||
touch build/download-packages.stamp
|
touch build/download-packages.stamp
|
||||||
|
|
||||||
|
build/symlink-git-packages.stamp: $(SUBMODULE_PACKAGES)
|
||||||
|
mkdir -p $(BUILD_PACKAGES_DIR)
|
||||||
|
ln -sf $(addprefix /app/gdb/, $(SUBMODULE_PACKAGES)) $(BUILD_PACKAGES_DIR)/
|
||||||
|
|
||||||
|
symlink-git-packages: build/symlink-git-packages.stamp
|
||||||
|
|
||||||
download-packages: build/download-packages.stamp
|
download-packages: build/download-packages.stamp
|
||||||
|
|
||||||
build: $(TARGETS)
|
build: $(TARGETS)
|
||||||
|
|
||||||
$(TARGETS): build-%: download-packages build-docker-image
|
$(TARGETS): build-%: symlink-git-packages download-packages build-docker-image
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
docker run --user $(shell id -u):$(shell id -g) \
|
docker run --user $(shell id -u):$(shell id -g) \
|
||||||
--rm --volume .:/app/gdb gdb-static env TERM=xterm-256color \
|
--rm --volume .:/app/gdb gdb-static env TERM=xterm-256color \
|
||||||
/app/gdb/src/build.sh $* /app/gdb/build/ /app/gdb/src
|
/app/gdb/src/compilation/build.sh $* /app/gdb/build/ /app/gdb/src
|
||||||
|
|
||||||
pack: $(PACK_TARGETS)
|
pack: $(PACK_TARGETS)
|
||||||
|
|
||||||
@ -47,7 +55,10 @@ $(PACK_TARGETS): pack-%: build-%
|
|||||||
tar -czf "build/artifacts/gdb-static-$*.tar.gz" -C "build/artifacts/$*" .; \
|
tar -czf "build/artifacts/gdb-static-$*.tar.gz" -C "build/artifacts/$*" .; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
clean:
|
clean-git-packages:
|
||||||
|
git submodule foreach '[[ ! "$$sm_path" == src/submodule_packages/* ]] || git clean -xffd'
|
||||||
|
|
||||||
|
clean: clean-git-packages
|
||||||
rm -rf build
|
rm -rf build
|
||||||
# Kill and remove all containers of image gdb-static
|
# Kill and remove all containers of image gdb-static
|
||||||
docker ps -a | grep -P "^[a-f0-9]+\s+gdb-static\s+" | awk '{print $$1}' | xargs docker rm -f 2>/dev/null || true
|
docker ps -a | grep -P "^[a-f0-9]+\s+gdb-static\s+" | awk '{print $$1}' | xargs docker rm -f 2>/dev/null || true
|
||||||
|
@ -4,6 +4,9 @@
|
|||||||
script_dir=$(dirname "$0")
|
script_dir=$(dirname "$0")
|
||||||
source "$script_dir/utils.sh"
|
source "$script_dir/utils.sh"
|
||||||
|
|
||||||
|
# Don't want random unknown things to fail in the build procecss!
|
||||||
|
set -e
|
||||||
|
|
||||||
function set_compliation_variables() {
|
function set_compliation_variables() {
|
||||||
# Set compilation variables such as which compiler to use.
|
# Set compilation variables such as which compiler to use.
|
||||||
#
|
#
|
||||||
@ -40,7 +43,7 @@ function set_compliation_variables() {
|
|||||||
CROSS=mipsel-linux-gnu-
|
CROSS=mipsel-linux-gnu-
|
||||||
export HOST=mipsel-linux-gnu
|
export HOST=mipsel-linux-gnu
|
||||||
elif [[ "$target_arch" == "x86_64" ]]; then
|
elif [[ "$target_arch" == "x86_64" ]]; then
|
||||||
CROSS=""
|
CROSS=x86_64-linux-gnu-
|
||||||
export HOST=x86_64-linux-gnu
|
export HOST=x86_64-linux-gnu
|
||||||
fi
|
fi
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Include utils library
|
# Include utils library
|
||||||
script_dir=$(dirname "$0")
|
script_dir=$(dirname "$0")
|
||||||
. "$script_dir/utils.sh"
|
source "$script_dir/utils.sh"
|
||||||
|
|
||||||
# List of package URLs to download
|
# List of package URLs to download
|
||||||
SOURCE_URLS=(
|
SOURCE_URLS=(
|
||||||
@ -201,14 +201,6 @@ function download_gdb_packages() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ ! -d gdb-static ]]; then
|
|
||||||
git clone https://github.com/guyush1/binutils-gdb.git --single-branch --branch gdb-static
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -d python3.12-static ]]; then
|
|
||||||
git clone https://github.com/guyush1/cpython-static.git --single-branch --branch python3.12-static
|
|
||||||
fi
|
|
||||||
|
|
||||||
fancy_title "Finished downloading GDB packages"
|
fancy_title "Finished downloading GDB packages"
|
||||||
popd
|
popd
|
||||||
}
|
}
|
1
src/submodule_packages/binutils-gdb
Submodule
1
src/submodule_packages/binutils-gdb
Submodule
Submodule src/submodule_packages/binutils-gdb added at f7d0fb2e22
1
src/submodule_packages/cpython-static
Submodule
1
src/submodule_packages/cpython-static
Submodule
Submodule src/submodule_packages/cpython-static added at d734d02f4c
Reference in New Issue
Block a user