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

Update MSVR in README.md #356

Merged
merged 3 commits into from
Nov 12, 2024
Merged

Update MSVR in README.md #356

merged 3 commits into from
Nov 12, 2024

Conversation

fabienbellanger
Copy link
Contributor

Update MSVR in README.md

Update MSVR in `README.md`
@Keats
Copy link
Owner

Keats commented Nov 4, 2024

I would be tempted to remove that line and just add a link to the line in the CI file (https://github.com/Keats/validator/blob/master/.github/workflows/ci.yml#L11) to avoid keeping it in multiple places. Thoughts?

@fabienbellanger
Copy link
Contributor Author

Yes, this will prevent mistakes.
Why not add it to the Cargo.toml file by adding:

rust-version = "1.81"

?

@Keats
Copy link
Owner

Keats commented Nov 5, 2024

The issue is that we can still forgot to update it in Cargo.toml except now Cargo will believe it

I don't know how easy it is but if the YAML file from GH actions could read the version from Cargo.toml it would be neat

@fabienbellanger
Copy link
Contributor Author

Yes, it seems impossible.

In Cargo.toml, add:

rust-version = "1.81"

In ci.yml, change by:

name: ci
on: [push, pull_request]

jobs:
  test_validator:
    name: Continuous integration
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Extract Rust version from Cargo.toml
        run: |
          RUST_VERSION=$(sed -n 's/^rust-version = "\([^"]*\)"/\1/p' Cargo.toml)
          echo "MSRV: $RUST_VERSION"
          echo "RUST_VERSION=$RUST_VERSION" >> $GITHUB_ENV
      - name: Install Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: ${{ env.RUST_VERSION }}
      - name: Cache dependencies
        uses: Swatinem/rust-cache@v2
      - name: Build System Info
        run: rustc --version
      - name: Tests
        run: |
          cargo build --no-default-features
          cargo test --no-default-features
          cargo build --features unic --features derive --features card
          cargo test  --features unic --features derive --features card
  test_validator-nightly:
    name: Continuous integration
    runs-on: ubuntu-latest
    strategy:
      matrix:
        include:
          - rust: nightly
    steps:
      - uses: actions/checkout@v3
      - name: Install Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: ${{ matrix.rust }}
      - name: Cache dependencies
        uses: Swatinem/rust-cache@v2
      - name: Build System Info
        run: rustc --version
      - name: Tests
        run: |
          cargo build --no-default-features
          cargo test --no-default-features
          cargo build --all-features
          cargo test --all-features

I don't test it on this projet yet, but on another projet, it works like a charm.

@Keats
Copy link
Owner

Keats commented Nov 8, 2024

Let's try that then!

Copy link
Owner

@Keats Keats left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks

@Keats Keats merged commit 0517e59 into Keats:master Nov 12, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants