Skip to content

Rust 1.12 compile test #977

Rust 1.12 compile test

Rust 1.12 compile test #977

Workflow file for this run

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