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:
|
dependencies:
|
||||||
pre:
|
pre:
|
||||||
- ffmpeg -version
|
|
||||||
- sudo apt-get remove -y ffmpeg
|
|
||||||
- ffmpeg -version
|
|
||||||
- bash install-dependencies.sh
|
- bash install-dependencies.sh
|
||||||
- ffmpeg -version
|
|
||||||
|
|
||||||
override:
|
override:
|
||||||
- make
|
- make
|
||||||
|
@ -27,6 +23,5 @@ dependencies:
|
||||||
|
|
||||||
test:
|
test:
|
||||||
override:
|
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:
|
- mumbledj -server=$MUMBLE_IP -port=$MUMBLE_PORT -username=circleci -password=$MUMBLE_PASSWORD -verbose=true -test=true:
|
||||||
timeout: 180
|
timeout: 180
|
|
@ -1,6 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
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
|
# check to see if ffmpeg is installed
|
||||||
if [ ! -f "$HOME/bin/ffmpeg" ]; then
|
if [ ! -f "$HOME/bin/ffmpeg" ]; then
|
||||||
echo 'Installing ffmpeg'
|
echo 'Installing ffmpeg'
|
||||||
|
@ -12,6 +17,15 @@ else
|
||||||
echo 'Using cached version of ffmpeg.';
|
echo 'Using cached version of ffmpeg.';
|
||||||
fi
|
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
|
# check to see if opus is installed
|
||||||
if [ ! -d "$HOME/opus/lib" ]; then
|
if [ ! -d "$HOME/opus/lib" ]; then
|
||||||
echo 'Installing opus'
|
echo 'Installing opus'
|
||||||
|
@ -20,13 +34,4 @@ if [ ! -d "$HOME/opus/lib" ]; then
|
||||||
cd opus-1.0.3 && ./configure --prefix=$HOME/opus && make && make install
|
cd opus-1.0.3 && ./configure --prefix=$HOME/opus && make && make install
|
||||||
else
|
else
|
||||||
echo 'Using cached version of opus.';
|
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
|
fi
|
22
test.go
22
test.go
|
@ -3,7 +3,6 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/layeh/gumble/gumble"
|
"github.com/layeh/gumble/gumble"
|
||||||
"github.com/layeh/gumble/gumbleutil"
|
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
@ -28,25 +27,26 @@ func Test(password, ip, port string, accesstokens []string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t TestSettings) createClient(uname string) *gumble.Client {
|
func (t TestSettings) createClient(uname string) *gumble.Client {
|
||||||
client := gumble.NewClient(&gumble.Config{
|
config := gumble.Config{
|
||||||
Username: uname,
|
Username: uname,
|
||||||
Password: t.password,
|
Password: t.password,
|
||||||
Address: t.ip + ":" + t.port,
|
Address: t.ip + ":" + t.port,
|
||||||
Tokens: t.accesstokens,
|
Tokens: t.accesstokens,
|
||||||
})
|
}
|
||||||
gumbleutil.CertificateLockFile(client, fmt.Sprintf("%s/.mumbledj/cert.lock", dj.homeDir))
|
config.TLSConfig.InsecureSkipVerify = true
|
||||||
|
client := gumble.NewClient(&config)
|
||||||
return client
|
return client
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t TestSettings) testYoutubeSong() {
|
func (t TestSettings) testYoutubeSong() {
|
||||||
// dummyClient := t.createClient("dummy")
|
dummyClient := t.createClient("dummy")
|
||||||
// if err := dummyClient.Connect(); err != nil {
|
if err := dummyClient.Connect(); err != nil {
|
||||||
// panic(err)
|
panic(err)
|
||||||
// }
|
}
|
||||||
|
|
||||||
dj.client.Request(gumble.RequestUserList)
|
dj.client.Request(gumble.RequestUserList)
|
||||||
time.Sleep(time.Second * 5)
|
time.Sleep(time.Second * 5)
|
||||||
dummyUser := dj.client.Users.Find("BottleOToast")
|
dummyUser := dj.client.Users.Find("dummy")
|
||||||
if dummyUser == nil {
|
if dummyUser == nil {
|
||||||
fmt.Printf("User does not exist, printing users\n")
|
fmt.Printf("User does not exist, printing users\n")
|
||||||
for _, user := range dj.client.Users {
|
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())
|
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)
|
skip(dummyUser, false, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
//dummyClient.Disconnect()
|
dummyClient.Disconnect()
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue