mirror of
https://github.com/loot/loot-condition-interpreter.git
synced 2026-07-27 14:16:09 -07:00
Unfortunately the published binary no longer works on Travis unless the build happens on its bionic image, because the binary is built in GitHub Actions using the ubuntu:latest image. Running in bionic isn't guaranteed not to break in the future, so install from source and cache the artifact to be sure. Fortunately, cargo install no longer requires --force to update an installed binary crate, so building from source and caching the result is simpler than it used to be.
57 lines
1.7 KiB
YAML
57 lines
1.7 KiB
YAML
language: rust
|
|
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- p7zip-full
|
|
# tarpaulin dependencies
|
|
- libssl-dev
|
|
|
|
cache: cargo
|
|
|
|
install:
|
|
- rustup component add rustfmt-preview
|
|
- rustfmt --version
|
|
- cargo install cargo-tarpaulin --version 0.10.2
|
|
|
|
before_script:
|
|
- cd tests
|
|
|
|
- wget https://github.com/WrinklyNinja/testing-plugins/archive/1.4.1.tar.gz
|
|
- tar -xf 1.4.1.tar.gz
|
|
- mv testing-plugins-1.4.1 testing-plugins
|
|
|
|
- wget https://github.com/loot/loot-api/releases/download/0.13.8/loot_api-0.13.8-0-g47797cc_dev-win32.7z
|
|
- 7z x loot_api-0.13.8-0-g47797cc_dev-win32.7z
|
|
- mv loot_api-0.13.8-0-g47797cc_dev-win32 loot_api_win32
|
|
|
|
- wget https://github.com/loot/loot-api/releases/download/0.13.8/loot_api-0.13.8-0-g47797cc_dev-win64.7z
|
|
- 7z x loot_api-0.13.8-0-g47797cc_dev-win64.7z
|
|
- mv loot_api-0.13.8-0-g47797cc_dev-win64 loot_api_win64
|
|
|
|
- wget https://github.com/loot/loot-api-python/releases/download/4.0.2/loot_api_python-4.0.2-0-gd356ac2_master-python2.7-win32.7z
|
|
- 7z x loot_api_python-4.0.2-0-gd356ac2_master-python2.7-win32.7z
|
|
- mv loot_api_python-4.0.2-0-gd356ac2_master-python2.7-win32 loot_api_python
|
|
|
|
- wget https://7-zip.org/a/7z1805-extra.7z
|
|
- 7z x 7z1805-extra.7z -o7z
|
|
|
|
- cd ..
|
|
|
|
script:
|
|
- cargo fmt --all -- --check
|
|
- cargo test --all --all-features
|
|
|
|
# Running cbindgen through tarpaulin fails due to an unexpected "metadata"
|
|
# argument when generating the C header file, so skip the ffi-headers feature.
|
|
- cargo tarpaulin --all --ciserver travis-ci --coveralls $TRAVIS_JOB_ID
|
|
|
|
# Need to rebuild the FFI wrapper so that its binary is given a filename
|
|
# without a hash.
|
|
- cargo build --manifest-path ffi/Cargo.toml --features ffi-headers
|
|
- mkdir ffi/build
|
|
- cd ffi/build
|
|
- cmake ..
|
|
- make
|
|
- make test
|