-
Notifications
You must be signed in to change notification settings - Fork 11
/
.gitlab-ci.yml
88 lines (83 loc) · 4.2 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
image: robertcnelson/beagle-devscripts-debian-12-arm64:latest
# https://git.beagleboard.org/beagleboard/ci-docker-images
# To test the artifacts of this CI pipeline:
# $ sudo sh -c "echo 'deb [trusted=yes] https://beagleboard.beagleboard.io/gnupru stable main' > /etc/apt/sources.list.d/gnupru.list"
# $ sudo apt update
# $ sudo apt install gcc-pru gnuprumcu
before_script:
- apt-get update -qq && apt-get install -y -qq build-essential libmpfr-dev libgmp-dev libmpc-dev texinfo libncurses5-dev bison flex texinfo wget bison flex gettext debhelper tar findutils autotools-dev dh-autoreconf zlib1g-dev lsb-release git
pages:
tags:
- docker-aarch64-ci
stage: build
script:
- echo ----------------------- Download sources -----------------------
- ./download-and-prepare.sh
- echo ----------------------- Package Binutils -----------------------
- echo "binutils-pru ($(./extract-version.sh binutils)-0.$(LANG=C date +%Y%m%d)~bookworm) bookworm; urgency=low" > ./packaging/binutils-pru/debian/changelog
- echo "" >> ./packaging/binutils-pru/debian/changelog
- echo " * ci build of $CI_PROJECT_URL" >> ./packaging/binutils-pru/debian/changelog
- echo "" >> ./packaging/binutils-pru/debian/changelog
- echo " -- $GITLAB_USER_NAME <$GITLAB_USER_EMAIL> $(LANG=C date -R)" >> ./packaging/binutils-pru/debian/changelog
- echo "" >> ./packaging/binutils-pru/debian/changelog
- mkdir -p packaging-build/binutils-pru
- pushd packaging-build/binutils-pru
- tar --strip-components=1 -xaf ../../src/binutils-gdb.tar.gz
- cp -Rfp ../../packaging/binutils-pru/debian/ .
- debuild -i -us -uc -b
- popd
- dpkg -i ./packaging-build/binutils-pru_*.deb
- echo ----------------------- Package GCC -----------------------
- echo "gcc-pru ($(./extract-version.sh gcc)-0.$(LANG=C date +%Y%m%d)~bookworm) bookworm; urgency=low" > ./packaging/gcc-pru/debian/changelog
- echo "" >> ./packaging/gcc-pru/debian/changelog
- echo " * ci build of $CI_PROJECT_URL" >> ./packaging/gcc-pru/debian/changelog
- echo "" >> ./packaging/gcc-pru/debian/changelog
- echo " -- $GITLAB_USER_NAME <$GITLAB_USER_EMAIL> $(LANG=C date -R)" >> ./packaging/gcc-pru/debian/changelog
- echo "" >> ./packaging/gcc-pru/debian/changelog
- mkdir -p packaging-build/gcc-pru
- pushd packaging-build/gcc-pru
- tar --strip-components=1 -xaf ../../src/gcc.tar.gz
- tar -xaf ../../src/newlib-cygwin.tar.gz
- mv newlib-*/libgloss newlib-*/newlib .
- rm -fr newlib-*
- cp -Rfp ../../packaging/gcc-pru/debian/ .
- debuild -i -us -uc -b
- popd
- dpkg -i ./packaging-build/gcc-pru_*.deb
- echo ----------------------- Package Gnuprumcu -----------------------
- mkdir -p packaging-build/gnuprumcu
- pushd packaging-build/gnuprumcu
- tar --strip-components=1 -xaf ../../src/gnuprumcu.tar.gz
- echo "gnuprumcu ($(cd ../../; ./extract-version.sh gnuprumcu)-0.$(LANG=C date +%Y%m%d)~bookworm) bookworm; urgency=low" > ./debian/changelog
- echo "" >> ./debian/changelog
- echo " * ci build of $CI_PROJECT_URL" >> ./debian/changelog
- echo "" >> ./debian/changelog
- echo " -- $GITLAB_USER_NAME <$GITLAB_USER_EMAIL> $(LANG=C date -R)" >> ./debian/changelog
- echo "" >> ./debian/changelog
- sed -i -e 's@--prefix=/usr/lib@--prefix=/usr/lib/gnupru@g' ./debian/rules
- debuild -i -us -uc -b
- popd
- dpkg -i ./packaging-build/gnuprumcu_*.deb
- echo ----------------------- Publish -----------------------
- mkdir -p ./public/dists/stable/main/binary-arm64/
- mkdir -p ./public/pool/
- cp -v ./packaging-build/*.deb ./public/pool/ || true
- cp -v ./packaging-build/*.build ./public/ || true
- cp -v ./packaging-build/*.buildinfo ./public/ || true
- cd ./public ; dpkg-scanpackages ./pool/ | gzip > ./dists/stable/main/binary-arm64/Packages.gz || true ; cd ../
- apindex public
artifacts:
when: on_success
paths:
- public
test-compile-examples:
tags:
- docker-aarch64-ci
stage: test
dependencies:
- pages
script:
- dpkg -i ./public/pool/{binutils-pru,gcc-pru,gnuprumcu}_*.deb
- git clone --depth=1 https://github.com/dinuxbg/pru-gcc-examples
- cd pru-gcc-examples/
- make check-build