Merge pull request #171 from snshn/improve-ci-cd

Add rustfmt installation step to CI
This commit is contained in:
Sunshine 2020-04-30 19:51:04 -04:00 committed by GitHub
commit 31a9550f5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -44,8 +44,7 @@ jobs:
echo "::set-env name=PKG_CONFIG_ALLOW_CROSS::1" echo "::set-env name=PKG_CONFIG_ALLOW_CROSS::1"
echo "::set-env name=RUSTFLAGS::-C linker=arm-linux-gnueabihf-gcc -L/usr/arm-linux-gnueabihf/lib -L/cross-build-arm/usr/lib/arm-linux-gnueabihf -L/cross-build-arm/lib/arm-linux-gnueabihf" echo "::set-env name=RUSTFLAGS::-C linker=arm-linux-gnueabihf-gcc -L/usr/arm-linux-gnueabihf/lib -L/cross-build-arm/usr/lib/arm-linux-gnueabihf -L/cross-build-arm/lib/arm-linux-gnueabihf"
- name: Build the executable - name: Build the executable
run: | run: cargo build --release --target=arm-unknown-linux-gnueabihf
cargo build --release --target=arm-unknown-linux-gnueabihf
- name: Attach artifact to the release - name: Attach artifact to the release
uses: Shopify/upload-to-release@1.0.0 uses: Shopify/upload-to-release@1.0.0
with: with:

View File

@ -27,4 +27,6 @@ jobs:
- name: Run tests - name: Run tests
run: cargo test --all --locked --verbose run: cargo test --all --locked --verbose
- name: Check code formatting - name: Check code formatting
run: cargo fmt --all -- --check run: |
rustup component add rustfmt
cargo fmt --all -- --check