Skip to content

Automated OpenSC builds

Viktor Tarasov edited this page Dec 11, 2012 · 2 revisions

Automated OpenSC builds

OpenSC continuous builds are managed by Jenkins, the dashboard with build statuses and statistics is accessible on https://www.opensc-project.org/autobuild/

Purpose and warnings

  • Attention! Nightly builds are based on bleeding edge software straight from the personal Git SourceCode repository of a developer, they might mess up your operating system, brick your smart card or kill your pet – not for the faint of heart. They might not install or uninstall, break support for your card or be otherwise broken. Stabilized and more tested nightly builds are verified and promoted to PreReleases.
  • Attention! The branches fed to autobuilds SHOULD NOT be used for pulling in history – they can be rebased or force-pushed or rolled back or deleted or whatsoever at any time. The primary purpose of a nightly build branch is for a developer to feed his code to the build machinery for testing purposes and to be able to distribute fixes for testing, before inclusion in the mainline staging tree.
    !!! Please read about ReportingBugs and give feedback on any issues with binary installation packages to opensc-devel MailingList !!!
  • Attention! Always download the file with the biggest build number!
  • Unless if asked to test a specific build (with a build number or a Git commit hash) please download the exact file, not a later or earlier version.
  • Attention! If unsure, always uninstall the previous WindowsInstaller version from Control Panel before installing a new nightly, until the installer has been released as stable!
    DEB and RPM packages for latest released Debian, Ubuntu and Fedora distros are planned but not yet available.

Git builders & Downloads

OpenSC developers have their own Git trees, which are built in similar ways as the official releases, to ease testing in between two releases. In alphabetical order:

Setting up build slaves

For setting up additional build slaves on alternativ architectures or operating systems, please contact opensc-devel or martin@martinpaljak.net directly. Jenkins is based on Java, thus a JRE is required for running a builder. Slaves need to be able to connect to www.opensc-project.org:8887 (TCP)

Windows

  • Set up the build environment as described in WindowsInstaller
  • Install WinSCP for uploading built installer to opensc-project.org
  • Select “Install for all users” and “Add to PATH” on installation
  • After installation, open WinSCP, select “Preferences” and “Storage” and turn on INI based storage (by turning off registry based preferences storage)
  • Change the Git tool path for Windows nodes to “git.cmd” (otherwise git command would not be found)

x86 build snippet
set PATH=C:\mingw\msys\1.0\bin;C:\mingw\bin;%PATH%
bash.exe -c ./bootstrap
bash.exe -c ./configure
call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x86 /Release
nmake -f Makefile.mak
cmd /c "cd win32 && nmake /f Makefile.mak OpenSC.msi"
winscp /command "option batch on" "option confirm off" "open sftp://fileserver@www.opensc-project.org -hostkey=""ssh-rsa 4096 5f:b7:18:79:ee:34:5a:57:9d:28:69:19:c3:d7:a5:8a"" -privatekey=c:\path\to\key.ppk" "put win32\OpenSC.msi nightly/win32/OpenSC-r%SVN_REVISION%.%BUILD_NUMBER%.msi" "exit"

x64 build snippet
set PATH=C:\mingw\msys\1.0\bin;C:\mingw\bin;%PATH%
bash.exe -c ./bootstrap
bash.exe -c ./configure
call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /Release
nmake /f Makefile.mak BUILD_ON=WIN64 BUILD_FOR=WIN64
cmd /c "cd win32 && nmake /f Makefile.mak BUILD_ON=WIN64 BUILD_FOR=WIN64 OpenSC.msi"
winscp /command "option batch on" "option confirm off" "open sftp://fileserver@www.opensc-project.org -hostkey=""ssh-rsa 4096 5f:b7:18:79:ee:34:5a:57:9d:28:69:19:c3:d7:a5:8a"" -privatekey=c:\path\to\key.ppk"  "put win32\OpenSC.msi nightly/win64/OpenSC-r%SVN_REVISION%.%BUILD_NUMBER%.msi" "exit"

Mac OS X

  • Set up the build environment as described in MacInstaller
  • Make sure that the user running the build slave can connect to “fileserver” OpenSSH alias with a key

10.5/10.6 build snippet

  1. pull in fink
    test -r /sw/bin/init.sh && . /sw/bin/init.sh
    test -f Makefile && make clean
  2. build the DMG
    ./MacOSX/build 10.5
  3. upload to opensc-project.org
    scp OpenSC-10.5.dmg fileserver:./nightly/mac/OpenSC-10.5-r${SVN_REVISION}.${BUILD_NUMBER}.dmg

Jenkins configuration

Clone this wiki locally