Skip to content

Commit

Permalink
Use CircleCI for MinGW builds instead of Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kholia committed Jun 11, 2015
1 parent b12f04a commit 378840c
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 149 deletions.
50 changes: 18 additions & 32 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,34 @@ branches:
except:
gh-pages
compiler:
- gcc
- clang
- gcc
- clang
env:
# Default build. Release.
# Debug build

env:
global:
# The next declration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: FJ1/E5vVttd4+cFLQVdFt4rHNX28aGIvAWXduy6ZqQgZbfa0omsHcZXAq0t1qFz14ryTxEtxqY/aXw6OSG+t6a8OyrOi9jEdTIUpEDCyPvdZ299injPt1SiJRxzoDNo1CquwUE20y2pFOnTpVp6bIkH49o0oAxBijtb5fDj54KY=
cache:
directories:
- "$HOME/mingw64"
- "$HOME/bin"
# The next declration is the encrypted COVERITY_SCAN_TOKEN, created
# via the "travis encrypt" command using the project repo's public key
- secure: "FJ1/E5vVttd4+cFLQVdFt4rHNX28aGIvAWXduy6ZqQgZbfa0omsHcZXAq0t1qFz14ryTxEtxqY/aXw6OSG+t6a8OyrOi9jEdTIUpEDCyPvdZ299injPt1SiJRxzoDNo1CquwUE20y2pFOnTpVp6bIkH49o0oAxBijtb5fDj54KY="

matrix:
allow_failures:

before_install:
- sudo apt-get update -qq
- sudo apt-get install -y aptitude
- sudo aptitude install libssl-dev yasm libgmp-dev libpcap-dev pkg-config debhelper
libnet1-dev mingw-w64 gcc-mingw-w64 nsis rpm2cpio -y
- export OMP_NUM_THREADS=4
- export PATH="$HOME/bin:$PATH"
- sudo umount /proc/sys/fs/binfmt_misc # stop wine from messing around!
- sudo apt-get update -qq
- sudo apt-get install libssl-dev yasm libgmp-dev libpcap-dev pkg-config debhelper libnet1-dev
- export OMP_NUM_THREADS=4
script:
- cd src && ./travis-cc.sh
- cd src && ./configure && make -sj4 check

addons:
coverity_scan:
project:
name: magnumripper/JohnTheRipper
description: http://openwall.com/john
name: "magnumripper/JohnTheRipper"
description: "http://openwall.com/john"
notification_email: john.magnum@hushmail.com
build_command_prepend:
build_command: cd src && ./configure && make -sj4 check
build_command: "cd src && ./configure && make -sj4 check"
branch_pattern: coverity_scan
deploy:
skip_cleanup: true
provider: releases
api_key:
secure: IEbLhyjfipFOb4iakiUpcZpTeWF0Fz4uE6UTRGTvvmop+A4pKkUxPPdS5FfF8iHDecK9R2iFqLp3vgKhjdk//bv/tQxEt559Ix58LSPZlaFLEa/cBksOvixaIDifb/kUgZQC6htVkhnJZgK1FQ8P1JlDPjc6URqXN6O5hMNndk0=
file: "$HOME/JtR-MinGW.zip"
on:
repo: kholia/JohnTheRipper
branch: MinGW
tags: true
all_branches: true
condition: "$CC = gcc"
12 changes: 12 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
machine:
services:
- docker

dependencies:
pre:
- docker pull dhiru/fedora
- docker run --name fedora -v /home/ubuntu/JohnTheRipper:/JohnTheRipper -i -t dhiru/fedora /JohnTheRipper/src/CircleCI-MinGW.sh

general:
artifacts:
- /home/ubuntu/JohnTheRipper/JtR-MinGW.zip
58 changes: 58 additions & 0 deletions src/CircleCI-MinGW.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/bash

mkdir -p $HOME/bin
cat >$HOME/bin/mingw64 << 'EOF'
#!/bin/sh
PREFIX=x86_64-w64-mingw32
export CC=$PREFIX-gcc
export CXX=$PREFIX-g++
export CPP="$PREFIX-gcc -E"
export RANLIB=$PREFIX-ranlib
export STRIP=$PREFIX-strip
export DLLTOOL=$PREFIX-dlltool
export DLLWRAP=$PREFIX-dllwrap
export AS=$PREFIX-gcc
export AR=$PREFIX-ar
export WINDRES=$PREFIX-windres
export PKGCONFIG=$PREFIX-pkg-config
export OBJDUMP=$PREFIX-objdump
export PATH="/usr/x86_64-w64-mingw32/bin:$PATH"
exec "$@"
EOF
chmod u+x $HOME/bin/mingw64

cd /JohnTheRipper/src
export PATH="$HOME/bin:$PATH"

# stop wine from messing around, during the build phase
# echo -1 > /proc/sys/fs/binfmt_misc/status
# umount /proc/sys/fs/binfmt_misc

mingw64 ./configure OPENSSL_LIBS="-lssl -lcrypto" --host=x86_64-w64-mingw32
mingw64 make -sj4
mv ../run/john ../run/john.exe

basepath="/usr/x86_64-w64-mingw32/sys-root/mingw/bin"

find $basepath | grep "dll$"

cp "$basepath/libwinpthread-1.dll" ../run
cp "$basepath/zlib1.dll" ../run
cp "$basepath/libgomp-10.dll" ../run
cp "$basepath/libgmp-10.dll" ../run
cp "$basepath/libssl-10.dll" ../run
cp "$basepath/libcrypto-10.dll" ../run
cp "$basepath/libgomp-1.dll" ../run
cp "$basepath/libgcc_s_seh-1.dll" ../run
cp "$HOME/mingw64/ssleay32.dll" ../run
cp "$HOME/mingw64/libeay32.dll" ../run

find ../run

v=`git rev-parse --short HEAD`
cd ..
zip -r /JohnTheRipper/JtR-MinGW.zip run/ doc/ README.md README README-jumbo

# crazy testing!
cd /JohnTheRipper/run
/usr/bin/wine john.exe --test
60 changes: 0 additions & 60 deletions src/MinGW-bootstrap.sh

This file was deleted.

57 changes: 0 additions & 57 deletions src/travis-cc.sh

This file was deleted.

0 comments on commit 378840c

Please sign in to comment.