Vendor rustup.rs installation script (#219) #461
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: 45 3 * * 2 # every Tuesday at 3:45 UTC | |
concurrency: | |
group: ci-${{ github.ref }} | |
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
jobs: | |
changelog: | |
if: github.event_name == 'pull_request' | |
runs-on: ubuntu-latest | |
permissions: {} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- run: ./scripts/ci-changelog.sh | |
ubuntu: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
# Do not rely on the pre-installed rustup. This also checks the rustup | |
# installation procedure of the setup script. | |
- run: rustup self uninstall -y | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
if: github.event_name != 'schedule' | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
.root/ | |
target/ | |
key: ${{ hashFiles('rust-toolchain.toml') }}-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ hashFiles('rust-toolchain.toml') }} | |
- run: sudo apt-get update | |
- run: ./scripts/setup.sh | |
- run: ./scripts/ci.sh |