Coder Social home page Coder Social logo

squeak-ci's Introduction

Basic CI scripts for Squeak.

Requirements

  • ruby 1.9 (but 2.0 should work too)
  • cmake
  • gcc
  • zip
  • unzip
  • curl

On Windows this assumes you're using Cygwin and pik:

# Install pik
pik install ruby 1.9.3
pik use 193

On other OSes:

# Install RVM (or chruby, or rbenv, or...)
$ \curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3
$ cd squeak-ci
$ which ruby
/home/frank/.rvm/rubies/ruby-1.9.3-p392/bin/ruby

After you have a Ruby installed, set up the initial environment:

$ gem install bundle # if necessary
$ bundle install

How do I contribute?

Report bugs in the issue list, or on [email protected]. Ideally I'd like to see a pull request raised against the master branch, but if you've only got time to drop a mail or a note in the issue tracker, that's fine too.

Volunteering to run a build slave

We are very happy to accept offers of build slaves! To run a build slave you'll need some additional software:

  • Java (1.6 or later),
  • git (1.7 or later),
  • rvm

Ask on [email protected], and you'll get a user account. Then

  • add a new node, labelling it with either 32bit or 64bit, and the OS - linux, windows, osx, freebsd, and so on.
  • apt-get install openjdk-7-jdk cmake ruby1.9 zip unzip or equivalent
  • 64 bit Linux users will need to apt-get install libc6:i386
  • wget http://build.squeak.org/jnlpJars/slave.jar
  • java -jar slave.jar -jnlpUrl http://build.squeak.org/computer/${SLAVENAME}/slave-agent.jnlp -jnlpCredentials username:password

To keep your slave persistently connected, you could always write a small upstart or systemd script to run Java.

What does what?

build_cog_vm.sh builds the Cog VM for the local platform. It assumes that another process has dumped a copy of the latest published VM source to its directory.

build_interpreter_vm.sh builds an interpreter VM for the local platform from the latest published source.

rake build prepares a test environment.

rake update_base_image takes an early 4.5 alpha image and updates it from trunk. It's a minimal image. ("Minimal" is more a description of what it should be, rather than what it is.)

rake test does what rake update_base_image does, and runs the full suite of SUnit tests on it. It produces Hudson/Jenkins compatible test reports. It should run on Linux, OS X, and Windows machines. FreeBSD support will follow as soon as some issues are resolved.

rake perf runs the performance tests in benchmarks.st, to allow Hudson to measure overall performance of the 4.5 image as it evolves.

rake release produces a 4.5 image suitable for release, labelled SqueakM.N-KKKK.image in a zipfile called Squeak4.5.zip. In particular, it loads several well-known packages.

resources\wallpaper.png contains the official background for the current Squeak release.

To run the tests for a particular package (find the currently supported packages in the package-load-tests directory) like this: rspec -fdoc --tag Xtreams test/package_test.rb.

How do I upgrade the Cog VM?

  • Open up lib/squeak-ci/version.rb
  • Edit COG_VERSION with the appropriate value. You can find the year & week portions of the version from the appropriate URL: http://www.mirandabanda.org/files/Cog/VM/VM.rNNNN/

Additional reading

If you run into any issues, please raise an issue here. If it looks like the issue's not a build in the scripts but a problem in building the VM, please mail [email protected] with details of your operating system and the output showing the problem.

While waiting for a reply, take a look the the official VM guides and see if you can solve the issue yourself. (If you do, please tell someone about it, either here as an issue, or in a post to the vm-dev list.)

Licence

Copyright (C) 2012-2015 by Frank Shearar

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Current status

Build Status

squeak-ci's People

Contributors

frankshearar avatar jgonis avatar krono avatar marceltaeumel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

squeak-ci's Issues

Add a Seaside build-from-scratch test

We have the load script, and a test script. Because Seaside takes ~15 minutes to build up, it needs to run as a separate job.

I guess we'd want to be able to invoke rake package_test[Seaside] while keeping rake package_test doing the normal run-all-the-things tests.

vm_args + DEBUG = fail

vm_args has return [] if debug? so that a human can see the image running.

  • Limit 'debug' to mean 'show the image' (or 'run headful')
  • Add a new 'verbose' option to print shell commands

Add "force" option to VM building

We check for the presence of interpreter and Cog VMs, only building them if their containing directories are missing.

Windows has funny ideas about removing directories, in that FileUtils#rm_dir doesn't fail if the directory had files open in it and hence deletion couldn't take place.

Sometimes we do deliberately want to overwrite existing VMs.

