Skip to content

Commit

Permalink
include githash in MaxSAT evaluation submission tarball
Browse files Browse the repository at this point in the history
  • Loading branch information
msakai committed Jun 30, 2015
1 parent 67682ba commit 143d023
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 5 deletions.
3 changes: 2 additions & 1 deletion build_bdist_linux-i386.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export PATH=/opt/alex/3.1.3/bin:/opt/happy/1.19.4/bin:$PATH
cabal sandbox init
cabal update
cabal install --only-dependencies --flag=BuildToyFMF --flag=BuildSamplePrograms --flag=BuildMiscPrograms
cabal configure --disable-shared --ghc-options="-static -optl-static -optl-pthread" --flag=BuildToyFMF --flag=BuildSamplePrograms --flag=BuildMiscPrograms
#cabal configure --disable-shared --ghc-options="-static -optl-static -optl-pthread" --flag=BuildToyFMF --flag=BuildSamplePrograms --flag=BuildMiscPrograms
cabal configure -fLinuxStatic --flag=BuildToyFMF --flag=BuildSamplePrograms --flag=BuildMiscPrograms
cabal build

VER=`ghc -e ":m + Control.Monad Distribution.Package Distribution.PackageDescription Distribution.PackageDescription.Parse Distribution.Verbosity Data.Version" -e 'putStrLn =<< liftM (showVersion . pkgVersion . package . packageDescription) (readPackageDescription silent "toysolver.cabal")'`
Expand Down
3 changes: 2 additions & 1 deletion build_bdist_linux-x86_64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export PATH=/opt/alex/3.1.3/bin:/opt/happy/1.19.4/bin:$PATH
cabal sandbox init
cabal update
cabal install --only-dependencies --flag=BuildToyFMF --flag=BuildSamplePrograms --flag=BuildMiscPrograms
cabal configure --disable-shared --ghc-options="-static -optl-static -optl-pthread" --flag=BuildToyFMF --flag=BuildSamplePrograms --flag=BuildMiscPrograms
#cabal configure --disable-shared --ghc-options="-static -optl-static -optl-pthread" --flag=BuildToyFMF --flag=BuildSamplePrograms --flag=BuildMiscPrograms
cabal configure -fLinuxStatic --flag=BuildToyFMF --flag=BuildSamplePrograms --flag=BuildMiscPrograms
cabal build

VER=`ghc -e ":m + Control.Monad Distribution.Package Distribution.PackageDescription Distribution.PackageDescription.Parse Distribution.Verbosity Data.Version" -e 'putStrLn =<< liftM (showVersion . pkgVersion . package . packageDescription) (readPackageDescription silent "toysolver.cabal")'`
Expand Down
7 changes: 4 additions & 3 deletions build_bdist_maxsat_evaluation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ export PATH=/opt/alex/3.1.3/bin:/opt/happy/1.19.4/bin:$PATH
cabal sandbox init
cabal update
cabal install --only-dependencies
cabal configure --enable-static --disable-shared --ghc-options="-static -optl-static -optl-pthread"
#cabal configure --disable-shared --ghc-options="-static -optl-static -optl-pthread"
cabal configure -fLinuxStatic
cabal build

PKG=toysat-maxsat`date +%Y`-`date +%Y%m%d`
PKG=toysat-maxsat`date +%Y`-`date +%Y%m%d`-`git rev-parse --short HEAD`
rm -r $PKG
mkdir $PKG
cp dist/build/toysat/toysat $PKG/toysat_main
Expand All @@ -34,7 +35,7 @@ tar zxf ../ubcsat-beta-12-b18.tar.gz
gcc -Wall -O3 -static -o ubcsat src/adaptnovelty.c src/algorithms.c src/ddfw.c src/derandomized.c src/g2wsat.c src/gsat-tabu.c src/gsat.c src/gwsat.c src/hsat.c src/hwsat.c src/irots.c src/jack.c src/mt19937ar.c src/mylocal.c src/novelty+p.c src/novelty.c src/parameters.c src/paws.c src/random.c src/reports.c src/rgsat.c src/rnovelty.c src/rots.c src/samd.c src/saps.c src/sparrow.c src/ubcsat-help.c src/ubcsat-internal.c src/ubcsat-io.c src/ubcsat-mem.c src/ubcsat-reports.c src/ubcsat-time.c src/ubcsat-triggers.c src/ubcsat-version.c src/ubcsat.c src/vw.c src/walksat-tabu.c src/walksat.c src/weighted.c -lm
cd ..

