.build.yml (1701B)
- 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 git@github.com:oasislinux/root-x86_64 $SETS