Code Monkey home page Code Monkey logo

Comments (9)

OJ avatar OJ commented on July 18, 2024

I'm happy to be the first to chime in.

Right now, CI is a single binary. While it has deps now that live in the source tree, the work I've done for 1.2 support includes the removal of these. So we are literally on single DLL being built.

In my humble opinion bringing in a build system for this is overkill. If we keep everything in the VS2010 solution then

  • On WIndows single .cmd file can invoke msbuild which can build the entire project from scratch using the .sln file.
  • For mono users a single shell script can kick off xbuild which can do exactly the same thing.
  • A batch file or PS script can the generate nuget package and pull the version from the DLL.

Outside of this, I have no idea what else is needed, or why. I think that this is all that's needed. It's simple, requires very little to no maintenance and already work snow (we just need to tidy it up a bit).

I'm keen to hear the reasons for bringing in any build system when the library that we're creating it so simple.

Cheers!

from riak-dotnet-client.

Iristyle avatar Iristyle commented on July 18, 2024

I left a few comments over here -> #47 (comment)

I agree with the concept of keep it simple as well... but you might want to think about taking the steps necessary to automate this on TravisCI so that you can verify Mono support.

from riak-dotnet-client.

peschkaj avatar peschkaj commented on July 18, 2024

What's the set up effort around TravisCI look like? I haven't gotten around to setting it up, yet. Right now, Mono verification happens on my laptop. Mono 3.0 hitting full release should change some aspects of what we do, as well.

from riak-dotnet-client.

Iristyle avatar Iristyle commented on July 18, 2024

Add a .travis.yml file, and tell Travis to build it for you.

From the other thread, here's how libgit2sharp does it. I assume they're using the CMake b/c they're working off of libgit2 C bindings and need to do a mixed mode asm. Obviously that's not necessary for Corrugated Iron.

# Travis-CI Build for libgit2sharp
# see travis-ci.org for details

language: c

# Make sure CMake is installed
install:
 - sudo apt-get install cmake mono-devel mono-gmcs

# Run the Build script
script:
 - git submodule update --init
 - mkdir cmake-build
 - cd cmake-build
 - cmake -DTHREADSAFE=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_CLAR=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=./libgit2-bin ../libgit2
 - export LD_LIBRARY_PATH=$PWD/libgit2-bin/lib
 - cmake --build . --target install
 - cd ..

# Run Tests
after_script:
 - xbuild CI-build.msbuild /t:Deploy

# Only watch the development branch
branches:
 only:
   - vNext

# Notify development list when needed
notifications:
 recipients:
   - [email protected]
 email:
   on_success: change
   on_failure: always

Their msbuild script is pretty basic as well

<Project DefaultTargets="Deploy" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
    <RootDir>$(MSBuildProjectDirectory)</RootDir>
    <TestBuildDir>$(RootDir)\LibGit2Sharp.Tests\bin\$(Configuration)</TestBuildDir>
    <DeployFolder>$(RootDir)\Build</DeployFolder>
  </PropertyGroup>

  <UsingTask AssemblyFile="$(MSBuildProjectDirectory)/Lib/xUnit/xunit.runner.msbuild.dll"
               TaskName="Xunit.Runner.MSBuild.xunit" />
  <Target Name="Clean">
    <Message Text="Commit SHA = $(CommitSha)" />

    <WriteLinesToFile Condition="'$(CommitSha)' != ''"
        File="$(RootDir)\LibGit2Sharp\libgit2sharp_hash.txt"
        Lines="$(CommitSha)"
        Overwrite="true" />

    <!-- Workaround for xbuild -->
    <Exec Condition=" ('$(OS)' != 'Windows_NT') " Command=" rm -r -f $(DeployFolder) " />
    <Exec Condition=" ('$(OS)' != 'Windows_NT') " Command=" rm -r -f $(TestBuildDir) " />

    <RemoveDir Directories="$(DeployFolder)" Condition="Exists('$(DeployFolder)')" />
    <RemoveDir Directories="$(TestBuildDir)" Condition="Exists('$(TestBuildDir)')" />
  </Target>

  <Target Name="Init" DependsOnTargets="Clean">
    <MakeDir Directories="$(DeployFolder)" />
  </Target>

  <Target Name="Build" DependsOnTargets="Init">
    <MSBuild
      Projects="LibGit2Sharp.sln"
      Targets="Build"
      Properties="Configuration=$(Configuration);TrackFileAccess=false" />
  </Target>

  <Target Name="Test" DependsOnTargets="Build">
    <xunit Assembly="$(TestBuildDir)/LibGit2Sharp.Tests.dll" Xml="$(DeployFolder)/Test-result.xml" />
  </Target>

  <Target Name="Deploy" DependsOnTargets="Test">
    <CreateItem Include="$(TestBuildDir)\LibGit2*.*">
        <Output TaskParameter="Include" ItemName="OutputFiles" />
    </CreateItem>
    <Copy SourceFiles="@(OutputFiles)"
        DestinationFiles="@(OutputFiles->'$(DeployFolder)\%(RecursiveDir)%(Filename)%(Extension)')" />

    <CreateItem Include="$(TestBuildDir)\NativeBinaries\**\*.*">
        <Output TaskParameter="Include" ItemName="NativeBinaries" />
    </CreateItem>
    <Copy SourceFiles="@(NativeBinaries)"
      DestinationFiles="@(NativeBinaries->'$(DeployFolder)\NativeBinaries\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
  </Target>
</Project>

from riak-dotnet-client.

OJ avatar OJ commented on July 18, 2024

Thanks for this info! I'm sure it'll be a big help. At this point we're going to for simple. Command line scripts to build and wired into Travis, as suggested, to get CI builds going so that the world can see that things are working. This will include the non-live tests (live tests would be a bit hard to verify).

I'll be aiming to get this included when we finish 1.0.

from riak-dotnet-client.

Iristyle avatar Iristyle commented on July 18, 2024

I'm going to Well, Actually you ;0

You can do live db tests under Travis tests by including

services:
  - riak

from riak-dotnet-client.

OJ avatar OJ commented on July 18, 2024

Very nice! Thanks for the reference. Perhaps we shall consider wiring those live tests in as well :)

Thanks for the Well, Actually.. :)

from riak-dotnet-client.

OJ avatar OJ commented on July 18, 2024

So the decision for v1.0.0 is to stick with what we have. That is, we'll use our command line scrips that work on *nix and Windows. On Windows a nuget package is generated as well.

A single build script which builds the projects is more than enough for now. I might put something in down the track to run the tests.

Down the track we'll enhance this to run unit tests and get it into Travis CI. I'll leave this issue open so that we address it later on but I'm going to remove it from the v1.0 milestone.

Cheers!

from riak-dotnet-client.

peschkaj avatar peschkaj commented on July 18, 2024

Existing hackery of shell scripts seems to work well. Closing this issue as worksforme

from riak-dotnet-client.

Related Issues (20)

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.