| 1 |
name: Rust 1.12 compile test |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
pull_request: |
| 6 |
schedule: |
| 7 |
- cron: "35 2 * * *" |
| 8 |
|
| 9 |
jobs: |
| 10 |
build: |
| 11 |
runs-on: ubuntu-latest |
| 12 |
|
| 13 |
steps: |
| 14 |
- uses: actions/checkout@v2 |
| 15 |
- name: Work around incompatible crates.io |
| 16 |
shell: bash |
| 17 |
# Point cargo at a rewound copy of crates.io that would be understood |
| 18 |
# at 1.10.0. Unfortunately, pointing at a registry like this is only |
| 19 |
# supported from 1.12.0 and beyond. |
| 20 |
run: | |
| 21 |
set -ex |
| 22 |
# Tell cargo to use a different copy of crates.io. |
| 23 |
mkdir -p .cargo |
| 24 |
cat <<EOF > .cargo/config |
| 25 |
[source.crates-io] |
| 26 |
registry = "file://$(pwd)/../crates-io-rewound" |
| 27 |
EOF |
| 28 |
cat .cargo/config |
| 29 |
# create copy of crates.io, reset back to when rand 0.8.0 didn't |
| 30 |
# exist in index. |
| 31 |
cd .. |
| 32 |
git clone https://github.com/rust-lang/crates.io-index.git crates-io-rewound |
| 33 |
cd crates-io-rewound |
| 34 |
git reset --hard 46a429eac9f |
| 35 |
- name: Set default Rust |
| 36 |
run: rustup default 1.12.0 |
| 37 |
- name: Run build |
| 38 |
run: cargo build --verbose |
| 39 |
# tests can't be run because they use ONCE which needs a newer compiler |
| 40 |
# - name: Run unit tests |
| 41 |
# run: cargo test --verbose |