GitLab will be upgraded to the 12.10.14-ce.0 on 28 Sept 2020 at 2.00pm (AEDT) to 2.30pm (AEDT). During the update, GitLab and Mattermost services will not be available. If you have any concerns with this, please talk to us at N110 (b) CSIT building.

.gitlab-ci.yml 3.51 KB
Newer Older
1 2 3
stages:
  - build
  - test
4 5 6 7 8 9 10
  - rustfmt

before_script:
  - export MU_ZEBU=$CI_PROJECT_DIR
  - export ZEBU_BUILD=release
  - export CARGO_HOME=.cargo
  - export CC=clang
John Zhang's avatar
John Zhang committed
11 12
  - source /home/gitlab-runner/ci/bin/activate

13
build:
14 15 16
  stage: build
  script:
    - rustc --version
17
    - time CARGO_HOME=.cargo RUST_BACKTRACE=1 CC=clang cargo test --release --no-run --color=always
qinsoon's avatar
typo  
qinsoon committed
18
  artifacts:
qinsoon's avatar
qinsoon committed
19
    paths:
Yi Lin's avatar
Yi Lin committed
20
      - target/release/libmu.so
Yi Lin's avatar
Yi Lin committed
21
      - target/release/libmu.a
22
      - target/release/lib-*
23

24
test:cargo:api:
25 26
  stage: test
  script:
27
    - RUST_BACKTRACE=1 RUST_TEST_THREADS=1 ./test-release --color=always test_api 2> /dev/null
28 29

test:cargo:ir:
30 31
  stage: test
  script:
32
    - RUST_BACKTRACE=1 RUST_TEST_THREADS=1 ./test-release --color=always test_ir 2> /dev/null
33 34

test:cargo:compiler:
35 36
  stage: test
  script:
37
    - RUST_BACKTRACE=1 RUST_TEST_THREADS=1 ./test-release --color=always test_compiler 2> /dev/null
38 39

test:cargo:runtime:
40 41
  stage: test
  script:
42
    - RUST_BACKTRACE=1 RUST_TEST_THREADS=1 ./test-release --color=always test_runtime 2> /dev/null
John Zhang's avatar
John Zhang committed
43 44

testjit:milestones:
45 46
  stage: test
  script:
47
    - RUST_BACKTRACE=1 pytest tests/test_jit/test_milestones.py -v --color=yes
John Zhang's avatar
John Zhang committed
48 49

testjit:binops:
50 51
  stage: test
  script:
52
    - RUST_BACKTRACE=1 pytest tests/test_jit/test_binops.py -v --color=yes
John Zhang's avatar
John Zhang committed
53 54

testjit:cmpops:
55 56
  stage: test
  script:
57
    - RUST_BACKTRACE=1 pytest tests/test_jit/test_cmpops.py -v --color=yes
John Zhang's avatar
John Zhang committed
58

John Zhang's avatar
John Zhang committed
59 60 61 62
testjit:controlflow:
  stage: test
  script:
    - cd tests/test_jit
63
    - RUST_BACKTRACE=1 pytest test_controlflow.py -v --color=yes
John Zhang's avatar
John Zhang committed
64

John Zhang's avatar
John Zhang committed
65
testjit:convops:
John Zhang's avatar
John Zhang committed
66 67
  stage: test
  script:
68
    - RUST_BACKTRACE=1 pytest tests/test_jit/test_convops.py -v --color=yes
John Zhang's avatar
John Zhang committed
69

John Zhang's avatar
John Zhang committed
70 71 72
testjit:double:
  stage: test
  script:
73
    - RUST_BACKTRACE=1 pytest tests/test_jit/test_double.py -v --color=yes
John Zhang's avatar
John Zhang committed
74 75 76 77

testjit:memops:
  stage: test
  script:
78
    - RUST_BACKTRACE=1 pytest tests/test_jit/test_memops.py -v --color=yes
John Zhang's avatar
John Zhang committed
79 80 81 82

testjit:milestones:
  stage: test
  script:
83
    - RUST_BACKTRACE=1 pytest tests/test_jit/test_milestones.py -v --color=yes
John Zhang's avatar
John Zhang committed
84 85 86 87

testjit:otherops:
  stage: test
  script:
88
    - RUST_BACKTRACE=1 pytest tests/test_jit/test_otherops.py -v --color=yes
John Zhang's avatar
John Zhang committed
89

John Zhang's avatar
John Zhang committed
90
testjit:rpython:
qinsoon's avatar
qinsoon committed
91 92 93 94 95 96 97 98
  stage: test
  script:
    - if [ -d "tests/test_jit/mu-client-pypy" ]; then rm -Rf tests/test_jit/mu-client-pypy; fi
    - git clone https://gitlab.anu.edu.au/mu/mu-client-pypy.git tests/test_jit/mu-client-pypy
    - cd tests/test_jit/mu-client-pypy
    - git checkout mu-rewrite
    - git apply pypy.patch
    - cd $CI_PROJECT_DIR/tests/test_jit
Isaac Oscar Gariano's avatar
Isaac Oscar Gariano committed
99
    - MU_LOG_LEVEL=info LD_LIBRARY_PATH=./emit RUST_BACKTRACE=1 PYTHONPATH=mu-client-pypy pytest test_rpython*.py -v --color=yes
qinsoon's avatar
qinsoon committed
100 101

testjit:som:
John Zhang's avatar
John Zhang committed
102 103
  stage: test
  script:
104
    - if [ -d "tests/test_jit/RPySOM" ]; then rm -Rf tests/test_jit/RPySOM; fi
John Zhang's avatar
John Zhang committed
105
    - git clone https://github.com/microvm/RPySOM.git tests/test_jit/RPySOM
106
    - cd tests/test_jit/RPySOM; git submodule init; git submodule update; cd $CI_PROJECT_DIR
107 108 109 110 111
    - if [ -d "tests/test_jit/mu-client-pypy" ]; then rm -Rf tests/test_jit/mu-client-pypy; fi
    - git clone https://gitlab.anu.edu.au/mu/mu-client-pypy.git tests/test_jit/mu-client-pypy
    - cd tests/test_jit/mu-client-pypy
    - git checkout mu-rewrite
    - git apply pypy.patch
112
    - cd $CI_PROJECT_DIR/tests/test_jit
Isaac Oscar Gariano's avatar
Isaac Oscar Gariano committed
113
    - MU_LOG_LEVEL=info LD_LIBRARY_PATH=./emit RUST_BACKTRACE=1 PYTHONPATH=mu-client-pypy:RPySOM/src RPYSOM=RPySOM pytest test_som.py -v --color=yes
114 115 116 117

rustfmt:
  stage: rustfmt
  script:
118
    - CARGO_HOME=/home/gitlab-runner/.cargo rustup run nightly-2017-07-19 cargo fmt -- --write-mode=diff src/ast/src/lib.rs src/gc/src/lib.rs src/utils/src/lib.rs --verbose