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