per/.gitlab-ci.yml

48 lines
1.2 KiB
YAML
Raw Normal View History

2019-03-26 15:18:42 +01:00
image: "rust:latest"
# Optional: Install a C compiler, cmake and git into the container.
# You will often need this when you (or any of your dependencies) depends on C code.
#before_script:
#- apt-get update -yqq
#- apt-get install -yqq mingw-w64
2019-03-26 16:35:48 +01:00
stages:
- test
- build
2019-03-26 15:18:42 +01:00
test:cargo:
2019-03-26 16:35:48 +01:00
stage: test
2019-03-26 15:18:42 +01:00
script:
- rustc --version && cargo --version # Print version info for debugging
- cargo test --all --verbose
2019-03-26 15:25:53 +01:00
2019-03-27 01:08:30 +01:00
build:linux-glibc:
2019-03-26 16:35:48 +01:00
stage: build
2019-03-26 15:18:42 +01:00
script:
2019-03-27 01:08:30 +01:00
- cargo build --release
2019-03-26 15:18:42 +01:00
artifacts:
paths:
2019-03-26 18:52:06 +01:00
- target/x86_64-unknown-linux-musl/release/per
2019-03-26 15:25:53 +01:00
build:windows:
2019-03-26 16:35:48 +01:00
stage: build
2019-03-26 15:25:53 +01:00
script:
2019-03-26 15:36:02 +01:00
- mkdir .cargo && echo -e "[target.x86_64-pc-windows-gnu]\nlinker = \"x86_64-w64-mingw32-gcc\"\nar = \"x86_64-w64-mingw32-gcc-ar\"" > .cargo/config
2019-03-26 15:25:53 +01:00
- apt-get update -yqq
- apt-get install -yqq mingw-w64
2019-03-26 15:29:30 +01:00
- rustup target add x86_64-pc-windows-gnu
2019-03-26 15:25:53 +01:00
- cargo build --release --target=x86_64-pc-windows-gnu
artifacts:
paths:
2019-03-27 01:08:30 +01:00
- target/x86_64-pc-windows-gnu/release/per.exe
build:linux-musl:
stage: build
script:
- rustup target add x86_64-unknown-linux-musl
- cargo build --release --target x86_64-unknown-linux-musl
artifacts:
paths:
- target/x86_64-unknown-linux-musl/release/per