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

Add CI coverage for Windows #1714

Merged
merged 8 commits into from
May 7, 2024
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 26 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ jobs:
strategy:
matrix:
rust: [stable, beta]
runs-on: ubuntu-latest
os: [ windows-latest, ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Free disk space
if: ${{ matrix.os == 'ubuntu-latest'}}
run: |
df -h
sudo rm -rf /usr/local/lib/android
Expand All @@ -32,9 +34,12 @@ jobs:
run: rustup set profile minimal
- uses: arduino/setup-protoc@v3
- name: Test
run: ./scripts/test.sh
run: bash ./scripts/test.sh
lint:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ windows-latest, ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -48,12 +53,12 @@ jobs:
command: fmt
args: --all -- --check
- name: Lint
run: ./scripts/lint.sh
run: bash ./scripts/lint.sh
external-types:
strategy:
matrix:
example: [opentelemetry, opentelemetry-sdk, opentelemetry-otlp, opentelemetry-zipkin]
runs-on: ubuntu-latest
runs-on: ubuntu-latest # TODO: Check if this could be covered for Windows. The step used currently fails on Windows.
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
Expand All @@ -68,8 +73,9 @@ jobs:
non-default-examples:
strategy:
matrix:
os: [ windows-latest, ubuntu-latest ]
example: [opentelemetry-otlp/examples/basic-otlp]
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -83,30 +89,36 @@ jobs:
cd ${{ matrix.example }}
cargo build --verbose
msrv:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ windows-latest, ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@1.65.0
- name: Patch dependencies versions # some dependencies bump MSRV without major version bump
run: ./scripts/patch_dependencies.sh
run: bash ./scripts/patch_dependencies.sh
- name: Run tests
run: cargo --version &&
cargo test --manifest-path=opentelemetry/Cargo.toml --features trace,metrics,testing &&
cargo test --manifest-path=opentelemetry-jaeger/Cargo.toml --features rt-tokio &&
cargo test --manifest-path=opentelemetry-zipkin/Cargo.toml
cargo-deny:
runs-on: ubuntu-latest
runs-on: ubuntu-latest # This uses the step `EmbarkStudios/cargo-deny-action@v1` which is only supported on Linux
continue-on-error: true # Prevent sudden announcement of a new advisory from failing ci
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check advisories
docs:
strategy:
matrix:
os: [ windows-latest, ubuntu-latest ]
continue-on-error: true
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
Expand All @@ -120,7 +132,10 @@ jobs:
RUSTDOCFLAGS: -Dwarnings
coverage:
continue-on-error: true
runs-on: ubuntu-latest
strategy:
matrix:
os: [ windows-latest, ubuntu-latest ]
runs-on: ${{ matrix.os }}
if: ${{ ! contains(github.event.pull_request.labels.*.name, 'dependencies') }}
steps:
- uses: actions/checkout@v4
Expand Down
Loading