mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Merge pull request #169 from AntonioND/an/travis-test
Add Travis CI configuration file Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
13
.travis-deps.sh
Executable file
13
.travis-deps.sh
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ $TRAVIS_OS_NAME = "osx" ]; then
|
||||||
|
brew update
|
||||||
|
brew install libpng pkg-config
|
||||||
|
else # linux
|
||||||
|
sudo apt-get -qq update
|
||||||
|
sudo apt-get install -y -q bison flex libpng-dev pkg-config
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Dependencies:"
|
||||||
|
yacc --version
|
||||||
|
flex --version
|
||||||
16
.travis.yml
Normal file
16
.travis.yml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
language: c
|
||||||
|
sudo: required
|
||||||
|
install:
|
||||||
|
- ./.travis-deps.sh
|
||||||
|
os:
|
||||||
|
- linux
|
||||||
|
- osx
|
||||||
|
compiler:
|
||||||
|
- clang
|
||||||
|
- gcc
|
||||||
|
script:
|
||||||
|
- make
|
||||||
|
- sudo make install
|
||||||
|
after_success:
|
||||||
|
- pushd test/asm/ && ./test.sh && popd
|
||||||
|
- pushd test/link/ && ./test.sh && popd
|
||||||
4
test/asm/test.sh
Normal file → Executable file
4
test/asm/test.sh
Normal file → Executable file
@@ -1,8 +1,10 @@
|
|||||||
fname=$(mktemp)
|
fname=$(mktemp)
|
||||||
|
rc=0
|
||||||
|
|
||||||
for i in *.asm; do
|
for i in *.asm; do
|
||||||
../../rgbasm $i >$fname 2>&1
|
../../rgbasm $i >$fname 2>&1
|
||||||
diff -u $fname ${i%.asm}.out
|
diff -u $fname ${i%.asm}.out
|
||||||
|
rc=$(($? || $rc))
|
||||||
done
|
done
|
||||||
|
|
||||||
exit 0
|
exit $rc
|
||||||
|
|||||||
0
test/asm/update-refs.sh
Normal file → Executable file
0
test/asm/update-refs.sh
Normal file → Executable file
14
test/link/test.sh
Normal file → Executable file
14
test/link/test.sh
Normal file → Executable file
@@ -2,6 +2,7 @@ otemp=$(mktemp)
|
|||||||
gbtemp=$(mktemp)
|
gbtemp=$(mktemp)
|
||||||
gbtemp2=$(mktemp)
|
gbtemp2=$(mktemp)
|
||||||
outtemp=$(mktemp)
|
outtemp=$(mktemp)
|
||||||
|
rc=0
|
||||||
|
|
||||||
RGBASM=../../rgbasm
|
RGBASM=../../rgbasm
|
||||||
RGBLINK=../../rgblink
|
RGBLINK=../../rgblink
|
||||||
@@ -9,37 +10,48 @@ RGBLINK=../../rgblink
|
|||||||
$RGBASM -o $otemp bank-numbers.asm
|
$RGBASM -o $otemp bank-numbers.asm
|
||||||
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
|
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
|
||||||
diff bank-numbers.out $outtemp
|
diff bank-numbers.out $outtemp
|
||||||
|
rc=$(($? || $rc))
|
||||||
head -c 20 $gbtemp > $otemp 2>&1
|
head -c 20 $gbtemp > $otemp 2>&1
|
||||||
diff bank-numbers.out.bin $otemp
|
diff bank-numbers.out.bin $otemp
|
||||||
|
rc=$(($? || $rc))
|
||||||
|
|
||||||
$RGBASM -o $otemp wramx-dmg-mode.asm
|
$RGBASM -o $otemp wramx-dmg-mode.asm
|
||||||
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
|
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
|
||||||
diff wramx-dmg-mode-no-d.out $outtemp
|
diff wramx-dmg-mode-no-d.out $outtemp
|
||||||
|
rc=$(($? || $rc))
|
||||||
$RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1
|
$RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1
|
||||||
diff wramx-dmg-mode-d.out $outtemp
|
diff wramx-dmg-mode-d.out $outtemp
|
||||||
|
rc=$(($? || $rc))
|
||||||
|
|
||||||
$RGBASM -o $otemp vram-fixed-dmg-mode.asm
|
$RGBASM -o $otemp vram-fixed-dmg-mode.asm
|
||||||
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
|
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
|
||||||
diff vram-fixed-dmg-mode-no-d.out $outtemp
|
diff vram-fixed-dmg-mode-no-d.out $outtemp
|
||||||
|
rc=$(($? || $rc))
|
||||||
$RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1
|
$RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1
|
||||||
diff vram-fixed-dmg-mode-d.out $outtemp
|
diff vram-fixed-dmg-mode-d.out $outtemp
|
||||||
|
rc=$(($? || $rc))
|
||||||
|
|
||||||
$RGBASM -o $otemp vram-floating-dmg-mode.asm
|
$RGBASM -o $otemp vram-floating-dmg-mode.asm
|
||||||
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
|
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
|
||||||
diff vram-floating-dmg-mode-no-d.out $outtemp
|
diff vram-floating-dmg-mode-no-d.out $outtemp
|
||||||
|
rc=$(($? || $rc))
|
||||||
$RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1
|
$RGBLINK -d -o $gbtemp $otemp > $outtemp 2>&1
|
||||||
diff vram-floating-dmg-mode-d.out $outtemp
|
diff vram-floating-dmg-mode-d.out $outtemp
|
||||||
|
rc=$(($? || $rc))
|
||||||
|
|
||||||
$RGBASM -o $otemp romx-tiny.asm
|
$RGBASM -o $otemp romx-tiny.asm
|
||||||
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
|
$RGBLINK -o $gbtemp $otemp > $outtemp 2>&1
|
||||||
diff romx-tiny-no-t.out $outtemp
|
diff romx-tiny-no-t.out $outtemp
|
||||||
|
rc=$(($? || $rc))
|
||||||
$RGBLINK -t -o $gbtemp $otemp > $outtemp 2>&1
|
$RGBLINK -t -o $gbtemp $otemp > $outtemp 2>&1
|
||||||
diff romx-tiny-t.out $outtemp
|
diff romx-tiny-t.out $outtemp
|
||||||
|
rc=$(($? || $rc))
|
||||||
|
|
||||||
$RGBASM -o $otemp high-low-a.asm
|
$RGBASM -o $otemp high-low-a.asm
|
||||||
$RGBLINK -o $gbtemp $otemp
|
$RGBLINK -o $gbtemp $otemp
|
||||||
$RGBASM -o $otemp high-low-b.asm
|
$RGBASM -o $otemp high-low-b.asm
|
||||||
$RGBLINK -o $gbtemp2 $otemp
|
$RGBLINK -o $gbtemp2 $otemp
|
||||||
diff $gbtemp $gbtemp2
|
diff $gbtemp $gbtemp2
|
||||||
|
rc=$(($? || $rc))
|
||||||
|
|
||||||
exit 0
|
exit $rc
|
||||||
|
|||||||
0
test/link/update-refs.sh
Normal file → Executable file
0
test/link/update-refs.sh
Normal file → Executable file
Reference in New Issue
Block a user