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

Replace crypto #22

Merged
merged 10 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
34 changes: 10 additions & 24 deletions .github/workflows/ci_code_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

# Crypto tests are excluded because the way rust does coverage makes them take 100x longer.
- name: Test with profiling data
run: cargo test
env:
CARGO_INCREMENTAL: 0
LLVM_PROFILE_FILE: 'cargo-test-%p-%m.profraw'
RUSTFLAGS: '-Cinstrument-coverage'
run: cargo llvm-cov --workspace --exclude opcua-crypto --codecov --output-path codecov.json

- name: Install grcov fast
uses: SierraSoftworks/setup-grcov@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
version: latest

- name: Add llvm-tools-preview
run: rustup component add llvm-tools-preview

- name: Create lcov output dir
run: |
mkdir target/coverage

- name: Generate lcov from profiling data
run: grcov . --binary-path ./target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '**/generated/**/*' --ignore '**/integration/**/*' --ignore '**/tests/**/*' --ignore '../*' --ignore "/*" -o target/coverage/tests.lcov
- name: Run crypto tests
run: cargo test -p opcua-crypto

- name: Run core tests
run: cargo test -p opcua-core

- name: Upload lcov to codecov.io
uses: codecov/codecov-action@v4
with:
files: target/coverage/*.lcov

- name: Wipe stray profiling files
run: find . -type f -name "*.profraw"
files: codecov.json
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
- name: Provision toolchain
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Build
run: cargo build --features test-vendored-openssl
run: cargo build
- name: Run tests
run: cargo test --features test-vendored-openssl --verbose
run: cargo test --verbose

# build-windows:
# strategy:
Expand All @@ -40,9 +40,9 @@ jobs:
# - name: Provision toolchain
# run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
# - name: Build
# run: cargo build --features test-vendored-openssl
# run: cargo build
# - name: Run tests
# run: cargo test --features test-vendored-openssl --verbose
# run: cargo test --verbose

code-coverage:
uses: ./.github/workflows/ci_code_coverage.yml
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ log/
**/pki-client
**/pki-server
3rd-party/open62541/build/
lib/pki*
lib/pki*
lib/certs
Loading
Loading