Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI-build: a little simplify CI-build development #163

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,8 @@ bin/setver.sys
*~
*.diff
*.rej

# CI build
_downloads/**
_output/**
_watcom/**
25 changes: 13 additions & 12 deletions ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ echo BUILD_DIR is \"${BUILD_DIR}\"
rm -rf _output
mkdir _output

OWTAR=ow-snapshot.tar.xz

# GCC
mkdir _output/gcc
git clean -x -d -f -e test -e _output -e _downloads -e _watcom -e $OWTAR
git clean -x -d -f -e test -e _output -e _downloads -e _watcom
make -C country clean
make all COMPILER=gcc
mv -n bin/KGC*.map bin/KGC*.sys _output/gcc/.
Expand All @@ -31,26 +29,29 @@ mv -n share/src/share.com _output/gcc/.
mv -n share/src/share.map _output/gcc/.

# Watcom
OWTAR=ow-snapshot.tar.xz
if [ ! -d _watcom ] ; then
[ -f $OWTAR ] || wget --no-verbose https://github.com/open-watcom/open-watcom-v2/releases/download/Last-CI-build/$OWTAR

mkdir -p _downloads
mkdir _watcom
(cd _watcom && tar -xf ../$OWTAR)
if [ ! -f _downloads/$OWTAR ] ; then
(cd _downloads && wget --no-verbose https://github.com/open-watcom/open-watcom-v2/releases/download/Last-CI-build/$OWTAR)
fi
(cd _watcom && tar -xf ../_downloads/$OWTAR)
fi

export PATH=$BUILD_DIR/bin:$PATH:$BUILD_DIR/_watcom/binl64
export WATCOM=$BUILD_DIR/_watcom
export PATH=$BUILD_DIR/bin:$PATH:$WATCOM/binl64

mkdir _output/wc
git clean -x -d -f -e test -e _output -e _downloads -e _watcom -e $OWTAR
git clean -x -d -f -e test -e _output -e _downloads -e _watcom
make -C country clean
make all COMPILER=owlinux
mv -n bin/KWC*.map bin/KWC*.sys _output/wc/.
mv -n bin/country.sys _output/wc/.

## DOS (GCC)
#mkdir _output/gcc_dos
#git clean -x -d -f -e test -e _output -e _downloads -e _watcom -e $OWTAR
#git clean -x -d -f -e test -e _output -e _downloads -e _watcom
#{
# echo set COMPILER=GCC
# echo set MAKE=make
Expand All @@ -65,7 +66,7 @@ mv -n bin/country.sys _output/wc/.

# DOS (Watcom)
mkdir _output/wc_dos
git clean -x -d -f -e test -e _output -e _downloads -e _watcom -e $OWTAR
git clean -x -d -f -e test -e _output -e _downloads -e _watcom
{
echo set COMPILER=WATCOM
echo set WATCOM='C:\\devel\\watcomc'
Expand All @@ -74,7 +75,7 @@ git clean -x -d -f -e test -e _output -e _downloads -e _watcom -e $OWTAR
echo set XFAT=32
echo set XNASM='C:\\devel\\nasm\\nasm'
echo set OLDPATH=%PATH%
echo set PATH='C:\\devel\\watcomc\\binw;C:\\bin;%OLDPATH%'
echo set PATH='%WATCOM%\\binw;C:\\bin;%OLDPATH%'
} | unix2dos > config.bat

dosemu -td -q -K . -E "build.bat"
Expand All @@ -85,7 +86,7 @@ mv -n bin/country.sys _output/wc_dos/.
# DOS (Turbo C 2.01)
if [ -d ${HOME}/.dosemu/drive_c/tc201 ] ; then
mkdir _output/tc_dos
git clean -x -d -f -e test -e _output -e _downloads -e _watcom -e $OWTAR
git clean -x -d -f -e test -e _output -e _downloads -e _watcom
{
echo set COMPILER=TC2
echo set TC2_BASE='C:\\tc201'
Expand Down