Skip to content

Commit

Permalink
Include Rust 1.4.0 in CI build matrix
Browse files Browse the repository at this point in the history
The build matrix includes an old version of Rust to test compatibility
with older versions of the compiler. This is to ensure that the library
will be usable on old LTS releases that may have an older compiler.
However, this build configuration is fragile, because dependencies often
introduce the use of newer language constructs that are not available on
older versions of the compiler. This often results in bumping the
minimum Rust version in the build matrix, just to be compatible with
newer dependencies [1].

To make CI more stable with older compilers, a `Cargo.lock` is added to
lock the dependencies when running this build configuration. This works
with a general-purpose mechanism for symlinking files from
`ci/$TRAVIS_RUST_VERSION` before running a build.

[1]: 54bba8a
  • Loading branch information
dcuddeback committed Jan 17, 2021
1 parent db6857b commit d078a08
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sudo: false

language: rust
rust:
- 1.31.0
- 1.4.0
- stable
- beta
- nightly
Expand All @@ -21,3 +21,4 @@ before_install:
- pkg-config --list-all
- pkg-config --libs libudev
- pkg-config --modversion libudev
- if [ -d "ci/$TRAVIS_RUST_VERSION" ]; then find "ci/$TRAVIS_RUST_VERSION" -mindepth 1 -maxdepth 1 -exec ln -s '{}' . \; ; fi
18 changes: 18 additions & 0 deletions ci/1.4.0/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d078a08

Please sign in to comment.