CircleCI now compiles project properly
This commit is contained in:
commit
683a5e9719
35
.travis.yml
35
.travis.yml
|
@ -1,35 +0,0 @@
|
|||
language: go
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/opus
|
||||
- $HOME/bin
|
||||
- $HOME/gopath/bin
|
||||
- $HOME/gopath/pkg
|
||||
- $HOME/gopath/src/github.com/nitrous-io
|
||||
- $HOME/gopath/src/github.com/MichaelOultram/mumbledj/.vendor
|
||||
|
||||
before_script:
|
||||
<<<<<<< HEAD
|
||||
- export PATH=$PATH:~/bin/
|
||||
- export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$HOME/opus/lib/pkgconfig
|
||||
- bash install-dependencies.sh
|
||||
|
||||
install:
|
||||
- ls -R $HOME/opus
|
||||
=======
|
||||
- export PATH=$PATH:$HOME/bin/
|
||||
- export LD_RUN_PATH=$LD_RUN_PATH:$HOME/opus/lib
|
||||
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/opus/lib
|
||||
- export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$HOME/opus/lib/pkgconfig
|
||||
- bash install-dependencies.sh
|
||||
|
||||
script:
|
||||
- make
|
||||
- make install
|
||||
|
||||
after_success:
|
||||
- ffmpeg -version
|
||||
- youtube-dl --output ~/.mumbledj/songs/QcIy9NiNbmo.m4a --format m4a --prefer-ffmpeg -4 --verbose http://www.youtube.com/watch?v=QcIy9NiNbmo
|
||||
- mumbledj -server=$MUMBLE_IP -port=$MUMBLE_PORT -username=travis -password=$MUMBLE_PASSWORD -verbose=true -test=true
|
||||
>>>>>>> dev
|
|
@ -7,11 +7,7 @@ machine:
|
|||
|
||||
dependencies:
|
||||
pre:
|
||||
- ffmpeg -version
|
||||
- sudo apt-get remove -y ffmpeg
|
||||
- ffmpeg -version
|
||||
- bash install-dependencies.sh
|
||||
- ffmpeg -version
|
||||
|
||||
override:
|
||||
- make
|
||||
|
@ -27,6 +23,5 @@ dependencies:
|
|||
|
||||
test:
|
||||
override:
|
||||
- youtube-dl --output ~/.mumbledj/songs/QcIy9NiNbmo.m4a --format m4a --prefer-ffmpeg -v http://www.youtube.com/watch?v=QcIy9NiNbmo
|
||||
- mumbledj -server=$MUMBLE_IP -port=$MUMBLE_PORT -username=circleci -password=$MUMBLE_PASSWORD -verbose=true -test=true:
|
||||
timeout: 180
|
|
@ -1,6 +1,11 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# removing old ffmpeg
|
||||
sudo rm -rf /usr/bin/ffmpeg
|
||||
sudo rm -rf /usr/bin/X11/ffmpeg
|
||||
sudo rm -rf /usr/share/man/man1/ffmpeg.1.gz
|
||||
|
||||
# check to see if ffmpeg is installed
|
||||
if [ ! -f "$HOME/bin/ffmpeg" ]; then
|
||||
echo 'Installing ffmpeg'
|
||||
|
@ -12,6 +17,15 @@ else
|
|||
echo 'Using cached version of ffmpeg.';
|
||||
fi
|
||||
|
||||
# check to see if youtube-dl is installed
|
||||
if [ ! -f "$HOME/bin/youtube-dl" ]; then
|
||||
echo 'Installing youtube-dl'
|
||||
curl https://yt-dl.org/latest/youtube-dl -o ~/bin/youtube-dl
|
||||
chmod a+rx ~/bin/youtube-dl
|
||||
else
|
||||
echo 'Using cached version of youtube-dl.';
|
||||
fi
|
||||
|
||||
# check to see if opus is installed
|
||||
if [ ! -d "$HOME/opus/lib" ]; then
|
||||
echo 'Installing opus'
|
||||
|
@ -21,12 +35,3 @@ if [ ! -d "$HOME/opus/lib" ]; then
|
|||
else
|
||||
echo 'Using cached version of opus.';
|
||||
fi
|
||||
|
||||
# check to see if youtube-dl is installed
|
||||
if [ ! -f "$HOME/bin/youtube-dl" ]; then
|
||||
echo 'Installing youtube-dl'
|
||||
curl https://yt-dl.org/downloads/2015.07.28/youtube-dl -o ~/bin/youtube-dl
|
||||
chmod a+rx ~/bin/youtube-dl
|
||||
else
|
||||
echo 'Using cached version of youtube-dl.';
|
||||
fi
|
22
test.go
22
test.go
|
@ -3,7 +3,6 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
"github.com/layeh/gumble/gumble"
|
||||
"github.com/layeh/gumble/gumbleutil"
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
@ -28,25 +27,26 @@ func Test(password, ip, port string, accesstokens []string) {
|
|||
}
|
||||
|
||||
func (t TestSettings) createClient(uname string) *gumble.Client {
|
||||
client := gumble.NewClient(&gumble.Config{
|
||||
config := gumble.Config{
|
||||
Username: uname,
|
||||
Password: t.password,
|
||||
Address: t.ip + ":" + t.port,
|
||||
Tokens: t.accesstokens,
|
||||
})
|
||||
gumbleutil.CertificateLockFile(client, fmt.Sprintf("%s/.mumbledj/cert.lock", dj.homeDir))
|
||||
}
|
||||
config.TLSConfig.InsecureSkipVerify = true
|
||||
client := gumble.NewClient(&config)
|
||||
return client
|
||||
}
|
||||
|
||||
func (t TestSettings) testYoutubeSong() {
|
||||
// dummyClient := t.createClient("dummy")
|
||||
// if err := dummyClient.Connect(); err != nil {
|
||||
// panic(err)
|
||||
// }
|
||||
dummyClient := t.createClient("dummy")
|
||||
if err := dummyClient.Connect(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
dj.client.Request(gumble.RequestUserList)
|
||||
time.Sleep(time.Second * 5)
|
||||
dummyUser := dj.client.Users.Find("BottleOToast")
|
||||
dummyUser := dj.client.Users.Find("dummy")
|
||||
if dummyUser == nil {
|
||||
fmt.Printf("User does not exist, printing users\n")
|
||||
for _, user := range dj.client.Users {
|
||||
|
@ -76,10 +76,10 @@ func (t TestSettings) testYoutubeSong() {
|
|||
fmt.Printf("For: %s; Expected: %s; Got: %s\n", url, title, dj.queue.CurrentSong().Title())
|
||||
}
|
||||
|
||||
time.Sleep(time.Second * 5)
|
||||
time.Sleep(time.Second * 10)
|
||||
skip(dummyUser, false, false)
|
||||
}
|
||||
|
||||
os.Exit(0)
|
||||
//dummyClient.Disconnect()
|
||||
dummyClient.Disconnect()
|
||||
}
|
||||
|
|
Reference in a new issue