This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +72
-24
lines changed
Expand file tree Collapse file tree 5 files changed +72
-24
lines changed Original file line number Diff line number Diff line change 1+ name : Extensions
2+
3+ on : [push]
4+
5+ jobs :
6+ build :
7+
8+ runs-on : ubuntu-latest
9+
10+ strategy :
11+ matrix :
12+ extension : [ 'ifupdown', 'cloud-init-deps', 'cloud-init' ]
13+ tc_version : [ '10.0-x86_64' ]
14+
15+ container : tatsushid/tinycore:${{ matrix.tc_version }}
16+
17+ steps :
18+ - name : Checkout the repo
19+ uses : actions/checkout@v1
20+
21+ - name : Build the extension (${{ matrix.extension }})
22+ id : tcz
23+ run : |
24+ tce-load -wicl git compiletc coreutils
25+ cd ${GITHUB_WORKSPACE}/extensions/${{ matrix.extension }}
26+ make TC_VERSION=${{ matrix.tc_version }}
27+
28+ - uses : actions/upload-artifact@v1
29+ with :
30+ name : ${{ matrix.extension }}-tc${{ matrix.tc_version }}
31+ path : ${{ runner.temp }}/_github_home/artifacts/${{ matrix.extension }}-tc${{ matrix.tc_version }}
Original file line number Diff line number Diff line change @@ -4,17 +4,30 @@ CFLAGS = -mtune=generic -Os -pipe
44CXXFLAGS = -mtune=generic -Os -pipe -fno-exceptions -fno-rtti
55PKG_CONFIG_PATH = /usr/local/lib/pkgconfig:/usr/lib/pkgconfig
66
7- .PHONY : deps tcz clean
7+ TC_VERSION ?= 9.0-x86_64
8+ artifact := $(HOME ) /artifacts/$(package ) -tc$(TC_VERSION )
9+
10+ .PHONY : deps tcz perms clean
811
912deps :
10- su - tc -c " tce-load -il $( compile_deps) "
13+ tce-load -wicl $(compile_deps )
1114
12- tcz :
13- cd /tmp && \
15+ perms :
16+ cd $( artifact ) && \
1417 find $(package ) -type d | xargs -r chmod -v 755 && \
1518 find $(package ) | xargs file | grep ELF | cut -f 1 -d : | xargs -r chmod -v 755 && \
1619 find $(package ) | xargs file | grep ELF | cut -f 1 -d : | xargs -r strip --strip-unneeded && \
17- mksquashfs $(package ) $(package ) .tcz -b 4096
20+ sudo chown -R 0:0 $(package )
21+
22+ tcz :
23+ $(MAKE ) perms
24+ cd $(artifact ) && \
25+ sudo mksquashfs $(package ) $(package ) .tcz -b 4096 && \
26+ md5sum $(package ) .tcz > $(package ) .tcz.md5.txt && \
27+ sha256sum $(package ) .tcz > $(package ) .tcz.sha256.txt && \
28+ find $(package ) -not -type d -printf ' %P\n' | sort > $(package ) .tcz.list && \
29+ echo " Version: $( VERSION) " > $(package ) .tcz.info
30+ $(MAKE ) clean
1831
1932clean :
20- rm -rf $(package ) $(package_name ) /tmp /$(package )
33+ sudo rm -rf $(package ) $(package_name ) $( artifact ) /$(package )
Original file line number Diff line number Diff line change @@ -5,18 +5,18 @@ package := cloud-init-deps
55package_name := $(package ) -$(VERSION ) .tar.gz
66compile_deps := python3.6 squashfs-tools curl libffi
77
8- .PHONY : all deps setup build tcz clean
8+ .PHONY : all deps setup build tcz
99
10- all : deps setup build tcz clean
10+ all : deps setup build tcz
1111
1212setup :
13- rm -rf /tmp/ $( package ) /tmp/ $( package ) .tcz
13+ rm -rf $( artifact )
1414 curl -L -o $(package_name ) https://github.com/canonical/cloud-init/archive/$(VERSION ) .tar.gz
1515 tar -xzf $(package_name )
1616
1717build :
1818 mv cloud-init-$(VERSION ) $(package )
1919 cd $(package ) && \
20- pip3 install -r ./requirements.txt --root /tmp /$(package )
20+ pip3 install -r ./requirements.txt --root $( artifact ) /$(package )
2121
2222include ../build.make
Original file line number Diff line number Diff line change 33VERSION ?= 19.3
44package := cloud-init
55package_name := $(package ) -$(VERSION ) .tar.gz
6- compile_deps := python3.6 squashfs-tools curl libffi cloud-init-deps
6+ compile_deps := python3.6 squashfs-tools curl libffi
77
8- .PHONY : all deps setup build tcz clean
8+ .PHONY : all deps setup build tcz
99
10- all : deps setup build tcz clean
10+ all : deps setup build tcz
1111
1212setup :
13- rm -rf /tmp/ $( package ) /tmp/ $( package ) .tcz
13+ rm -rf $( artifact )
1414 curl -L -o $(package_name ) https://github.com/canonical/cloud-init/archive/$(VERSION ) .tar.gz
1515 tar -xzf $(package_name )
1616
1717build :
1818 cd $(package ) -$(VERSION ) && \
19- pip3 install --root /tmp/$(package ) .
19+ sudo pip3 install -r ./requirements.txt && \
20+ pip3 install --root $(artifact ) /$(package ) .
21+ cp -v $(package ) .tcz.dep $(artifact )
2022
2123include ../build.make
Original file line number Diff line number Diff line change @@ -5,24 +5,26 @@ package := ifupdown
55package_name := $(package ) _$(VERSION ) .tar.xz
66compile_deps := perl5 squashfs-tools curl
77
8- .PHONY : all deps setup build tcz clean
8+ .PHONY : all deps setup build tcz
99
10- all : deps setup build tcz clean
10+ all : deps setup build tcz
1111
1212setup :
13- ln -sf /usr/local/bin/perl /usr/bin/perl
14- rm -rf /tmp/ $( package ) /tmp/ $( package ) .tcz
15- cp -a dpkg-architecture /usr/local/bin
13+ sudo rm -rf $( artifact )
14+ sudo ln -sf /usr/local/bin/perl /usr/bin/perl
15+ sudo cp -a dpkg-architecture /usr/local/bin
1616 curl -L -o $(package_name ) https://deb.debian.org/debian/pool/main/i/ifupdown/$(package_name )
1717 tar -xJf $(package_name )
1818
1919build :
20+ mkdir -p $(artifact )
2021 cd ifupdown && \
2122 patch -p1 < ../ifupdown.patch && \
2223 $(MAKE ) all && \
23- $(MAKE ) install DESTDIR=/tmp/$(package )
24- mkdir -p /tmp/$(package ) /sbin
25- ln -sf /usr/local/sbin/ip /tmp/$(package ) /sbin/ip
26- rm -f /usr/local/bin/dpkg-architecture /usr/bin/perl
24+ $(MAKE ) install DESTDIR=$(artifact ) /$(package )
25+ cp -v $(package ) .tcz.dep $(artifact )
26+ mkdir -p $(artifact ) /$(package ) /sbin
27+ ln -sf /usr/local/sbin/ip $(artifact ) /$(package ) /sbin/ip
28+ sudo rm -f /usr/local/bin/dpkg-architecture /usr/bin/perl
2729
2830include ../build.make
You can’t perform that action at this time.
0 commit comments