box: mogemimi/ubuntu-gamedev-wercker

build:
  steps:
    - script:
      name: clone dependencies
      code: |
        git submodule update --init
        git clone --depth=1 https://chromium.googlesource.com/external/gyp.git tools/gyp

    - script:
      name: unittest-gyp
      code: |
        python tools/gyp.py test/FrameworkTest/unittest.gyp -f make
        export CC=clang
        export CXX=clang++
        export LINK=clang++
        export CXXFLAGS="-std=c++17 -stdlib=libc++"
        export LDFLAGS="-stdlib=libc++"
        make -C build.makefiles
        ./build.makefiles/out/Release/unittest

    - script:
      name: unittest-cmake
      code: |
        export CC=clang
        export CXX=clang++
        export LINK=clang++
        export CXXFLAGS="-std=c++17 -stdlib=libc++"
        export LDFLAGS="-stdlib=libc++"
        mkdir build.cmake
        cd build.cmake
        cmake ..
        make
        cd ..
        ./build.cmake/build/PomdogTest/PomdogTest

box: mogemimi/gamedev-ubuntu

build:
  box: mogemimi/gamedev-ubuntu
  steps:
    - script:
      name: clone dependencies
      code: |
        git submodule update --init
        git clone --depth=1 https://chromium.googlesource.com/external/gyp.git tools/gyp

    - script:
      name: build and run tests with gyp
      code: |
        python tools/gyp.py test/FrameworkTest/unittest.gyp -f make
        export CC=clang
        export CXX=clang++
        export LINK=clang++
        export CXXFLAGS="-std=c++17 -stdlib=libc++"
        export LDFLAGS="-stdlib=libc++"
        make -C build.makefiles
        ./build.makefiles/out/Release/unittest

build-clang-debug:
  box: mogemimi/gamedev-ubuntu
  steps:
    - script:
      name: clone third party libraries
      code: git submodule update --init
    - script:
      name: build with clang in debug mode
      code: |
        mkdir build.cmake && cd build.cmake
        cmake \
          -DCMAKE_C_COMPILER=clang \
          -DCMAKE_CXX_COMPILER=clang++ \
          -DCMAKE_BUILD_TYPE=Debug \
          ../build/PomdogTest/
        make -j4
    - script:
      name: run test
      code: ./build.cmake/PomdogTest

build-clang-release:
  box: mogemimi/gamedev-ubuntu
  steps:
    - script:
      name: clone third party libraries
      code: git submodule update --init
    - script:
      name: build with clang in release mode
      code: |
        mkdir build.cmake && cd build.cmake
        cmake \
          -DCMAKE_C_COMPILER=clang \
          -DCMAKE_CXX_COMPILER=clang++ \
          -DCMAKE_BUILD_TYPE=Release \
          ../build/PomdogTest/
        make -j4
    - script:
      name: run test
      code: ./build.cmake/PomdogTest

Use per-pipeline containers for building multiple configurations
Use per-pipeline containers for building multiple configurations