Write differences in manifest to stdout

We now produce a TrunkImage.manifest, containing a list of all the versioned packages in Trunk.

What would be really great is knowing how that manifest has changed. In other words, such a diff would let one know what packages changed between the last build and this, narrowing down the search for the bug-introducing code.

Spawn on Windows

def run_image_with_cmd(vm_name, arr_of_vm_args, image_name, cmd, timeout = 240)
  log(cmd)
  base_cmd = "#{vm_name} #{arr_of_vm_args.join(" ")} \"#{SRC}/target/#{image_name}.image\" #{as_relative_path(Pathname.new(cmd))}"
  case identify_os
    when "windows" then system(base_cmd)
  else
    log("spawning with timeout #{timeout.to_s} seconds: nice #{base_cmd}")
    pid = spawn("nice #{base_cmd}", err: STDERR, out: STDOUT)
    future {
      sleep(timeout.seconds)
      log("Killed command for exceeding allotted time: nice #{base_cmd}.")
      Process.kill('KILL', pid)
    }
    Process.wait(pid)
  end
end

Let's try spawn on Windows too, and just nice on non-Windows platforms.

Write tests for FileSystemST

Gofer new
        smalltalkhubUser: 'dh83' project: 'FileSystemST';
        package: 'ConfigurationOfFileSystemST';
        load.

(Smalltalk at: #ConfigurationOfFileSystemST) loadDevelopment.

Metadata

  • depends_on: #15

Add CI for Regex

Pharo's Regex, that is. There's an SS3 library, but I think they moved their repo to SmalltalkHub.

Cache package image between runs

Given a package Foo, we repeatedly generate a specific image with Foo loaded in the image. Instead, we must create this image once, and execute our tests in copies of this image.

`rake build` on Windows raises a dialog

This will break CI builds. The output of rake build up to the point we see the dialog is

$ rake build
C:/Users/frsheara/Documents/git/squeak-ci/Rakefile:17: warning: already initialized constant FU
C:/Users/frsheara/Documents/git/squeak-ci/lib/squeak-ci/build.rb:12: warning: previous definition of FU was here
mkdir -p C:/Users/frsheara/Documents/git/squeak-ci/target
cp SqueakV41.sources SqueakV46.sources SqueakV50.sources HudsonBuildTools.st C:/Users/frsheara/Documents/git/squeak-ci/target
cp -r C:/Users/frsheara/Documents/git/squeak-ci/target/cog.r3427 C:/Users/frsheara/AppData/Local/Temp/d20160125-14896-1cu9qyw
mkdir -p C:/Users/frsheara/Documents/git/squeak-ci/target
cp SqueakV41.sources SqueakV46.sources SqueakV50.sources HudsonBuildTools.st C:/Users/frsheara/Documents/git/squeak-ci/target
rm -rf C:/Users/frsheara/Documents/git/squeak-ci/target/Squeak-4.10.2-2612-src-32
mkdir -p C:/Users/frsheara/Documents/git/squeak-ci/target
mkdir -p C:/Users/frsheara/Documents/git/squeak-ci/target/Squeak4.10.2-2612
mkdir -p C:/Users/frsheara/Documents/git/squeak-ci/target/Squeak4.10.2-2612
mkdir -p C:/Users/frsheara/Documents/git/squeak-ci/target/Squeak4.10.2-2612
mkdir -p C:/Users/frsheara/Documents/git/squeak-ci/target/Squeak4.10.2-2612
mkdir -p C:/Users/frsheara/Documents/git/squeak-ci/target/Squeak4.10.2-2612
mv Squeak4.10.2-2612 C:/Users/frsheara/Documents/git/squeak-ci/target/Squeak-4.10.2-2612-src-32
cp -r C:/Users/frsheara/Documents/git/squeak-ci/target/Squeak-4.10.2-2612-src-32/. C:/Users/frsheara/AppData/Local/Temp/d20160125-14896-1964fi6
cp Squeak4.6.image C:/Users/frsheara/Documents/git/squeak-ci/target/TrunkImage.image
cp Squeak4.6.changes C:/Users/frsheara/Documents/git/squeak-ci/target/TrunkImage.changes

It's something to do with assert_interpreter_compatible_image.

Upstart config for Linux build agents?

Jenkins runs a persistent process. Sometimes this process can run out of PermGen. If we had an upstart config, we could kill the connection from the master, and upstart would quietly restart the slave node process.

Get rid of tar

Because if it's in Ruby, it's one less thing to try and install by hand. Cross platform for free!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.