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