PKG=toysat_ls-maxsat`date +%Y`-`date +%Y%m%d`
PKG=toysat_ls-maxsat`date +%Y`-`date +%Y%m%d`-`git rev-parse --short HEAD`
rm -r $PKG
mkdir $PKG
cp dist/build/toysat/toysat $PKG/toysat_main
Expand Down
29 changes: 29 additions & 0 deletions toysolver.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ Flag ForceChar8
Default: False
Manual: True

Flag LinuxStatic
Description: build statically linked binaries
Default: False
Manual: True

Flag BuildToyFMF
Description: build toyfmf command
Default: False
Expand Down Expand Up @@ -294,6 +299,8 @@ Executable toysolver
GHC-Options: -threaded
if impl(ghc >= 7)
GHC-Options: -rtsopts
if flag(LinuxStatic)
GHC-Options: -static -optl-static -optl-pthread
-- GHC-Prof-Options: -auto-all

Executable toysat
Expand Down Expand Up @@ -328,6 +335,8 @@ Executable toysat
if flag(ForceChar8) && impl(ghc)
Build-Depends: base >=4.5
CPP-OPtions: "-DFORCE_CHAR8"
if flag(LinuxStatic)
GHC-Options: -static -optl-static -optl-pthread

Executable toyfmf
If !flag(BuildToyFMF)
Expand All @@ -343,6 +352,8 @@ Executable toyfmf
Default-Language: Haskell2010
if impl(ghc >= 7)
GHC-Options: -rtsopts
if flag(LinuxStatic)
GHC-Options: -static -optl-static -optl-pthread
-- GHC-Prof-Options: -auto-all

-- Converters
Expand All @@ -359,6 +370,8 @@ Executable lpconvert
pseudo-boolean,
toysolver
Default-Language: Haskell2010
if flag(LinuxStatic)
GHC-Options: -static -optl-static -optl-pthread

Executable pbconvert
Main-is: pbconvert.hs
Expand All @@ -372,6 +385,8 @@ Executable pbconvert
pseudo-boolean,
toysolver
Default-Language: Haskell2010
if flag(LinuxStatic)
GHC-Options: -static -optl-static -optl-pthread

-- Sample Programs

Expand All @@ -385,6 +400,8 @@ Executable sudoku
array,
toysolver
Default-Language: Haskell2010
if flag(LinuxStatic)
GHC-Options: -static -optl-static -optl-pthread

Executable nqueens
If !flag(BuildSamplePrograms)
Expand All @@ -396,6 +413,8 @@ Executable nqueens
array,
toysolver
Default-Language: Haskell2010
if flag(LinuxStatic)
GHC-Options: -static -optl-static -optl-pthread

Executable knapsack
If !flag(BuildSamplePrograms)
Expand All @@ -407,6 +426,8 @@ Executable knapsack
array,
toysolver
Default-Language: Haskell2010
if flag(LinuxStatic)
GHC-Options: -static -optl-static -optl-pthread

Executable htc
If !flag(BuildSamplePrograms)
Expand All @@ -418,6 +439,8 @@ Executable htc
containers,
toysolver
Default-Language: Haskell2010
if flag(LinuxStatic)
GHC-Options: -static -optl-static -optl-pthread

-- Misc Programs

Expand All @@ -433,6 +456,8 @@ Executable pigeonhole
pseudo-boolean,
toysolver
Default-Language: Haskell2010
if flag(LinuxStatic)
GHC-Options: -static -optl-static -optl-pthread

Executable maxsatverify
If !flag(BuildMiscPrograms)
Expand All @@ -446,6 +471,8 @@ Executable maxsatverify
filepath,
toysolver
Default-Language: Haskell2010
if flag(LinuxStatic)
GHC-Options: -static -optl-static -optl-pthread

Executable pbverify
Main-is: pbverify.hs
Expand All @@ -460,6 +487,8 @@ Executable pbverify
pseudo-boolean,
toysolver
Default-Language: Haskell2010
if flag(LinuxStatic)
GHC-Options: -static -optl-static -optl-pthread

-- Test suites and benchmarks

Expand Down

0 comments on commit 143d023

Please sign in to comment.