-
Notifications
You must be signed in to change notification settings - Fork 87
/
.build.yml
60 lines (60 loc) · 1.66 KB
/
.build.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
image: alpine/edge
packages:
- bison
- curl
- libarchive-tools
- lua5.1
- nasm
- ninja
- tzdata-utils
- wayland-dev
sources:
- https://github.com/michaelforney/oasis
secrets:
- 0d338ffe-699f-4e82-85a0-3a4407172bed
environment:
GIT_SSH_COMMAND: ssh -o StrictHostKeyChecking=no
SETS: core desktop devel extra media net
tasks:
- setup: |
git config --global user.name oasis
git config --global user.email oasis
git clone --mirror --no-single-branch --depth 1 https://github.com/oasislinux/root-x86_64
curl -LO http://musl.cc/x86_64-linux-musl-cross.tgz
tar xzf x86_64-linux-musl-cross.tgz
- build: |
PATH=$HOME/x86_64-linux-musl-cross/bin:$HOME/bin:$PATH
cd oasis
cat >config.lua <<EOF
return {
builddir='out',
fs=dofile 'fs.lua',
target={platform='x86_64-linux-musl', cflags='-Os -fPIE -pipe', ldflags='-s -static-pie', mc='6m', pie=true},
host={cflags='-pipe', ldflags=''},
repo={path='$HOME/root-x86_64.git', flags='--bare', tag='tree', branch=os.getenv('SET')},
}
EOF
# build everything
echo 'return {exclude={}}' >fs.lua
SET=all lua setup.lua
ninja out/pkg/mc/bin/6m out/pkg/mc/bin/muse
mkdir $HOME/bin
cp out/pkg/mc/bin/6m out/pkg/mc/bin/muse $HOME/bin
ninja
# build individual sets
cat >fs.lua <<EOF
local sets = dofile 'sets.lua'
local set = os.getenv('SET')
local spec = {sets[set]}
if set ~= 'devel' then
spec.exclude = {'^include/', '^lib/.*%.a$'}
end
return {spec}
EOF
export SET
for SET in $SETS ; do
lua setup.lua
ninja commit
done
- deploy: |
git -C root-x86_64.git push [email protected]:oasislinux/root-x86_64 $SETS