Skip to content

Commit a9a044f

Browse files
authored
Merge pull request #9 from RoiKlevansky/ci-cd-pipeline
CI/CD pipeline
2 parents fdc2d2e + fe4ad58 commit a9a044f

File tree

3 files changed

+48
-3
lines changed

3 files changed

+48
-3
lines changed

.github/workflows/pipeline.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: gdb-static-pipeline
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '*'
7+
push:
8+
tags:
9+
- 'v*'
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Install dependencies
19+
run: sudo apt-get install -y wget
20+
21+
- name: Build
22+
run: make build -j$((`nproc`+1))
23+
24+
- name: Pack
25+
run: make pack
26+
27+
- name: Upload artifact
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: gdb-static
31+
path: build/artifacts/gdb-static*.tar.gz
32+
33+
- name: Publish release
34+
if: github.event_name == 'push'
35+
uses: softprops/action-gh-release@v2
36+
with:
37+
files: build/artifacts/gdb-static*.tar.gz

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
ARCHS := x86_64 arm aarch64 powerpc
22
TARGETS := $(addprefix build-, $(ARCHS))
3+
PACK_TARGETS := $(addprefix pack-, $(ARCHS))
34

4-
.PHONY: clean help download_packages build patch-gdb build-docker-image $(TARGETS)
5+
.PHONY: clean help download_packages build patch-gdb build-docker-image $(TARGETS) $(PACK_TARGETS)
56

67
help:
78
@echo "Usage:"
@@ -47,6 +48,13 @@ $(TARGETS): build-%: download-packages patch-gdb build-docker-image
4748
--rm --volume .:/app/gdb gdb-static env TERM=xterm-256color \
4849
/app/gdb/src/build.sh $* /app/gdb/build/ /app/gdb/src/gdb_static.patch
4950

51+
pack: $(PACK_TARGETS)
52+
53+
$(PACK_TARGETS): pack-%: build-%
54+
if [ ! -f "build/artifacts/gdb-static-$*.tar.gz" ]; then \
55+
tar -czf "build/artifacts/gdb-static-$*.tar.gz" -C "build/artifacts/$*" .; \
56+
fi
57+
5058
clean:
5159
rm -rf build
5260
# Kill and remove all containers of image gdb-static

src/download_packages.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ script_dir=$(dirname "$0")
77
# List of package URLs to download
88
PACKAGE_URLS=(
99
"https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.17.tar.gz"
10-
"https://gmplib.org/download/gmp/gmp-6.3.0.tar.xz"
11-
"https://www.mpfr.org/mpfr-current/mpfr-4.2.1.tar.xz"
10+
"https://ftp.gnu.org/pub/gnu/gmp/gmp-6.3.0.tar.xz"
11+
"https://ftp.gnu.org/pub/gnu/mpfr/mpfr-4.2.1.tar.xz"
1212
"https://ftp.gnu.org/gnu/gdb/gdb-15.1.tar.xz"
1313
)
1414

0 commit comments

Comments
 (0)