Skip to content

Commit 4cefb85

Browse files
authored
Ci (#2)
* Fixed steghide tests * Add initial build / test script * Update build script * Restructured tests * Added placeholder stegseek tests to play with CI * Add prints * Add test windows build * fixed issue in package install step * Add .deb packaging * remove INSTALL from makefile * fixed missing extension * Updated README with .deb * Update gitignore
1 parent b07bf12 commit 4cefb85

File tree

102 files changed

+209
-229
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+209
-229
lines changed

.github/workflows/build.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
pull_request:
6+
branches: [ master ]
7+
8+
jobs:
9+
build-linux:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Install build dependencies
15+
run: sudo apt install -y libmhash-dev libmcrypt-dev libjpeg-dev zlib1g-dev autoconf build-essential
16+
- name: autoreconf
17+
run: autoreconf -i
18+
- name: configure
19+
run: ./configure
20+
- name: make
21+
run: make
22+
- name: make check
23+
run: make check
24+
- name: Run cracker tests
25+
run: cd tests/stegseek && ./testCracker.sh && cd ../..
26+
- name: Create a .deb package
27+
run: bash package/package.sh
28+
- name: Save the .deb as a build artifact
29+
uses: actions/upload-artifact@v2
30+
with:
31+
name: stegseek-deb-package
32+
path: stegseek*.deb

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ tests/data/Makefile.in
1313

1414
.vscode
1515

16-
16+
# Test artifacts
17+
tests/steghide/*.log
18+
tests/steghide/*.trs
19+
tests/steghide/unittests
1720

1821

1922
### C++ ###

BUILD.md

Lines changed: 25 additions & 0 deletions

INSTALL

Lines changed: 0 additions & 182 deletions
This file was deleted.

Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
AUTOMAKE_OPTIONS = dist-bzip2 dist-zip
2-
SUBDIRS = m4 src tests
2+
SUBDIRS = m4 src tests/steghide
33
docdir = $(prefix)/share/doc/$(PACKAGE)
44
EXTRA_DIST = config.rpath mkinstalldirs BUGS CREDITS HISTORY depcomp
5-
doc_DATA = BUGS COPYING CREDITS HISTORY INSTALL README.md
5+
doc_DATA = BUGS COPYING CREDITS HISTORY README.md
66
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
77
config.sub configure depcomp install-sh missing mkinstalldirs steghide.doxygen steghide.spec
88

README.md

Lines changed: 7 additions & 21 deletions

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,4 +212,4 @@ then
212212
fi
213213

214214
dnl create Makefiles
215-
AC_OUTPUT([Makefile src/Makefile tests/Makefile tests/data/Makefile m4/Makefile])
215+
AC_OUTPUT([Makefile src/Makefile tests/steghide/Makefile tests/steghide/data/Makefile m4/Makefile])

package/control

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Package: stegseek
2+
Version: <<VERSION>>
3+
Section: base
4+
Priority: optional
5+
Architecture: amd64
6+
Depends: libmhash2, libmcrypt4, libjpeg8, zlib1g
7+
Maintainer: Rick de Jager <[email protected]>
8+
Description: Fast steghide cracking utility

package/package.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
##################################################
4+
# Basic packaging script
5+
##################################################
6+
#
7+
# Creates a very basic package, meant for Github releases
8+
# It won't hold up to Debian/Ubuntu standards, but will still
9+
# be useful as a release
10+
#
11+
12+
NAME="stegseek"
13+
VER="0.1"
14+
REV="1"
15+
VERSION="${VER}-${REV}"
16+
PACKAGE="${NAME}_${VERSION}"
17+
INSTALL_PATH="${PACKAGE}/usr/local/bin/"
18+
19+
# Create a relative root
20+
mkdir -p ${INSTALL_PATH}
21+
# Copy the binary over
22+
cp "src/${NAME}" ${INSTALL_PATH}
23+
24+
# Create a DEBIAN directory
25+
mkdir -p "${PACKAGE}/DEBIAN"
26+
27+
# Copy the control file over
28+
cp package/control "${PACKAGE}/DEBIAN"
29+
# Edit the version
30+
sed -i "s/<<VERSION>>/${VERSION}/g" "${PACKAGE}/DEBIAN/control"
31+
32+
# Build the package
33+
dpkg-deb --build ${PACKAGE}
34+
35+
36+

src/MHashPP.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ std::string MHashPP::getAlgorithmName ()
120120

121121
std::string MHashPP::getAlgorithmName (hashid id)
122122
{
123-
char *name = mhash_get_hash_name (id) ;
123+
char *name = (char*) mhash_get_hash_name (id) ;
124124
std::string retval ;
125125
if (name == NULL) {
126126
retval = std::string ("<algorithm not found>") ;

0 commit comments

Comments
 (0)