Skip to content

Commit

Permalink
chore: updates around bin warning and windows-latest+nightly (#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeeshan Lakhani authored Sep 27, 2023
1 parent 86892b3 commit 1f9543d
Show file tree
Hide file tree
Showing 10 changed files with 223 additions and 278 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,13 @@ jobs:
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

# Temporary Disable https://github.com/time-rs/time/issues/618,
# which is an underlying dep
- name: Generate Code Coverage
run: cargo llvm-cov --all-features --workspace --doctests --lcov --output-path lcov.info

# - name: Generate Code Coverage
# run: cargo llvm-cov --all-features --workspace --doctests --lcov --output-path lcov.info

# - name: Upload to codecov.io
# uses: codecov/codecov-action@v3
# continue-on-error: true
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# fail_ci_if_error: false
# files: lcov.info
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
continue-on-error: true
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
files: lcov.info
74 changes: 35 additions & 39 deletions .github/workflows/tests_and_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust-toolchain:
- stable
- nightly
- 1.70.0
include:
- os: windows-latest
rustflags: -C target-feature=+crt-static

rust-toolchain: [stable, nightly]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
Expand Down Expand Up @@ -138,7 +131,7 @@ jobs:
with:
command: check bans licenses sources

run-tests-all-features:
run-tests:
needs: changes
if: ${{ needs.changes.outputs.rust == 'true' }}
env:
Expand All @@ -147,14 +140,9 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust-toolchain:
- stable
- nightly
include:
- os: windows-latest
rustflags: -C target-feature=+crt-static

os: [ubuntu-latest, macos-latest]
rust-toolchain: [stable, nightly]
default-features: [all, none]
runs-on: ${{ matrix.os }}
steps:
- name: Setup IPFS
Expand Down Expand Up @@ -191,48 +179,45 @@ jobs:
- name: Install nextest
uses: taiki-e/install-action@nextest

- name: Run Tests
- name: Run Tests (all-features)
if: ${{ matrix.default-features == 'all' }}
run: cargo nextest run --workspace --profile ci --all-features

- name: Run Tests (no-default-features)
if: ${{ matrix.default-features == 'none' }}
run: cargo nextest run --workspace --profile ci --no-default-features --features "test-utils"

- name: Run Doc Tests
if: ${{ matrix.default-features == 'all' }}
run: cargo test --doc --workspace

run-tests-no-default-features:
run-tests-windows:
needs: changes
if: ${{ needs.changes.outputs.rust == 'true' }}
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
RUSTFLAGS: -Ctarget-feature=+crt-static
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust-toolchain:
- stable
- nightly
include:
- os: windows-latest
rustflags: -C target-feature=+crt-static

runs-on: ${{ matrix.os }}
rust-toolchain: [stable, nightly]
default-features: [all, none]
runs-on: windows-latest
steps:
- name: Setup IPFS
uses: ibnesayeed/setup-ipfs@master
with:
run_daemon: false

- name: Checkout Repository
uses: actions/checkout@v4

- name: Cache Project
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
shared-key: test-0-${{ matrix.rust-toolchain }}-${{ matrix.os }}
shared-key: test-all-${{ matrix.rust-toolchain }}-windows-latest
save-if: ${{ github.event_name == 'push' }}

- name: Sccache
uses: mozilla-actions/sccache-action@v0.0.3

- name: Use mold-linker
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: rui314/setup-mold@v1

- name: Install Rust Toolchain
id: toolchain
uses: dtolnay/rust-toolchain@master
Expand All @@ -245,9 +230,20 @@ jobs:
- name: Install nextest
uses: taiki-e/install-action@nextest

- name: Run Tests
- name: Run Tests (all-features)
if: ${{ matrix.default-features == 'all' }}
run: cargo nextest run --workspace --profile ci --all-features
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}

- name: Run Tests (no-default-features)
if: ${{ matrix.default-features == 'none' }}
run: cargo nextest run --workspace --profile ci --no-default-features --features "test-utils"

- name: Run Doc Tests
if: ${{ matrix.default-features == 'all' }}
run: cargo test --doc --workspace
continue-on-error: ${{ matrix.rust-toolchain == 'nightly' }}

run-docs:
needs: changes
if: ${{ needs.changes.outputs.rust == 'true' }}
Expand Down
Loading

0 comments on commit 1f9543d

Please sign in to comment.