Commit 6f92826a authored by uweplonus's avatar uweplonus

Merge branch 'master' into 'master'

Refactord build process

See merge request osdevelopment-info/emu-bios!1
parents fbefd018 78e9402f
Pipeline #31914893 passed with stages
in 22 minutes and 51 seconds
**/bios286
**/bios386
**/bios86
*~
*.acn
*.acr
......@@ -25,3 +22,6 @@
*.ilg
public/
.sass-cache/
build/
src/LICENSE
src/bios*
image: $CI_REGISTRY/sw4j-net/noweb-nasm/master:latest
stages:
- extract
- build
- deploy
asm:
image: $CI_REGISTRY/sw4j-net/noweb/master:latest
stage: extract
script:
- make source
artifacts:
paths:
- src/*.asm
expire_in: 1 hour
tex:
image: $CI_REGISTRY/sw4j-net/noweb/master:latest
stage: extract
script:
- make tex
artifacts:
paths:
- tex/biosx86.*
expire_in: 1 hour
build:
image: $CI_REGISTRY/sw4j-net/nasm/master:latest
stage: build
script:
- make -t source
- make bin
dependencies:
- asm
artifacts:
paths:
- build/*
expire_in: 1 hour
pdf:
image: $CI_REGISTRY/sw4j-net/noweb/master:latest
stage: build
script:
- make
- make -t tex
- make pdf
artifacts:
paths:
- biosx86/*.asm
- biosx86/*.pdf
- build/*.pdf
expire_in: 1 hour
pages:
......@@ -20,9 +54,9 @@ pages:
script:
- gem install jekyll-theme-tactile
- jekyll build -s site -d public
- mkdir -p public/biosx86
- cp biosx86/*.asm public/biosx86/
- cp biosx86/*.pdf public/
- mkdir -p public/src
- cp src/*.asm public/src/
- cp build/*.pdf public/
artifacts:
paths:
- public
......
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get -y install curl
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
RUN apt-get -y install git git-lfs make nasm build-essential
RUN git lfs install
RUN apt-get -y install texlive-full noweb
pipeline {
agent {
node {
label 'master'
}
}
stages {
stage('Cleanup') {
steps {
deleteDir()
}
}
stage('Checkout') {
steps {
checkout scm
}
}
stage('Build asm and pdf') {
agent {
dockerfile {
reuseNode true
}
}
steps {
sh script: 'make'
sh script: 'make pdf'
}
}
stage('Archive Artifacts') {
steps {
archiveArtifacts 'asm/*.asm'
archiveArtifacts 'bin/*'
archiveArtifacts 'Meltdown-Spectre.pdf'
}
}
stage('Update gh-pages from master') {
when {
environment name: 'CHANGE_FORK', value: ''
expression { GIT_URL ==~ 'https://github.com/osdevelopment-info/.*' }
expression { GIT_BRANCH ==~ 'master' }
expression { currentBuild.result == null || currentBuild.result == 'SUCCESS' }
}
steps {
sshagent(['6452f2aa-2b69-4fa7-be5f-5f0ef6d3acba']) {
sh """
git clone --no-checkout \$(echo ${GIT_URL} | sed 's/https:\\/\\//git@/' | sed 's/\\//:/') checkout
git config --add user.email ci@sw4j.org
git config --add user.name "CI Jenkins"
git config push.default simple
cd checkout
git checkout gh-pages
mkdir -p asm/
cp ../*.pdf .
cp ../asm/*.asm asm/
git diff --quiet && git diff --staged --quiet || git commit -am 'Update program code and documentation'
git push
cd ..
rm -rf checkout
"""
}
}
}
}
}
This diff is collapsed.
all:
make -C biosx86 all
all: prepare source tex bin pdf
clean:
make -C biosx86 clean
prepare:
mkdir -p build
source:
$(MAKE) -C src source
bin:
$(MAKE) prepare
$(MAKE) -C src bin
cp src/bios86 build/
cp src/bios286 build/
cp src/bios386 build/
.PHONY: tex
tex:
$(MAKE) -C tex tex
pdf:
$(MAKE) prepare
cp *.tex tex/
$(MAKE) -C tex pdf
mv tex/biosx86.pdf build/
clean: mostlyclean
$(MAKE) -C src clean
$(MAKE) -C tex clean
mostlyclean:
$(MAKE) -C src mostlyclean
$(MAKE) -C tex mostlyclean
rm -f *~
rm -rf build/
......@@ -49,9 +49,9 @@
\setacronymstyle{long-short}
\loadglsentries{../acronym}
\loadglsentries{acronym}
\loadglsentries{../glossary}
\loadglsentries{glossary}
\begin{document}
@
......
This diff is collapsed.
#!/bin/sh
cd $(dirname $0)
docker run -it -d -e "TERM=xterm-256color" -v `pwd`:`pwd` \
-v $HOME/.bashrc:/root/.bashrc -w `pwd` \
--name emu-bios-noweb -h emu-bios-noweb \
registry.sw4j.net/sw4j-net/noweb/master:latest
docker run -it -d -e "TERM=xterm-256color" -v `pwd`:`pwd` \
-v $HOME/.bashrc:/root/.bashrc -w `pwd` \
--name emu-bios-nasm -h emu-bios-nasm \
registry.sw4j.net/sw4j-net/nasm/master:latest
docker run -it -d -e "TERM=xterm-256color" -v `pwd`:`pwd` \
-v $HOME/.bashrc:/root/.bashrc -w `pwd` \
--name emu-bios-jekyll -h emu-bios-jekyll \
registry.sw4j.net/sw4j-net/jekyll/master:latest
NASM = /usr/bin/nasm
NASM_OPTS = -f bin
all: source bin
source: LICENSE bios86.asm bios286.asm bios386.asm
bin: bios86 bios286 bios386
LICENSE: ../biosx86.nw
notangle -Rlicense ../biosx86.nw > LICENSE
bios86.asm: ../biosx86.nw
notangle -Rbios86.asm ../biosx86.nw > bios86.asm
bios86: bios86.asm
$(NASM) $(NASM_OPTS) bios86.asm -l bios86.lst -o bios86
bios286.asm: ../biosx86.nw
notangle -Rbios286.asm ../biosx86.nw > bios286.asm
bios286: bios286.asm
$(NASM) $(NASM_OPTS) bios286.asm -l bios286.lst -o bios286
bios386.asm: ../biosx86.nw
notangle -Rbios386.asm ../biosx86.nw > bios386.asm
bios386: bios386.asm
$(NASM) $(NASM_OPTS) bios386.asm -l bios386.lst -o bios386
mostlyclean:
rm -f *.lst
rm -f bios86
rm -f bios286
rm -f bios386
rm -f *~
clean: mostlyclean
rm -f *.asm
rm -f LICENSE
NASM = /usr/bin/nasm
NASM_OPTS = -f bin
all: license bios86 bios286 bios386 pdf
all: tex pdf
license: biosx86.nw
notangle -Rlicense biosx86.nw > LICENSE
tex: biosx86.defs biosx86.tex
bios86.asm: biosx86.nw
notangle -Rbios86.asm biosx86.nw > bios86.asm
biosx86.defs: ../biosx86.nw
nodefs ../biosx86.nw | sort -u > biosx86.defs
bios86: bios86.asm
$(NASM) $(NASM_OPTS) bios86.asm -l bios86.lst -o bios86
biosx86.tex: ../biosx86.nw
noweave -indexfrom biosx86.defs -delay ../biosx86.nw > biosx86.tex
bios286.asm: biosx86.nw
notangle -Rbios286.asm biosx86.nw > bios286.asm
bios286: bios286.asm
$(NASM) $(NASM_OPTS) bios286.asm -l bios286.lst -o bios286
bios386.asm: biosx86.nw
notangle -Rbios386.asm biosx86.nw > bios386.asm
bios386: bios386.asm
$(NASM) $(NASM_OPTS) bios386.asm -l bios386.lst -o bios386
pdf: biosx86.nw
nodefs biosx86.nw | sort -u > biosx86.defs
noweave -indexfrom biosx86.defs -delay biosx86.nw > biosx86.tex
pdf:
xelatex -8bit biosx86
splitindex biosx86.idx
makeglossaries biosx86
xelatex -8bit biosx86
xelatex -8bit biosx86
clean:
clean: mostlyclean
mostlyclean:
rm -f *~
rm -f *.acn
rm -f *.acr
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment