Skip to content

Commit

Permalink
Restrict openssl by 0.10.36
Browse files Browse the repository at this point in the history
This is required by -Zminimal-versions nightly check.

For openssl 0.10.35 the build would succeed if only
openssl-sys is restricted by 0.9.66 explicitly
(by default it mistakenly limited by 0.9.65).

For openssl <0.10.35 or openssl-sys<0.9.66
the build is failed.
  • Loading branch information
nepalez committed Sep 20, 2023
1 parent a29b0bf commit 2f81410
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 233 deletions.
235 changes: 2 additions & 233 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: ci
on:
push:
branches:
- main
pull_request:
- wip

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -18,236 +17,6 @@ defaults:
shell: bash

jobs:
test_matrix:
name: test (${{ matrix.os }}, nats-${{ matrix.nats_server }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
nats_server: [main, dev]
include:
- nats_server: dev
features: server_2_10

steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Cache rust
uses: actions/cache@v3
env:
cache-name: cache-rust
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.toml') }}

- name: Cache go
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod # Module download cache
~/.cache/go-build # Build cache (Linux)
~/Library/Caches/go-build # Build cache (Mac)
'%LocalAppData%\go-build' # Build cache (Windows)
key: ${{ runner.os }}-go-${{ env.cache-name }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup Rust
run: |
rustup install stable
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.20'

- name: Install nats-server
run: go install github.com/nats-io/nats-server/v2@${{ matrix.nats_server }}

- name: Setup deno for service tests
if: ${{ matrix.os }} != windows-latest
uses: "denoland/setup-deno@v1"
with:
deno-version: v1.x

- name: Run tests
env:
RUST_BACKTRACE: 1
run: |
nats-server --jetstream --port=4222 &
cargo test --features=${{ matrix.features }} --features slow_tests -- --nocapture
check_format:
name: check (format)
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Set up Rust
run: |
rustup install nightly
rustup default nightly
rustup component add rustfmt
- name: Run the check
run: cargo fmt -- --check

check_lint:
name: check (lint)
runs-on: ubuntu-latest
steps:
- name: Cache rust
uses: actions/cache@v3
env:
cache-name: cache-rust
with:
path: target
key: ${{ runner.os }}-${{ env.cache-name }}
restore-keys: |
${{ runner.os }}-
- name: Check out repository
uses: actions/checkout@v3

- name: Set up rust
run: |
rustup install stable
- name: Check lint
run: cargo clippy --benches --tests --examples --all-features -- --deny clippy::all

check_docs:
name: check (docs)
runs-on: ubuntu-latest
steps:
- name: Cache rust
uses: actions/cache@v3
env:
cache-name: cache-rust
with:
path: target
key: ${{ runner.os }}-${{ env.cache-name }}
restore-keys: |
${{ runner.os }}-
- name: Check out repository
uses: actions/checkout@v3

- name: Set up rust
run: |
rustup install stable
rustup component add clippy
- name: Check lint
run: cargo doc

check_licenses:
name: check (licenses)
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3

- name: Run cargo deny
uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check
command-arguments: licenses

check_msrv:
name: check (msrv)
runs-on: ubuntu-latest
steps:
- name: Cache rust
uses: actions/cache@v3
env:
cache-name: cache-rust
with:
path: target
key: ${{ runner.os }}-${{ env.cache-name }}
restore-keys: |
${{ runner.os }}-
- name: Check out repository
uses: actions/checkout@v3

- name: Check minimum supported rust Version
run: |
set -eo pipefail
echo "msrv check"
rustup install 1.67.0
cargo +1.67.0 check
check_examples:
name: check (examples)
runs-on: ubuntu-latest
steps:
- name: Cache rust
uses: actions/cache@v3
env:
cache-name: cache-rust
with:
path: target
key: ${{ runner.os }}-${{ env.cache-name }}
restore-keys: |
${{ runner.os }}-
- name: Check out repository
uses: actions/checkout@v3

- name: Set up go
uses: actions/setup-go@v2
with:
go-version: '1.20'

- name: Set up rust
run: |
rustup install stable
- name: Install nats-server
run: go install github.com/nats-io/nats-server/v2@dev
- name: Check examples
env:
RUST_LOG: trace
run: cargo check --examples

check_spelling:
name: check (spelling)
runs-on: ubuntu-latest
steps:
- name: Cache rust
uses: actions/cache@v3
env:
cache-name: cache-rust
with:
path: target
key: ${{ runner.os }}-${{ env.cache-name }}
restore-keys: |
${{ runner.os }}-
- name: Check out repository
uses: actions/checkout@v3

- name: Set up rust
run: |
rustup install nightly
- name: Install llvm-config
run: sudo apt-get install -y libclang-dev

- name: Install cargo spellcheck
run: cargo install cargo-spellcheck

- name: Check spelling
run: cargo spellcheck --code 1

check_min_versions:
name: check minimal versions of transitive dependencies
runs-on: ubuntu-latest
Expand All @@ -273,7 +42,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable
- name: Default to stable
run: rustup default stable
- name: Run tests
- name: Build async-nats
env:
RUST_BACKTRACE: 1
run: cargo build --package async-nats --locked --all-features --all-targets
1 change: 1 addition & 0 deletions async-nats/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ webpki = { package = "rustls-webpki", version = "0.101.2", features = ["alloc",

# for -Z minimal-versions
rustls = "0.21.6" # used by tokio-rustls 0.24.0
openssl = "0.10.36"

[dev-dependencies]
criterion = { version = "0.5", features = ["async_tokio"]}
Expand Down

0 comments on commit 2f81410

Please sign in to comment.