per/.gitlab-ci.yml

39 lines
992 B
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-26 15:19:00 +01:00
build:linux:
2019-03-26 18:32:41 +01:00
image: ekidd/rust-musl-builder
2019-03-26 16:35:48 +01:00
stage: build
2019-03-26 15:18:42 +01:00
script:
- cargo build --release
artifacts:
paths:
2019-03-26 15:25:53 +01:00
- target/release/per
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:
- target/x86_64-pc-windows-gnu/release/per.exe