-
Notifications
You must be signed in to change notification settings - Fork 23
40 lines (37 loc) · 1.24 KB
/
rust-1.17.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
name: Rust 1.17 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.17.0, required due to rand 0.8.
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.17.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