Skip to content

Commit 5ecfdd5

Browse files
andrewbirdPerditionC
authored andcommitted
Travis: Build and test with both GCC and Watcom
Watcom compiler is downloaded and extracted if necessary. On Travis this will be always, but if you build locally multiple times using ./travis_build, it will use the previous watcom installation. [fixes #18]
1 parent 65e0101 commit 5ecfdd5

File tree

2 files changed

+39
-4
lines changed

2 files changed

+39
-4
lines changed

travis_build.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,30 @@
11
#!/bin/sh
22

3+
if [ -z "${TRAVIS_BUILD_DIR}" ] ; then
4+
TRAVIS_BUILD_DIR=$(pwd)
5+
fi
6+
echo TRAVIS_BUILD_DIR is \"${TRAVIS_BUILD_DIR}\"
7+
8+
# Output directory
9+
rm -rf _output
10+
mkdir _output
11+
12+
# GCC
13+
git clean -x -d -f -e _output -e _watcom -e ow-snapshot.tar.gz
314
make all COMPILER=gcc
15+
mv -i bin/KGC*.map bin/KGC*.sys _output/.
16+
17+
# Watcom
18+
if [ ! -d _watcom ] ; then
19+
[ -f ow-snapshot.tar.gz ] || wget https://github.com/open-watcom/open-watcom-v2/releases/download/Current-build/ow-snapshot.tar.gz
20+
21+
mkdir _watcom
22+
(cd _watcom && tar -xf ../ow-snapshot.tar.gz)
23+
fi
24+
25+
export PATH=$TRAVIS_BUILD_DIR/bin:$PATH:$TRAVIS_BUILD_DIR/_watcom/binl64
26+
export WATCOM=$TRAVIS_BUILD_DIR/_watcom
427

28+
git clean -x -d -f -e _output -e _watcom -e ow-snapshot.tar.gz
29+
make all COMPILER=owlinux
30+
mv -i bin/KWC*.map bin/KWC*.sys _output/.

travis_test.sh

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
#!/bin/sh
22

3-
if [ -f kernel/kernel.sys ] ; then
4-
echo Kernel has been built
5-
exit 0
3+
KVER=8632
4+
5+
if [ ! -f _output/KGC${KVER}.sys ] ; then
6+
echo GCC built kernel not present
7+
exit 1
8+
fi
9+
10+
if [ ! -f _output/KWC${KVER}.sys ] ; then
11+
echo Watcom built kernel not present
12+
exit 1
613
fi
714

8-
exit 1
15+
echo GCC and Watcom kernels have all been built
16+
ls -l _output/K*
17+
exit 0

0 commit comments

Comments
 (0)