Commit b067db8c authored by Isaac Oscar Gariano's avatar Isaac Oscar Gariano

Updated CI to perform rustfmt

parent 89a2135a
stages:
- build
- rustfmt
- test
- mubench
- rustfmt
before_script:
- export CI_HOME=~/mu-ci/ # Where to put all the depencies
- mkdir -p $CI_HOME/results # Where performance results will go
- export RUSTUP_HOME=$CI_HOME/.rustup # rust will use this instead of ~/.rustup
- export CARGO_HOME=$CI_HOME/.cargo # rust will use this instead of ~/.cargo
# Install rustup if we haven't yet
- if [ ! -f $CARGO_HOME/bin/rustup ]; then curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none; fi
- source $CARGO_HOME/env # Set up $PATH appropriately
- export MU_ZEBU=$CI_PROJECT_DIR
- export ZEBU_BUILD=release
- export CC=clang
- export CXX=clang++
- export RUST_TEST_THREADS=1
- export LD_LIBRARY_PATH=$MU_ZEBU/target/$ZEBU_BUILD/deps/:$CI_HOME/antlr4/usr/local/lib:$LD_LIBRARY_PATH
- export PYTHONPATH=$CI_HOME/mu-client-pypy:$CI_HOME/RPySOM/src
- export RPYSOM=$CI_HOME/RPySOM
- export PYPY=$CI_HOME/mu-client-pypy
- export MUC=$CI_HOME/mu-tool-compiler/muc
- if [ ! -d $CI_HOME/venv2 ]; then
- virtualenv -p python2 $CI_HOME/venv2
- source $CI_HOME/venv2/bin/activate
- pip install pytest
- else
- source $CI_HOME/venv2/bin/activate
- fi
- if [ ! -d $CI_HOME/venv3 ]; then virtualenv -p python3 $CI_HOME/venv3; fi
- source ./init_test_env.sh
build:
stage: build
script:
- rustup update # Just in case? the `rustup default` may make this superflouse
- rustup toolchain install nightly-2019-11-04 # Needed for rustfmt
- rustup default stable # Change `stable` to whatever rust toolchain you want, it will be installed and set as the default
- rustc --version
- if [ ! -d $CI_HOME/antlr4 ]; then # Compile the antlr runtime
......@@ -134,59 +109,59 @@ test:cargo:runtime:
testjit:milestones:
stage: test
script:
- RUST_BACKTRACE=1 pytest tests/test_jit/test_milestones.py -v --color=yes
- pytest tests/test_jit/test_milestones.py -v --color=yes
testjit:binops:
stage: test
script:
- RUST_BACKTRACE=1 pytest tests/test_jit/test_binops.py -v --color=yes
- pytest tests/test_jit/test_binops.py -v --color=yes
testjit:cmpops:
stage: test
script:
- RUST_BACKTRACE=1 pytest tests/test_jit/test_cmpops.py -v --color=yes
- pytest tests/test_jit/test_cmpops.py -v --color=yes
testjit:controlflow:
stage: test
script:
# run this test under test_jit directory
# as a C source file is expected in a relative path to current working directory
- cd tests/test_jit; RUST_BACKTRACE=1 pytest test_controlflow.py -v --color=yes
- cd tests/test_jit; pytest test_controlflow.py -v --color=yes
testjit:convops:
stage: test
script:
- cd tests/test_jit; RUST_BACKTRACE=1 pytest test_convops.py -v --color=yes
- cd tests/test_jit; pytest test_convops.py -v --color=yes
testjit:double:
stage: test
script:
- cd tests/test_jit; RUST_BACKTRACE=1 pytest test_double.py -v --color=yes
- cd tests/test_jit; pytest test_double.py -v --color=yes
testjit:memops:
stage: test
script:
- cd tests/test_jit; RUST_BACKTRACE=1 pytest test_memops.py -v --color=yes
- cd tests/test_jit; pytest test_memops.py -v --color=yes
testjit:milestones:
stage: test
script:
- cd tests/test_jit; RUST_BACKTRACE=1 pytest test_milestones.py -v --color=yes
- cd tests/test_jit; pytest test_milestones.py -v --color=yes
testjit:otherops:
stage: test
script:
- cd tests/test_jit; RUST_BACKTRACE=1 pytest test_otherops.py -v --color=yes
- cd tests/test_jit; pytest test_otherops.py -v --color=yes
testjit:rpython:
stage: test
script:
- cd tests/test_jit; MU_LOG_LEVEL=info LD_LIBRARY_PATH=./emit:$LD_LIBRARY_PATH pytest test_rpython*.py -v --color=yes
- cd tests/test_jit; MU_LOG_LEVEL=info pytest test_rpython*.py -v --color=yes
testjit:som:
stage: test
script:
- cd tests/test_jit; MU_LOG_LEVEL=info LD_LIBRARY_PATH=./emit:$LD_LIBRARY_PATH pytest test_som.py -v --color=yes
- cd tests/test_jit; MU_LOG_LEVEL=info pytest test_som.py -v --color=yes
mubench:
stage: mubench
......@@ -201,5 +176,5 @@ mubench:
rustfmt:
stage: rustfmt
script:
- cargo-fmt +nightly -- --check --verbose -- src/lib.rs src/ast/src/lib.rs src/gc/src/lib.rs src/utils/src/lib.rs
- cargo-fmt +nightly-2019-11-04 -- --check --verbose -- src/lib.rs src/ast/src/lib.rs src/gc/src/lib.rs src/utils/src/lib.rs
allow_failure: true
#!/bin/sh
export CI_HOME=~/mu-ci/ # Where to put all the depencies
mkdir -p $CI_HOME/results # Where performance results will go
export RUSTUP_HOME=$CI_HOME/.rustup # rust will use this instead of ~/.rustup
export CARGO_HOME=$CI_HOME/.cargo # rust will use this instead of ~/.cargo
# Install rustup if we haven't yet
if [ ! -f $CARGO_HOME/bin/rustup ]; then curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none; fi
source $CARGO_HOME/env # Set up $PATH appropriately
export MU_ZEBU=$PWD
export ZEBU_BUILD=debug
export CARGO_HOME=~/.cargo
export ZEBU_BUILD=release
export CC=clang
export CXX=clang++
export RUST_TEST_THREADS=1
export RUST_BACKTRACE=1
export MU_LOG_LEVEL=trace
export LD_LIBRARY_PATH=$MU_ZEBU/target/$ZEBU_BUILD/deps/:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$MU_ZEBU/tests/test_jit/emit:$MU_ZEBU/target/$ZEBU_BUILD/deps/:$CI_HOME/antlr4/usr/local/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$CI_HOME/mu-client-pypy:$CI_HOME/RPySOM/src
export RPYSOM=$CI_HOME/RPySOM
export PYPY=$CI_HOME/mu-client-pypy
export MUC=$CI_HOME/mu-tool-compiler/muc
if [ ! -d $CI_HOME/venv2 ]; then
virtualenv -p python2 $CI_HOME/venv2
source $CI_HOME/venv2/bin/activate
pip install pytest
else
source $CI_HOME/venv2/bin/activate
fi
if [ ! -d $CI_HOME/venv3 ]; then virtualenv -p python3 $CI_HOME/venv3; fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment