Skip to content

Commit

Permalink
Adds GitLab CI config.
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit d87230e5a2396530e93e9b20f312e08069c590ad
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 22:46:41 2016 +0200

    Fix tests on win

commit 25c90666fbde6c6c09352fba0cc7ed7ee2ce553c
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 22:27:00 2016 +0200

    Fix tests.

commit b46e00c86005d24fd210f8041031a4d7b6d73e3f
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 21:58:12 2016 +0200

    Fix deps probs.

commit 9c5db9eb9a41d8baab0124c28706ab2afb3c7f5f
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 21:14:14 2016 +0200

    Fixes yaml sytax

commit 292571a81b9b53b15b864aa2f86cb445f4e07307
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 21:13:06 2016 +0200

    Separates tests.

commit 3cc46c712b86bcab8fc79acf390487fe2061efa1
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 20:31:40 2016 +0200

    Fix batch script.

commit 6b93be904dd3064e2a651d012acf9978c33a4b43
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 20:22:24 2016 +0200

    Windows fixes?

commit 76dcda9d698682147025e7af5a563e2844c8ed84
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 20:16:35 2016 +0200

    Refactored ci yml file.

commit abd49689440e9159e6008f7ef12d3006f53d76fa
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 17:17:44 2016 +0200

    Add runner info to script.

commit 62d7c3fa6a0eb5a074aa8d2c151481973b305d12
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 17:11:29 2016 +0200

    Run on all runners.

commit d6132fdd7cd48d47f03baa8a2752323160a83f99
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 16:50:35 2016 +0200

    Remove tags.

commit 19fddf60fbec60586900702c36763c5b090cc88e
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 16:39:06 2016 +0200

    Added linux/windows.

commit f91745e2a35f079ddb71676783ef34504a1d6c43
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 16:24:02 2016 +0200

    More changes.

commit d5a4cc49adbb6741db3b9af6ccb7011916c2ebd3
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 15:55:21 2016 +0200

    More changes.

commit 12f59e529324af5c67520b6dd255f0082fa1dc37
Merge: c77244a 7aa6494
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 14:52:41 2016 +0200

    Merge branch 'devel' into gitlab-ci

commit c77244af513606b1245ebcb44ab68ca3108fd77b
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 14:48:25 2016 +0200

    More changes.

commit 4c56422f980fd16d251112b5d3ce696264b3170b
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 14:32:04 2016 +0200

    More change.

commit f709ea003f1649234a723ba9d8092edbde3ef6a9
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 14:17:58 2016 +0200

    Another try at CI.

commit ae79bb95bc639856f2637f93fc9a59b178a18b0f
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 14:03:58 2016 +0200

    Fixes .gitlab-ci.yml

commit 9b832dde4abb9e168d1c549e12ed20a8c5185d7b
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 14:00:48 2016 +0200

    Some changes to .gitlab-ci.yml.

commit c113a09b6f1dd1b87c1f34f2ea54364d701033e2
Author: Dominik Picheta <[email protected]>
Date:   Sun Aug 28 13:53:46 2016 +0200

    Adds .gitlab-ci.yml.
  • Loading branch information
dom96 committed Aug 28, 2016
1 parent 7aa6494 commit 7e3ebc1
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 0 deletions.
83 changes: 83 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# use the official gcc image, based on debian
# can use versions as well, like gcc:5.2
# see https://hub.docker.com/_/gcc/
image: gcc

stages:
- pre-build
- build
- test

.linux_set_path: &linux_set_path_def
before_script:
- export PATH=$(pwd)/bin:$PATH
tags:
- linux

.windows_set_path: &win_set_path_def
before_script:
- set PATH=%CD%\bin;%PATH%
tags:
- windows

build-linux:
stage: build
script:
- sh ci/build.sh
artifacts:
paths:
- bin/nim
- bin/nimd
- compiler/nim
- koch
expire_in: 1 week
tags:
- linux

build-windows:
stage: build
script:
- ci\build.bat
artifacts:
paths:
- bin\nim.exe
- bin\nimd.exe
- compiler\nim.exe
- koch.exe
expire_in: 1 week
tags:
- windows

test-linux:
stage: test
<<: *linux_set_path_def
script:
- sh ci/deps.sh
- nim c --taintMode:on tests/testament/tester
- tests/testament/tester --pedantic all
tags:
- linux

test-windows:
stage: test
<<: *win_set_path_def
script:
- call ci\deps.bat
- nim c --taintMode:on tests\testament\tester
- tests\testament\tester.exe --pedantic all
tags:
- windows

.csources: &csources_definition
stage: test
script:
- nim -v
- ./koch csources
- ./koch xz
artifacts:
paths:
- csources

csources-linux:
<<: *csources_definition
<<: *linux_set_path_def
14 changes: 14 additions & 0 deletions ci/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
REM Some debug info
echo "Running on %CI_RUNNER_ID% (%CI_RUNNER_DESCRIPTION%) with tags %CI_RUNNER_TAGS%."
gcc -v

git clone --depth 1 https://github.com/nim-lang/csources.git
cd csources
call build64.bat
cd ..
set PATH=%CD%\bin;%PATH%
nim -v
nim c koch
koch.exe boot
copy bin/nim bin/nimd
koch.exe boot -d:release
15 changes: 15 additions & 0 deletions ci/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
sh ci/deps.sh

# Build from C sources.
git clone --depth 1 https://github.com/nim-lang/csources.git
cd csources
sh build.sh
cd ..
# Add Nim to the PATH
export PATH=$(pwd)/bin:$PATH
# Bootstrap.
nim -v
nim c koch
./koch boot
cp bin/nim bin/nimd
./koch boot -d:release
5 changes: 5 additions & 0 deletions ci/deps.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Nimble deps
nim e install_nimble.nims
nim e tests/test_nimscript.nims
nimble update
nimble install -y zip opengl sdl1 jester niminst
19 changes: 19 additions & 0 deletions ci/deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Some debug info
echo "Running on $CI_RUNNER_ID ($CI_RUNNER_DESCRIPTION) with tags $CI_RUNNER_TAGS."
gcc -v
# Packages
apt-get update -qq
apt-get install -y -qq libcurl4-openssl-dev libsdl1.2-dev libgc-dev nodejs
# FASM
wget http://nim-lang.org/download/fasm-1.71.39.tgz
tar xvf fasm-1.71.39.tgz
# PATH handling
export PATH=$(pwd)/fasm:$PATH
which fasm
export PATH=$(pwd)/bin:$PATH

# Nimble deps
nim e install_nimble.nims
nim e tests/test_nimscript.nims
nimble update
nimble install zip opengl sdl1 jester niminst

0 comments on commit 7e3ebc1

Please sign in to comment.