Skip to content

Commit

Permalink
Merge #72
Browse files Browse the repository at this point in the history
72: CI: Install Rust manually r=jonas-schievink a=Urhengulas

Install Rust manually in the CI, instead of relying on `actions-rs/toolchain`.

See knurling-rs/probe-run#338.

Co-authored-by: Urhengulas <johann.hemmann@code.berlin>
Co-authored-by: Johann Hemmann <johann.hemmann@code.berlin>
  • Loading branch information
bors[bot] and Urhengulas authored Aug 10, 2022
2 parents 5cc3ae8 + 2190b78 commit ff66809
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 17 deletions.
48 changes: 31 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@ jobs:
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
target: ${{ env.CORE_TARGET }}

# install Rust
- name: Install Rust toolchain
run: rustup toolchain install --profile=minimal ${{ matrix.rust }}
- name: Set default Rust toolchain
run: rustup default ${{ matrix.rust }}
- name: Install Rust target for cross-compilation
run: rustup target add ${{ env.CORE_TARGET }} --toolchain ${{ matrix.rust }}

# caching
- name: make rustc version available to cache keys
id: rustc
run: echo "::set-output name=version::$(rustc -V)"
Expand All @@ -52,24 +56,34 @@ jobs:
key: cargo-target-${{ runner.os }}-${{ steps.rustc.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-target-${{ runner.os }}-${{ steps.rustc.outputs.version }}-
# run tests
- name: Run testsuite
run: cargo xtest

static-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy, rustfmt
- run: cargo fmt --all -- --check
- uses: actions-rs/clippy-check@v1
with:
args: "-- --deny warnings"
token: ${{ secrets.GITHUB_TOKEN }}

# install Rust
- name: Install Rust toolchain
run: rustup toolchain install --profile=minimal stable
- name: Set default Rust toolchain
run: rustup default stable
- name: Install Rust components
run: |
rustup component add rustfmt clippy
cargo fmt --version
cargo clippy --version
# run tests
- run: cargo fmt -- --check
- run: cargo clippy -- --deny warnings
- run: cargo fmt -- --check
working-directory: test-flip-link-app/
- run: cargo clippy -- --deny warnings
working-directory: test-flip-link-app/

# Refs: https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149
# bors.tech integration
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

- [#72]: CI: Install Rust manually
- [#71]: Add changelog enforcer
- [#70]: Support addition in ORIGIN

[#72]: https://github.com/knurling-rs/flip-link/pull/72
[#71]: https://github.com/knurling-rs/flip-link/pull/71
[#70]: https://github.com/knurling-rs/flip-link/pull/70

Expand Down

0 comments on commit ff66809

Please sign in to comment.