Skip to content

Commit

Permalink
Run CI for the msrv and latest rust version
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Jan 9, 2024
1 parent 9d2e0cc commit c55a127
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 22 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/rust-version.yml

This file was deleted.

17 changes: 14 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
branches: [main, release/**]
pull_request:

env:
RUSTFLAGS: -Dwarnings -Dclippy::all -Dclippy::pedantic

defaults:
run:
shell: bash
Expand Down Expand Up @@ -42,6 +39,7 @@ jobs:
strategy:
fail-fast: false
matrix:
rust: [msrv, latest]
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
Expand All @@ -57,7 +55,19 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: stellar/actions/rust-cache@main
- name: Use the minimum supported Rust version
if: matrix.rust == 'msrv'
run: |
msrv="$(cargo metadata --format-version 1 --no-deps | jq -r '.packages | map(.rust_version) | map(values) | min')"
rustup override set $msrv
rustup component add clippy --toolchain $msrv
- name: Error on warnings and clippy checks
# Only error on warnings and checks for the msrv, because new versions of
# Rust will frequently add new warnings and checks.
if: matrix.rust == 'msrv'
run: echo RUSTFLAGS='-Dwarnings -Dclippy::all -Dclippy::pedantic' >> $GITHUB_ENV
- run: rustup update
- run: cargo version
- run: rustup target add ${{ matrix.target }}
- run: rustup target add wasm32-unknown-unknown
- if: matrix.target == 'aarch64-unknown-linux-gnu'
Expand All @@ -70,6 +80,7 @@ jobs:
for I in cmd/soroban-cli cmd/crates/* cmd/crates/soroban-test/tests/fixtures/test-wasms/hello_world ; do
cargo test --target ${{ matrix.target }} --manifest-path $I/Cargo.toml
done
publish-dry-run:
if: github.event_name == 'push' || startsWith(github.head_ref, 'release/')
strategy:
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ exclude = ["cmd/crates/soroban-test/tests/fixtures/hello"]

[workspace.package]
version = "20.1.1"
rust-version = "1.70.0"

[workspace.dependencies.soroban-env-host]
version = "=20.0.2"
Expand Down
2 changes: 1 addition & 1 deletion cmd/crates/soroban-spec-json/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ readme = "README.md"
license = "Apache-2.0"
version.workspace = true
edition = "2021"
rust-version = "1.70"
rust-version.workspace = true

[dependencies]
soroban-spec = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion cmd/crates/soroban-spec-tools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "Apache-2.0"
readme = "README.md"
version.workspace = true
edition = "2021"
rust-version = "1.70"
rust-version.workspace = true
autobins = false


Expand Down
2 changes: 1 addition & 1 deletion cmd/crates/soroban-spec-typescript/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ readme = "README.md"
license = "Apache-2.0"
version.workspace = true
edition = "2021"
rust-version = "1.70"
rust-version.workspace = true

[dependencies]
soroban-spec = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion cmd/crates/soroban-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "Apache-2.0"
readme = "README.md"
version = "20.1.1"
edition = "2021"
rust-version = "1.70"
rust-version.workspace = true
autobins = false


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Stellar Development Foundation <[email protected]>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version = "1.70"
rust-version.workspace = true

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Stellar Development Foundation <[email protected]>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version = "1.70"
rust-version.workspace = true

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Stellar Development Foundation <[email protected]>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version = "1.70"
rust-version.workspace = true

[lib]
crate-type = ["cdylib"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Stellar Development Foundation <[email protected]>"]
license = "Apache-2.0"
edition = "2021"
publish = false
rust-version = "1.70"
rust-version.workspace = true

[lib]
crate-type = ["cdylib"]
Expand Down

0 comments on commit c55a127

Please sign in to comment.