add .gitlab-ci.yml and .appveyor.yml for ci testing
This commit is contained in:
parent
9969f2f243
commit
6db49e1bee
|
@ -0,0 +1,56 @@
|
|||
# Copyright © 2018–2019 Trevor Spiteri
|
||||
|
||||
# Copying and distribution of this file, with or without modification,
|
||||
# are permitted in any medium without royalty provided the copyright
|
||||
# notice and this notice are preserved. This file is offered as-is,
|
||||
# without any warranty.
|
||||
|
||||
skip_tags: true
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- TARGET: x86_64-pc-windows-gnu
|
||||
CONFIG_SITE: C:/msys64/mingw64/etc/config.site
|
||||
MINGW_CHOST: x86_64-w64-mingw32
|
||||
MINGW_PACKAGE_PREFIX: mingw-w64-x86_64
|
||||
MINGW_PREFIX: C:/msys64/mingw64
|
||||
MSYSTEM: MINGW64
|
||||
MSYSTEM_CARCH: x86_64
|
||||
MSYSTEM_CHOST: x86_64-w64-mingw32
|
||||
MSYSTEM_PREFIX: C:/msys64/mingw64
|
||||
- TARGET: i686-pc-windows-gnu
|
||||
CONFIG_SITE: C:/msys64/mingw32/etc/config.site
|
||||
MINGW_CHOST: i686-w64-mingw32
|
||||
MINGW_PACKAGE_PREFIX: mingw-w64-i686
|
||||
MINGW_PREFIX: C:/msys64/mingw32
|
||||
MSYSTEM: MINGW32
|
||||
MSYSTEM_CARCH: i686
|
||||
MSYSTEM_CHOST: i686-w64-mingw32
|
||||
MSYSTEM_PREFIX: C:/msys64/mingw32
|
||||
|
||||
cache:
|
||||
- '%USERPROFILE%\.cargo\registry\cache'
|
||||
|
||||
install:
|
||||
- set PATH=C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin;%USERPROFILE%\.cargo\bin;%PATH%
|
||||
- curl -sSf -o rustup-init.exe https://win.rustup.rs
|
||||
- rustup-init.exe -y --default-host %TARGET% --default-toolchain none --no-modify-path
|
||||
- rustup --version
|
||||
- rustup install beta-%TARGET% 1.28.0-%TARGET%
|
||||
- rustup component add --toolchain beta-%TARGET% rustfmt clippy
|
||||
|
||||
build: false
|
||||
|
||||
before_test:
|
||||
- bash -c "if [ -d ""$USERPROFILE/.cargo/registry/cache"" ]; then cd ""$USERPROFILE/.cargo/registry""; find cache -name \*.crate; fi"
|
||||
|
||||
test_script:
|
||||
- cargo +beta-%TARGET% test --features fail-on-warnings
|
||||
- cargo +beta-%TARGET% test --release --features fail-on-warnings
|
||||
- cargo +beta-%TARGET% fmt -- --check
|
||||
- cargo +beta-%TARGET% clippy --all-targets --features fail-on-warnings
|
||||
- cargo +1.28.0-%TARGET% test --features fail-on-warnings
|
||||
- cargo +1.28.0-%TARGET% test --release --features fail-on-warnings
|
||||
|
||||
after_test:
|
||||
- bash -c "if [ -d ""$USERPROFILE/.cargo/registry/cache"" ]; then cd ""$USERPROFILE/.cargo/registry""; find cache -name \*.crate; fi"
|
|
@ -0,0 +1,52 @@
|
|||
# Copyright © 2018–2019 Trevor Spiteri
|
||||
|
||||
# Copying and distribution of this file, with or without modification,
|
||||
# are permitted in any medium without royalty provided the copyright
|
||||
# notice and this notice are preserved. This file is offered as-is,
|
||||
# without any warranty.
|
||||
|
||||
before_script:
|
||||
- getconf LONG_BIT
|
||||
- rustup --version
|
||||
- rustup install beta-$TARGET 1.28.0-$TARGET
|
||||
- rustup component add --toolchain beta-$TARGET rustfmt clippy
|
||||
- if [ -d cargo/registry/cache ]; then rm -rf $CARGO_HOME/registry/cache; mkdir -p $CARGO_HOME/registry; cp -R cargo/registry/cache $CARGO_HOME/registry/; echo Copied registry/cache; fi
|
||||
- if [ -d $CARGO_HOME/registry/cache ]; then (cd $CARGO_HOME/registry; find cache -name \*.crate) fi
|
||||
|
||||
after_script:
|
||||
- if [ -d $CARGO_HOME/registry/cache ]; then (cd $CARGO_HOME/registry; find cache -name \*.crate) fi
|
||||
- rm -rf cargo
|
||||
- mkdir -p cargo/registry
|
||||
- if [ -d $CARGO_HOME/registry/cache ]; then cp -R $CARGO_HOME/registry/cache cargo/registry/; echo Updated registry/cache; fi
|
||||
|
||||
x86_64-gnulinux:
|
||||
image: amd64/rust:1
|
||||
variables:
|
||||
TARGET: x86_64
|
||||
cache:
|
||||
key: $CI_JOB_NAME
|
||||
paths:
|
||||
- cargo/
|
||||
script:
|
||||
- cargo +beta-$TARGET test --features fail-on-warnings
|
||||
- cargo +beta-$TARGET test --release --features fail-on-warnings
|
||||
- cargo +beta-$TARGET fmt -- --check
|
||||
- cargo +beta-$TARGET clippy --all-targets --features fail-on-warnings
|
||||
- cargo +1.28.0-$TARGET test --features fail-on-warnings
|
||||
- cargo +1.28.0-$TARGET test --release --features fail-on-warnings
|
||||
|
||||
i686-gnulinux:
|
||||
image: i386/rust:1
|
||||
variables:
|
||||
TARGET: i686
|
||||
cache:
|
||||
key: $CI_JOB_NAME
|
||||
paths:
|
||||
- cargo/
|
||||
script:
|
||||
- cargo +beta-$TARGET test --features fail-on-warnings
|
||||
- cargo +beta-$TARGET test --release --features fail-on-warnings
|
||||
- cargo +beta-$TARGET fmt -- --check
|
||||
- cargo +beta-$TARGET clippy --all-targets --features fail-on-warnings
|
||||
- cargo +1.28.0-$TARGET test --features fail-on-warnings
|
||||
- cargo +1.28.0-$TARGET test --release --features fail-on-warnings
|
Loading…
Reference in New Issue