Revert "Optimize CI"

This reverts commit fe58e9541d.
This commit is contained in:
Bob McWhirter 2021-07-28 09:24:45 -04:00
parent abe13e6b18
commit d8c6ffe3a2

View File

@ -95,24 +95,21 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: true submodules: true
- uses: actions/cache@v2 - uses: actions-rs/toolchain@v1
with: with:
path: | toolchain: stable
~/.cargo/bin/ - name: cache
~/.cargo/registry/index/ id: cache-target
~/.cargo/registry/cache/ uses: actions/cache@v2
~/.cargo/git/db/ with:
target/ path: target
key: ${{ runner.os }}-cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml') }} key: ${{ runner.os }}-${{ matrix.target }}
restore-keys: |
${{ runner.os }}-cargo-${{ matrix.target }}-
# We have to append the "-D warnings" flag to .cargo/config rather than # We have to append the "-D warnings" flag to .cargo/config rather than
# using the RUSTFLAGS environment variable because if we set RUSTFLAGS # using the RUSTFLAGS environment variable because if we set RUSTFLAGS
# cargo will ignore the rustflags config in .cargo/config. # cargo will ignore the rustflags config in .cargo/config.
- name: Check - name: Check
run: | run: |
export CARGO_TARGET_DIR=$PWD/target
mkdir -p .cargo mkdir -p .cargo
echo -e '[target."cfg(all())"]\nrustflags = ["-D", "warnings"]' >> .cargo/config echo -e '[target."cfg(all())"]\nrustflags = ["-D", "warnings"]' >> .cargo/config
cd ${{ matrix.package }} && RUSTFLAGS=-Dwarnings cargo check --features=${{ matrix.features }} --target=${{ matrix.target }} cd ${{ matrix.package }} && RUSTFLAGS=-Dwarnings cargo check --features=${{ matrix.features }} --target=${{ matrix.target }}
@ -121,6 +118,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Check fmt - name: Check fmt
run: for i in embassy-*; do (cd $i; cargo fmt -- --check); done run: for i in embassy-*; do (cd $i; cargo fmt -- --check); done
@ -128,22 +128,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/cache@v2 - uses: actions-rs/toolchain@v1
with: with:
path: | toolchain: stable
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Test - name: Test
run: | run: cd embassy && cargo test
export CARGO_TARGET_DIR=$PWD/target
cd embassy
cargo test
metapac_gen: metapac_gen:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -151,19 +140,8 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
submodules: true submodules: true
- uses: actions/cache@v2 - uses: actions-rs/toolchain@v1
with: with:
path: | toolchain: stable
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Generate pregenerated metapac - name: Generate pregenerated metapac
run: | run: cd stm32-metapac-gen; cargo run --release
export CARGO_TARGET_DIR=$PWD/target
cd stm32-metapac-gen
cargo run --release