Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump dependencies and fix build #273

Merged
merged 13 commits into from
Aug 25, 2023
49 changes: 18 additions & 31 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,70 +12,57 @@ jobs:
RUST_BACKTRACE: 1
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build:
- stable
- macos
- win-msvc
include:
- build: stable
os: ubuntu-18.04
rust: stable
- build: macos
os: macos-latest
rust: stable
- build: win-msvc
os: windows-2019
rust: stable
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable, nightly]
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
components: rustfmt, clippy

- name: Check formatting
run: cargo fmt --all -- --check

- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Build
run: cargo build --verbose

# This is useful for debugging problems when the expected build artifacts
# (like shell completions and man pages) aren't generated.
- name: Show build.rs stderr
if: matrix.os == 'windows-2019'
if: matrix.os == 'windows-latest'
shell: bash
run: |
set +x
stderr="$(find "./target/debug" -name stderr -print0 | xargs -0 ls -t | head -n1)"
if [ -s "$stderr" ]; then
echo "===== $stderr ===== "
cat "$stderr"
mapfile -d '' -t STDERR_FILES < <(find "./target/debug" -name stderr -print0 | grep -z bandwhich)
for FILE in "${STDERR_FILES[@]}"; do
echo "===== $FILE ===== "
cat "$FILE"
echo "====="
fi
done
set -x

- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Run tests
run: cargo test --verbose

- name: Upload unix binary
if: matrix.os != 'windows-2019'
uses: actions/upload-artifact@v1
if: matrix.os != 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-${{ matrix.rust }}
path: target/debug/bandwhich

- name: Upload windows binary
if: matrix.os == 'windows-2019'
uses: actions/upload-artifact@v2
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-${{ matrix.rust }}
path: |
Expand Down
62 changes: 0 additions & 62 deletions .github/workflows/nightly.yaml

This file was deleted.

Loading
Loading