.gitlab-ci.yml 2.49 KB
Newer Older
Camil Staps's avatar
Camil Staps committed
1 2 3 4
stages:
  - build
  - test-interpreter
  - test-interworking
5
  - examples
Camil Staps's avatar
Camil Staps committed
6

7
.base:
8
  image: camilstaps/abc-interpreter
9
  before_script:
10
    - ln -s "$PWD/src/abcopt" /opt/clean/lib/exe/abcopt
Camil Staps's avatar
Camil Staps committed
11
    - ln -s "$PWD/src/bcgen" /opt/clean/lib/exe/bcgen
12
    - ln -s "$PWD/src/bclink" /opt/clean/lib/exe/bclink
13
    - ln -s "$PWD/src/bcprelink" /opt/clean/lib/exe/bcprelink
14
    - ln -s "$PWD/src/bcstrip" /opt/clean/lib/exe/bcstrip
15
    - sed -i '/^import code from library/d' lib/ABC/Interpreter/Util.icl
Camil Staps's avatar
Camil Staps committed
16
    - make -C src
17 18 19

build:
  extends: .base
Camil Staps's avatar
Camil Staps committed
20
  stage: build
21
  script:
Camil Staps's avatar
Camil Staps committed
22
    - CFLAGS='-DDEBUG_ALL_INSTRUCTIONS -DDEBUG_CLEAN_LINKS=10 -DDEBUG_GARBAGE_COLLECTOR=10' make -B -C src
23

Camil Staps's avatar
Camil Staps committed
24 25 26 27 28 29
build-clang:
  extends: .base
  stage: build
  script:
    - OS=Linux CC=clang CFLAGS='-DDEBUG_ALL_INSTRUCTIONS -DDEBUG_CLEAN_LINKS=10 -DDEBUG_GARBAGE_COLLECTOR=10' make -B -C src

30 31 32 33
build-windows:
  extends: .base
  stage: build
  script:
34
    - CC=x86_64-w64-mingw32-gcc OS=Windows_NT make -B -C src ByteCodeGenerator.exe ByteCodeLinker.exe ByteCodePrelinker.exe ByteCodeStripper.exe interpret.exe
35

36 37 38 39 40 41 42 43 44 45
build-wasm:
  extends: .base
  stage: build
  script:
    - cd src-js
    - make WebPublic
    - tar czvf WebPublic.tar.gz WebPublic
  artifacts:
    paths:
      - src-js/WebPublic.tar.gz
46
    expire_in: 3 months
47

48
.benchmark:
Camil Staps's avatar
Camil Staps committed
49
  extends: .base
50 51 52 53 54 55 56 57
  artifacts:
    paths:
      - test/*.junit.xml
    reports:
      junit: test/*.junit.xml

benchmark-x64:
  extends: .benchmark
Camil Staps's avatar
Camil Staps committed
58 59
  stage: test-interpreter
  script:
Camil Staps's avatar
Camil Staps committed
60
    - cd test
61
    - ./run_tests.sh -bfj
62 63

benchmark-x86:
64
  extends: .benchmark
65 66 67
  stage: test-interpreter
  script:
    - cd test
68
    - ./run_tests.sh -3bfj
Camil Staps's avatar
Camil Staps committed
69

70
benchmark-wasm:
71
  extends: .benchmark
Camil Staps's avatar
Camil Staps committed
72 73 74
  stage: test-interpreter
  script:
    - cd test
75
    - ./run_tests.sh -wbj
Camil Staps's avatar
Camil Staps committed
76

Camil Staps's avatar
Camil Staps committed
77
interworking-Start:
78
  extends: .base
Camil Staps's avatar
Camil Staps committed
79
  stage: test-interworking
80
  script:
81
    - cd test
82
    - ./run_tests.sh -qo functions
83 84
    - make -B test-CodeSharing
    - CFLAGS='-DCOMPUTED_GOTOS -Ofast -fno-unsafe-math-optimizations' make -B test-CodeSharing
85

Camil Staps's avatar
Camil Staps committed
86 87 88 89
interworking-GraphCopy:
  extends: .base
  stage: test-interworking
  script:
90
    - cd test
91 92
    - make -B test-GraphTest
    - CFLAGS='-DCOMPUTED_GOTOS -Ofast -fno-unsafe-math-optimizations' make -B test-GraphTest
Camil Staps's avatar
Camil Staps committed
93 94

interworking-GraphCopy-clang:
95
  extends: .base
Camil Staps's avatar
Camil Staps committed
96
  stage: test-interworking
97
  script:
Camil Staps's avatar
Camil Staps committed
98
    - export OS=Linux CC=clang
99
    - cd test
100 101
    - make -B test-GraphTest
    - CFLAGS='-DCOMPUTED_GOTOS -Ofast -fno-unsafe-math-optimizations' make -B test-GraphTest
102 103 104 105 106 107 108

examples:
  extends: .base
  stage: examples
  script:
    - cd examples
    - ./test.sh