xref: /relibc/.gitlab-ci.yml (revision 1a0f72dad8881b75e3f555f0cd8d308191011b59)
1image: "redoxos/redoxer:latest"
2
3stages:
4    - build
5    - test
6
7before_script:
8    - apt-get update -qq
9    - apt-get install -qq git
10    - git submodule sync --recursive
11    - git submodule update --init --recursive
12
13cache:
14    paths:
15        - target/
16
17build:linux:
18    stage: build
19    script:
20        - rustup toolchain add "$(cat rust-toolchain)"
21        - rustup show      # Print version info for debugging
22        - make -j "$(nproc)" all
23
24build:redox:
25    stage: build
26    variables:
27        TARGET: x86_64-unknown-redox
28    script:
29        - export RUSTUP_TOOLCHAIN="$HOME/.redoxer/toolchain"
30        - export PATH="$RUSTUP_TOOLCHAIN/bin:$PATH"
31        - rustup show      # Print version info for debugging
32        - make -j "$(nproc)" all
33
34test:linux:
35    stage: test
36    dependencies:
37        - build:linux
38    script:
39        - make test
40
41test:redox:
42    stage: test
43    dependencies:
44        - build:redox
45    variables:
46        TARGET: x86_64-unknown-redox
47    script:
48        - export RUSTUP_TOOLCHAIN="$HOME/.redoxer/toolchain"
49        - export PATH="$RUSTUP_TOOLCHAIN/bin:$PATH"
50        - export TEST_RUNNER="redoxer exec --folder . -- sh --"
51        - make test
52
53fmt:
54    stage: test
55    script:
56        - rustup component add rustfmt-preview
57        - ./fmt.sh -- --check
58    allow_failure: true
59